diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f2f6dd8e3609ae8df829bd6d8633349c52af710..861e472bc49ad61239d78def7b35a43340bfd581 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Master +- Build cosserat-continuum for different combinations of LFE-orders and + GFE-orders, the respective program is called + cosserat-continuum-Xd-in-Xd-LFE_ORDER-GFE_ORDER + TODO: This is now set during compile time, but shall be changed to be + set during runtime. + - Do not scale the density functions with the thickness to avoid confusion since some densities need to be scaled and some do not need to be scaled with the thickness depending on the dimension of the grid, their direction diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b0b4eeca145e3857724a98f03e3bb142d18598a2..e57f4fd663a40042fb5f8f7a0a62cfc33e6f7963 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -22,14 +22,26 @@ set_property(TARGET "cosserat-continuum-2d-in-2d" APPEND PROPERTY COMPILE_DEFINI set(programs cosserat-continuum-2d-in-2d ${programs}) if (dune-foamgrid_FOUND) - add_executable("cosserat-continuum-2d-in-3d" cosserat-continuum.cc) - set_property(TARGET "cosserat-continuum-2d-in-3d" APPEND PROPERTY COMPILE_DEFINITIONS "GRID_DIM=2; WORLD_DIM=3") - set(programs cosserat-continuum-2d-in-3d ${programs}) + add_executable("cosserat-continuum-2d-in-3d-2-2" cosserat-continuum.cc) + set_property(TARGET "cosserat-continuum-2d-in-3d-2-2" APPEND PROPERTY COMPILE_DEFINITIONS "GRID_DIM=2; WORLD_DIM=3; LFE_ORDER=2; GFE_ORDER=2") + set(programs cosserat-continuum-2d-in-3d-2-2 ${programs}) + + add_executable("cosserat-continuum-2d-in-3d-2-1" cosserat-continuum.cc) + set_property(TARGET "cosserat-continuum-2d-in-3d-2-1" APPEND PROPERTY COMPILE_DEFINITIONS "GRID_DIM=2; WORLD_DIM=3; LFE_ORDER=2; GFE_ORDER=1") + set(programs cosserat-continuum-2d-in-3d-2-1 ${programs}) + + add_executable("cosserat-continuum-2d-in-3d-1-1" cosserat-continuum.cc) + set_property(TARGET "cosserat-continuum-2d-in-3d-1-1" APPEND PROPERTY COMPILE_DEFINITIONS "GRID_DIM=2; WORLD_DIM=3; LFE_ORDER=1; GFE_ORDER=1") + set(programs cosserat-continuum-2d-in-3d-1-1 ${programs}) endif() -add_executable("cosserat-continuum-3d-in-3d" cosserat-continuum.cc) -set_property(TARGET "cosserat-continuum-3d-in-3d" APPEND PROPERTY COMPILE_DEFINITIONS "GRID_DIM=3; WORLD_DIM=3") -set(programs cosserat-continuum-3d-in-3d ${programs}) +add_executable("cosserat-continuum-3d-in-3d-2-2" cosserat-continuum.cc) +set_property(TARGET "cosserat-continuum-3d-in-3d-2-2" APPEND PROPERTY COMPILE_DEFINITIONS "GRID_DIM=3; WORLD_DIM=3; LFE_ORDER=2; GFE_ORDER=2") +set(programs cosserat-continuum-3d-in-3d-2-2 ${programs}) + +add_executable("cosserat-continuum-3d-in-3d-2-1" cosserat-continuum.cc) +set_property(TARGET "cosserat-continuum-3d-in-3d-2-1" APPEND PROPERTY COMPILE_DEFINITIONS "GRID_DIM=3; WORLD_DIM=3; LFE_ORDER=2; GFE_ORDER=1") +set(programs cosserat-continuum-3d-in-3d-2-1 ${programs}) foreach(_program ${programs}) target_link_dune_default_libraries(${_program}) @@ -40,4 +52,4 @@ foreach(_program ${programs}) target_link_libraries(${_program} tinyxml2) endif() # target_compile_options(${_program} PRIVATE "-fpermissive") -endforeach() \ No newline at end of file +endforeach() diff --git a/src/cosserat-continuum.cc b/src/cosserat-continuum.cc index 607b127670e63cf27082873d30ed0476f6f8f4ce..23dddb7f8633e71814238eb01e6b4f1feb3e460c 100644 --- a/src/cosserat-continuum.cc +++ b/src/cosserat-continuum.cc @@ -1,4 +1,19 @@ -#define MIXED_SPACE 0 +#ifndef LFE_ORDER + #define LFE_ORDER 2 +#endif + +#ifndef GFE_ORDER + #define GFE_ORDER 1 +#endif + +#ifndef MIXED_SPACE + #if LFE_ORDER != GFE_ORDER + #define MIXED_SPACE 1 + #else + #define MIXED_SPACE 0 + #endif +#endif + //#define PROJECTED_INTERPOLATION #include <config.h> @@ -70,10 +85,10 @@ const int dim = GRID_DIM; const int dimworld = WORLD_DIM; // Order of the approximation space for the displacement -const int displacementOrder = 2; +const int displacementOrder = LFE_ORDER; // Order of the approximation space for the microrotations -const int rotationOrder = 2; +const int rotationOrder = GFE_ORDER; #if !MIXED_SPACE static_assert(displacementOrder==rotationOrder, "displacement and rotation order do not match!");