Skip to content

Commit 6ff6ca4

Browse files
committed
Merge branch 'master' into 160-add-pre-compiled-postprocessings-based-on-mgisfunction
2 parents 24bf05f + 88d2d57 commit 6ff6ca4

115 files changed

Lines changed: 13395 additions & 291 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/doxygen.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Doxygen
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
11+
BUILD_TYPE: Release
12+
13+
jobs:
14+
15+
doc-html:
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
21+
- uses: actions/checkout@v2
22+
23+
- name: Install Doxygen
24+
run: sudo apt-get install doxygen graphviz -y
25+
shell: bash
26+
27+
- name: Configure CMake
28+
run: |
29+
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
30+
-Denable-doxygen-doc=ON \
31+
-Denable-parallel-stl-algorithms=OFF
32+
33+
- name: Generate doxygen
34+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target doc-html
35+
36+
- name: Deploy
37+
uses: peaceiris/actions-gh-pages@v4
38+
with:
39+
personal_token: ${{ secrets.DEPLOY_TO_THELFER_GITHUB_IO }}
40+
publish_branch: master
41+
publish_dir: ${{github.workspace}}/build/docs/doxygen/html/
42+
external_repository: thelfer/thelfer.github.io
43+
destination_dir: mgis/doxygen/

CMakeLists.txt

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,24 @@ if(enable-python-bindings)
7575
set(CPACK_COMPONENT_PYTHON_BINDINGS_DESCRIPTION
7676
"Contains the python bindings for MGIS")
7777
set(CPACK_COMPONENT_PYTHON_BINDINGS_DEPENDS mgis)
78+
# store the location of the python modules in the MGIS_PYTHON_MODULES_INSTALL_DIRECTORY variable
79+
if(MGIS_APPEND_SUFFIX)
80+
if(WIN32)
81+
set(MGIS_PYTHON_MODULES_INSTALL_DIRECTORY
82+
bin/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/mgis_${MGIS_SUFFIX_FOR_PYTHON_MODULES})
83+
else(WIN32)
84+
set(MGIS_PYTHON_MODULES_INSTALL_DIRECTORY
85+
"lib${LIB_SUFFIX}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/mgis_${MGIS_SUFFIX_FOR_PYTHON_MODULES}")
86+
endif(WIN32)
87+
else(MGIS_APPEND_SUFFIX)
88+
if(WIN32)
89+
set(MGIS_PYTHON_MODULES_INSTALL_DIRECTORY
90+
"bin/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/mgis")
91+
else(WIN32)
92+
set(MGIS_PYTHON_MODULES_INSTALL_DIRECTORY
93+
"lib${LIB_SUFFIX}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/mgis")
94+
endif(WIN32)
95+
endif(MGIS_APPEND_SUFFIX)
7896
endif(enable-python-bindings)
7997

8098
# fenics-bindings (placed before compiler detection)
@@ -96,6 +114,26 @@ if(enable-julia-bindings)
96114
set(CMAKE_CXX_STANDARD "${_CMAKE_CXX_STANDARD}")
97115
endif(enable-julia-bindings)
98116

117+
# HDF5 support (optional)
118+
119+
option(enable-hdf5-support "enable HDF5 support" OFF)
120+
option(enable-hdf5-automatic-support "if set, try to support HDF5, even if not explicitly requested by enable-hdf5-support" ON)
121+
if(enable-hdf5-support)
122+
find_package(HDF5 REQUIRED COMPONENTS CXX)
123+
else(enable-hdf5-support)
124+
if(enable-hdf5-automatic-support)
125+
find_package(HDF5 COMPONENTS CXX)
126+
endif(enable-hdf5-automatic-support)
127+
endif(enable-hdf5-support)
128+
if(HDF5_FOUND)
129+
set(MGIS_HDF5_SUPPORT ON)
130+
MESSAGE(STATUS "hdf5 headers : " ${HDF5_INCLUDE_DIRS})
131+
MESSAGE(STATUS "hdf5 librairies : " ${HDF5_LIBRARIES})
132+
MESSAGE(STATUS "hdf5 definitions : " ${HDF5_DEFINITIONS})
133+
else(HDF5_FOUND)
134+
set(MGIS_HDF5_SUPPORT OFF)
135+
endif(HDF5_FOUND)
136+
99137
# summary
100138

101139
if(enable-c-bindings)
@@ -114,6 +152,10 @@ if(enable-fenics-bindings)
114152
message(STATUS "FEniCS bindings support enabled")
115153
endif(enable-fenics-bindings)
116154

155+
if(MGIS_HDF5_SUPPORT)
156+
message(STATUS "HDF5 support enabled")
157+
endif(MGIS_HDF5_SUPPORT)
158+
117159
find_package(Threads)
118160
# if(MINGW)
119161
# file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/thread-mingw.cxx"
@@ -189,7 +231,7 @@ if(enable-doxygen-doc)
189231
list(APPEND CPACK_COMPONENTS_ALL doxygen)
190232
set(CPACK_COMPONENT_DOXYGEN_DESCRIPTION
191233
"Contains MGIS' doxygen documentation")
192-
set(GENERATE_DOXYGEN ON)
234+
set(MGIS_GENERATE_DOXYGEN ON)
193235
else(DOXYGEN_FOUND)
194236
message(FATAL_ERROR "doxygen is required")
195237
endif(DOXYGEN_FOUND)
@@ -241,6 +283,8 @@ add_subdirectory(include)
241283
add_subdirectory(src)
242284
add_subdirectory(tests)
243285
add_subdirectory(bindings)
286+
# shall be included after the other directories
287+
add_subdirectory(env)
244288

245289
# Packaging
246290
if(MFrontGenericInterfaceSupportDevelopmentVersion)

Doxyfile.in

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
3232
# title of most generated pages and in a few other places.
3333
# The default value is: My Project.
3434

35-
PROJECT_NAME = @PACKAGE_NAME@
35+
PROJECT_NAME = MGIS
3636

3737
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
3838
# could be handy for archiving the generated documentation or if some version
@@ -1117,7 +1117,7 @@ HTML_STYLESHEET =
11171117
# list). For an example see the documentation.
11181118
# This tag requires that the tag GENERATE_HTML is set to YES.
11191119

1120-
HTML_EXTRA_STYLESHEET =
1120+
HTML_EXTRA_STYLESHEET = @PROJECT_SOURCE_DIR@/docs/doxygen/doxygen-awesome-css/doxygen-awesome.css
11211121

11221122
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
11231123
# other source files which should be copied to the HTML output directory. Note
@@ -1129,35 +1129,7 @@ HTML_EXTRA_STYLESHEET =
11291129

11301130
HTML_EXTRA_FILES =
11311131

1132-
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
1133-
# will adjust the colors in the style sheet and background images according to
1134-
# this color. Hue is specified as an angle on a colorwheel, see
1135-
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
1136-
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
1137-
# purple, and 360 is red again.
1138-
# Minimum value: 0, maximum value: 359, default value: 220.
1139-
# This tag requires that the tag GENERATE_HTML is set to YES.
1140-
1141-
HTML_COLORSTYLE_HUE = 220
1142-
1143-
# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
1144-
# in the HTML output. For a value of 0 the output will use grayscales only. A
1145-
# value of 255 will produce the most vivid colors.
1146-
# Minimum value: 0, maximum value: 255, default value: 100.
1147-
# This tag requires that the tag GENERATE_HTML is set to YES.
1148-
1149-
HTML_COLORSTYLE_SAT = 100
1150-
1151-
# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
1152-
# luminance component of the colors in the HTML output. Values below 100
1153-
# gradually make the output lighter, whereas values above 100 make the output
1154-
# darker. The value divided by 100 is the actual gamma applied, so 80 represents
1155-
# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
1156-
# change the gamma.
1157-
# Minimum value: 40, maximum value: 240, default value: 80.
1158-
# This tag requires that the tag GENERATE_HTML is set to YES.
1159-
1160-
HTML_COLORSTYLE_GAMMA = 80
1132+
HTML_COLORSTYLE = LIGHT
11611133

11621134
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
11631135
# page will contain the date and time when the page was generated. Setting this
@@ -1403,7 +1375,7 @@ DISABLE_INDEX = NO
14031375
# The default value is: NO.
14041376
# This tag requires that the tag GENERATE_HTML is set to YES.
14051377

1406-
GENERATE_TREEVIEW = NO
1378+
GENERATE_TREEVIEW = YES
14071379

14081380
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
14091381
# doxygen will group on one line in the generated HTML documentation.

INSTALL-cmake.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ Options
6666
- `enable-exceptions`: use exceptions to report contract violation and error reporting.
6767
By default, contract violation leads to abort the program.
6868
- `enable-parallel-stl-algorithms`: by default, STL algorithms are used if available
69+
- `enable-hdf5-support`: enable HDF5 support for save/restore
70+
operations. Note that if this support is not explicitely requested,
71+
`MGIS` still tries by default to support `HDF5` but configuration will
72+
not fail if the `HDF5` library is not found. See
73+
`enable-hdf5-automatic-support` for details.
74+
- `enable-hdf5-automatic-support`: if set, `MGIS` tries by default to
75+
support `HDF5` even if enable-hdf5-support` is not set.
6976

7077
`cmake` usefull variables
7178
=======================

bindings/c/include/MGIS/Behaviour/MaterialStateManager.h

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ typedef enum {
4646
MGIS_BV_LOCAL_STORAGE = 0,
4747
MGIS_BV_EXTERNAL_STORAGE = 1
4848
} mgis_bv_MaterialStateManagerStorageMode;
49+
50+
typedef enum {
51+
MGIS_BV_NO_UPDATE_POLICY = 0,
52+
MGIS_BV_UPDATE_POLICY = 1
53+
} mgis_bv_MaterialStateManagerUpdatePolicy;
54+
4955
/*!
5056
* \brief bind the gradients to the given array
5157
* \param[in,out] s: initializer
@@ -155,6 +161,19 @@ mgis_bv_material_state_manager_get_internal_state_variables_stride(
155161
MGIS_C_EXPORT mgis_status
156162
mgis_bv_material_state_manager_set_uniform_scalar_material_property(
157163
mgis_bv_MaterialStateManager* const, const char* const, const mgis_real);
164+
/*!
165+
* \brief set the value of an uniform scalar material property
166+
* \param[in] s: state manager
167+
* \param[in] n: name of the material property
168+
* \param[in] v: value of the material property
169+
* \param[in] p: update policy
170+
*/
171+
MGIS_C_EXPORT mgis_status
172+
mgis_bv_material_state_manager_set_uniform_scalar_material_property2(
173+
mgis_bv_MaterialStateManager* const,
174+
const char* const,
175+
const mgis_real,
176+
const mgis_bv_MaterialStateManagerUpdatePolicy);
158177
/*!
159178
* \brief set the value of an uniform material property
160179
* \param[in] s: state manager
@@ -168,6 +187,21 @@ mgis_bv_material_state_manager_set_uniform_material_property(
168187
const char* const,
169188
mgis_real* const,
170189
const mgis_bv_MaterialStateManagerStorageMode);
190+
/*!
191+
* \brief set the value of an uniform material property
192+
* \param[in] s: state manager
193+
* \param[in] n: name of the material property
194+
* \param[in] v: values of the material property
195+
* \param[in] sm: storage mode
196+
* \param[in] p: update policy
197+
*/
198+
MGIS_C_EXPORT mgis_status
199+
mgis_bv_material_state_manager_set_uniform_material_property2(
200+
mgis_bv_MaterialStateManager* const,
201+
const char* const,
202+
mgis_real* const,
203+
const mgis_bv_MaterialStateManagerStorageMode,
204+
const mgis_bv_MaterialStateManagerUpdatePolicy);
171205
/*!
172206
* \brief set the value of an uniform material property
173207
* \param[in] s: state manager
@@ -181,6 +215,21 @@ mgis_bv_material_state_manager_set_non_uniform_material_property(
181215
const char* const,
182216
mgis_real* const,
183217
const mgis_bv_MaterialStateManagerStorageMode);
218+
/*!
219+
* \brief set the value of an uniform material property
220+
* \param[in] s: state manager
221+
* \param[in] n: name of the material property
222+
* \param[in] v: values of the material property
223+
* \param[in] sm: storage mode
224+
* \param[in] p: update policy
225+
*/
226+
MGIS_C_EXPORT mgis_status
227+
mgis_bv_material_state_manager_set_non_uniform_material_property2(
228+
mgis_bv_MaterialStateManager* const,
229+
const char* const,
230+
mgis_real* const,
231+
const mgis_bv_MaterialStateManagerStorageMode,
232+
const mgis_bv_MaterialStateManagerUpdatePolicy);
184233

185234
MGIS_C_EXPORT mgis_status
186235
mgis_bv_material_state_manager_is_material_property_defined(
@@ -206,6 +255,17 @@ mgis_bv_material_state_manager_get_non_uniform_material_property(
206255
MGIS_C_EXPORT mgis_status
207256
mgis_bv_material_state_manager_set_uniform_scalar_mass_density(
208257
mgis_bv_MaterialStateManager* const, const mgis_real);
258+
/*!
259+
* \brief set the value of an uniform scalar mass density
260+
* \param[in] s: state manager
261+
* \param[in] v: value of the mass density
262+
* \param[in] p: update policy
263+
*/
264+
MGIS_C_EXPORT mgis_status
265+
mgis_bv_material_state_manager_set_uniform_scalar_mass_density2(
266+
mgis_bv_MaterialStateManager* const,
267+
const mgis_real,
268+
const mgis_bv_MaterialStateManagerUpdatePolicy);
209269
/*!
210270
* \brief set the value of an uniform mass density
211271
* \param[in] s: state manager
@@ -217,6 +277,19 @@ mgis_bv_material_state_manager_set_non_uniform_mass_density(
217277
mgis_bv_MaterialStateManager* const,
218278
mgis_real* const,
219279
const mgis_bv_MaterialStateManagerStorageMode);
280+
/*!
281+
* \brief set the value of an uniform mass density
282+
* \param[in] s: state manager
283+
* \param[in] v: values of the mass density
284+
* \param[in] sm: storage mode
285+
* \param[in] p: update policy
286+
*/
287+
MGIS_C_EXPORT mgis_status
288+
mgis_bv_material_state_manager_set_non_uniform_mass_density2(
289+
mgis_bv_MaterialStateManager* const,
290+
mgis_real* const,
291+
const mgis_bv_MaterialStateManagerStorageMode,
292+
const mgis_bv_MaterialStateManagerUpdatePolicy);
220293

221294
MGIS_C_EXPORT mgis_status
222295
mgis_bv_material_state_manager_is_mass_density_defined(
@@ -240,20 +313,43 @@ MGIS_C_EXPORT mgis_status
240313
mgis_bv_material_state_manager_set_uniform_scalar_external_state_variable(
241314
mgis_bv_MaterialStateManager* const, const char* const, const mgis_real);
242315

316+
MGIS_C_EXPORT mgis_status
317+
mgis_bv_material_state_manager_set_uniform_scalar_external_state_variable2(
318+
mgis_bv_MaterialStateManager* const,
319+
const char* const,
320+
const mgis_real,
321+
const mgis_bv_MaterialStateManagerUpdatePolicy);
322+
243323
MGIS_C_EXPORT mgis_status
244324
mgis_bv_material_state_manager_set_uniform_external_state_variable(
245325
mgis_bv_MaterialStateManager* const,
246326
const char* const,
247327
mgis_real* const,
248328
const mgis_bv_MaterialStateManagerStorageMode);
249329

330+
MGIS_C_EXPORT mgis_status
331+
mgis_bv_material_state_manager_set_uniform_external_state_variable2(
332+
mgis_bv_MaterialStateManager* const,
333+
const char* const,
334+
mgis_real* const,
335+
const mgis_bv_MaterialStateManagerStorageMode,
336+
const mgis_bv_MaterialStateManagerUpdatePolicy);
337+
250338
MGIS_C_EXPORT mgis_status
251339
mgis_bv_material_state_manager_set_non_uniform_external_state_variable(
252340
mgis_bv_MaterialStateManager* const,
253341
const char* const,
254342
mgis_real* const,
255343
const mgis_bv_MaterialStateManagerStorageMode);
256344

345+
MGIS_C_EXPORT mgis_status
346+
mgis_bv_material_state_manager_set_non_uniform_external_state_variable2(
347+
mgis_bv_MaterialStateManager* const,
348+
const char* const,
349+
mgis_real* const,
350+
const mgis_bv_MaterialStateManagerStorageMode,
351+
const mgis_bv_MaterialStateManagerUpdatePolicy);
352+
257353
MGIS_C_EXPORT mgis_status
258354
mgis_bv_material_state_manager_is_external_state_variable_defined(
259355
int* const, const mgis_bv_MaterialStateManager* const, const char* const);

0 commit comments

Comments
 (0)