Commit fc27a377 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1332 Expand Solid tests, and improve the safety of Solid construction (tests...

#1332 Expand Solid tests, and improve the safety of Solid construction (tests revealed some cases were poorly covered...).
parent 2357eca4
......@@ -4757,8 +4757,14 @@
BEDEDE06212FFB4C0060F00E /* Solid.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Solid.hpp; sourceTree = "<group>"; };
BEDEDE0B213002990060F00E /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
BEDEDE0F2130029A0060F00E /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
BEDEDE1E2130029A0060F00E /* test.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = test.cpp; sourceTree = "<group>"; };
BEDEDE22213025C30060F00E /* demo_solid_all_defined.lua */ = {isa = PBXFileReference; lastKnownFileType = text; path = demo_solid_all_defined.lua; sourceTree = "<group>"; };
BEDEDE23213046040060F00E /* demo_solid_no_kappa_mu_C.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = demo_solid_no_kappa_mu_C.lua; sourceTree = "<group>"; };
BEDEDE24213046050060F00E /* demo_solid_lame_ignored.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = demo_solid_lame_ignored.lua; sourceTree = "<group>"; };
BEDEDE25213049940060F00E /* demo_solid_poisson_without_young.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = demo_solid_poisson_without_young.lua; sourceTree = "<group>"; };
BEDEDE2621304E010060F00E /* test_lame_ignored.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = test_lame_ignored.cpp; sourceTree = "<group>"; };
BEDEDE2721304E020060F00E /* test_all_defined.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = test_all_defined.cpp; sourceTree = "<group>"; };
BEDEDE2821304E020060F00E /* test_no_kappa_mu_C.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = test_no_kappa_mu_C.cpp; sourceTree = "<group>"; };
BEDEDE2921304E020060F00E /* test_poisson_without_young.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = test_poisson_without_young.cpp; sourceTree = "<group>"; };
BEDFFB52204EE3E200A52F86 /* catch.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch.hpp; sourceTree = "<group>"; };
BEDFFB7C204EE4F400A52F86 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
BEDFFB7D204EE4F400A52F86 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
......@@ -10328,7 +10334,13 @@
children = (
BEDEDE0F2130029A0060F00E /* CMakeLists.txt */,
BEDEDE22213025C30060F00E /* demo_solid_all_defined.lua */,
BEDEDE1E2130029A0060F00E /* test.cpp */,
BEDEDE2721304E020060F00E /* test_all_defined.cpp */,
BEDEDE24213046050060F00E /* demo_solid_lame_ignored.lua */,
BEDEDE2621304E010060F00E /* test_lame_ignored.cpp */,
BEDEDE23213046040060F00E /* demo_solid_no_kappa_mu_C.lua */,
BEDEDE2821304E020060F00E /* test_no_kappa_mu_C.cpp */,
BEDEDE25213049940060F00E /* demo_solid_poisson_without_young.lua */,
BEDEDE2921304E020060F00E /* test_poisson_without_young.cpp */,
);
path = Solid;
sourceTree = "<group>";
......@@ -167,8 +167,8 @@ namespace MoReFEM
// We can be here only if the file exists...
input_data_ = std::make_unique<InputParameterDataT>(input_parameter_file,
mpi,
DoTrackUnusedFieldsT);
mpi,
DoTrackUnusedFieldsT);
namespace ipl = Utilities::InputParameterListNS;
using Result = InputParameter::Result;
......
......@@ -93,22 +93,22 @@ namespace MoReFEM
// ======================================
const bool are_lame = IsLameLambda();
if (are_lame && !IsLameMu())
if (are_lame != IsLameMu())
throw Exception("Inconsistency in Solid: Lame coefficients should be either both defined or "
"both ignored.",
__FILE__, __LINE__);
const bool are_young_poisson = IsYoungModulus();
if (are_young_poisson && !IsPoissonRatio())
if (are_young_poisson != IsPoissonRatio())
throw Exception("Inconsistency in Solid: Young modulus and Poisson ratio should be either both "
"defined or both ignored.",
__FILE__, __LINE__);
const bool are_kappa_coeff = IsKappa1();
if (are_kappa_coeff && !IsKappa2())
if (are_kappa_coeff != IsKappa2())
throw Exception("Inconsistency in Solid: kappa parameters should be either both "
"defined or both ignored.",
__FILE__, __LINE__);
......
......@@ -63,8 +63,12 @@ namespace MoReFEM
domain,
input_data);
if constexpr (Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::LameLambda>())
if constexpr ((Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::LameLambda>())
|| (Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::LameMu>()))
{
static_assert(Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::LameLambda>(),
"It makes no sense to define one and not the other");
static_assert(Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::LameMu>(),
"It makes no sense to define one and not the other");
......@@ -78,11 +82,15 @@ namespace MoReFEM
input_data);
}
if constexpr (Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::YoungModulus>())
if constexpr ((Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::YoungModulus>())
|| (Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::PoissonRatio>()))
{
static_assert(Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::PoissonRatio>(),
"It makes no sense to define one and not the other");
static_assert(Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::YoungModulus>(),
"It makes no sense to define one and not the other");
std::get<0>(young_poisson_) =
InitScalarParameterFromInputData<InputParameter::Solid::YoungModulus>("Young modulus",
domain,
......@@ -95,8 +103,12 @@ namespace MoReFEM
input_data);
}
if constexpr (Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::Kappa1>())
if constexpr ((Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::Kappa1>())
|| (Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::Kappa2>()))
{
static_assert(Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::Kappa1>(),
"It makes no sense to define one and not the other");
static_assert(Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::Kappa2>(),
"It makes no sense to define one and not the other");
......@@ -127,13 +139,19 @@ namespace MoReFEM
input_data);
}
if constexpr (Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::Mu1>())
{
if constexpr (Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::Mu1>()
|| Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::C0>()
|| Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::C1>()
|| Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::C2>()
|| Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::C3>()
|| Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::Mu2>())
{
static_assert(Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::Mu2>()
&& Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::C0>()
&& Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::C1>()
&& Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::C2>()
&& Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::C3>(),
&& Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::C3>()
&& Internal::SolidNS::IsDefined<InputParameterDataT, SolidIP::Mu1>(),
"It makes no sense to define one and not the others");
std::get<0>(mu_i_C_i_) =
......
add_executable(MoReFEMTestSolid
${CMAKE_CURRENT_LIST_DIR}/test.cpp)
add_executable(MoReFEMTestSolidAllDefined
${CMAKE_CURRENT_LIST_DIR}/test_all_defined.cpp)
target_link_libraries(MoReFEMTestSolid
add_executable(MoReFEMTestSolidLameIgnored
${CMAKE_CURRENT_LIST_DIR}/test_lame_ignored.cpp)
add_executable(MoReFEMTestSolidNoKappaMuC
${CMAKE_CURRENT_LIST_DIR}/test_no_kappa_mu_C.cpp)
add_executable(MoReFEMTestSolidPoissonWithoutYoung
${CMAKE_CURRENT_LIST_DIR}/test_poisson_without_young.cpp)
target_link_libraries(MoReFEMTestSolidAllDefined
${ALL_LOAD_BEGIN_FLAG}
${MOREFEM_PARAM_INSTANCES}
${ALL_LOAD_END_FLAG})
target_link_libraries(MoReFEMTestSolidLameIgnored
${ALL_LOAD_BEGIN_FLAG}
${MOREFEM_PARAM_INSTANCES}
${ALL_LOAD_END_FLAG})
target_link_libraries(MoReFEMTestSolidNoKappaMuC
${ALL_LOAD_BEGIN_FLAG}
${MOREFEM_PARAM_INSTANCES}
${ALL_LOAD_END_FLAG})
target_link_libraries(MoReFEMTestSolidPoissonWithoutYoung
${ALL_LOAD_BEGIN_FLAG}
${MOREFEM_PARAM_INSTANCES}
${ALL_LOAD_END_FLAG})
add_test(Solid
MoReFEMTestSolid
add_test(SolidAllDefined
MoReFEMTestSolidAllDefined
--root_dir ${MOREFEM_ROOT}
--test_output_dir ${MOREFEM_TEST_OUTPUT_DIR})
add_test(SolidLameIgnored
MoReFEMTestSolidLameIgnored
--root_dir ${MOREFEM_ROOT}
--test_output_dir ${MOREFEM_TEST_OUTPUT_DIR})
add_test(SolidNoKappaMuC
MoReFEMTestSolidNoKappaMuC
--root_dir ${MOREFEM_ROOT}
--test_output_dir ${MOREFEM_TEST_OUTPUT_DIR})
add_test(SolidPoissonWithoutYoung
MoReFEMTestSolidPoissonWithoutYoung
--root_dir ${MOREFEM_ROOT}
--test_output_dir ${MOREFEM_TEST_OUTPUT_DIR})
......
-- Comment lines are introduced by "--".
-- In a section (i.e. within braces), all entries must be separated by a comma.
Solid = {
VolumicMass = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "constant",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 10.4
}, -- VolumicMass
HyperelasticBulk = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "constant",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 1750000.
}, -- HyperelasticBulk
Kappa1 = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "constant",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 500.
}, -- Kappa1
Kappa2 = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "constant",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 403346.1538461538,
}, -- Kappa2
PoissonRatio = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "constant",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = .3
}, -- PoissonRatio
YoungModulus = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "constant",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 21.e5
}, -- YoungModulus
LameLambda = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "ignore",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 1211538.4615384615,
}, -- LameLambda
LameMu = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "ignore",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 807692.3076923076,
}, -- LameMu
Viscosity = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "constant",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 8.
}, -- Viscosity
Mu1 = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "constant",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 9.
}, -- Mu1
Mu2 = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "constant",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 10.
}, -- Mu2
C0 = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "constant",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 11.
}, -- C0
C1 = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "constant",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 12.
}, -- C1
C2 = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "constant",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 13.
}, -- C2
C3 = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "constant",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 14.
}, -- C3
-- For 2D operators, which approximation to use.
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'irrelevant', 'plane_strain', 'plane_stress'})
PlaneStressStrain = "plane_strain"
} -- Solid
Result = {
-- Directory in which all the results will be written. This path may use the environment variable
-- MOREFEM_RESULT_DIR, which is either provided in user's environment or automatically set to
-- '/Volumes/Data/${USER}/MoReFEM/Results' in MoReFEM initialization step. Please do not read this value
-- directly: it might have been extended in MoReFEMData class! Rather call the GetResultDirectory() from
-- this class.
-- Expected format: "VALUE"
output_directory = "${MOREFEM_TEST_OUTPUT_DIR}/Test/ParameterInstances/Solid",
-- Enables to skip some printing in the console. Can be used to WriteSolution every n time.
-- Expected format: VALUE
-- Constraint: v > 0
display_value = 1
} -- Result
-- Comment lines are introduced by "--".
-- In a section (i.e. within braces), all entries must be separated by a comma.
Solid = {
VolumicMass = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'ignore', 'constant', 'lua_function','piecewise_constant_by_domain'})
nature = "constant",
-- The value for the parameter, which type depends directly on the nature chosen:
-- If nature is 'constant', expected format is VALUE
-- If nature is 'piecewise_constant_by_domain', expected format is {[KEY1] = VALUE1, [KEY2] = VALUE2, ...}
-- If nature is 'lua_function', expected format is a Lua function with prototype function(x, y, z)
-- return x + y - z
-- end
-- where x, y and z are global coordinates. sin, cos, tan, exp and so forth require a 'math.' preffix.
-- Expected format: see the variant description...
value = 10.4
}, -- VolumicMass
HyperelasticBulk = {
-- How is given the parameter (as a constant, as a Lua function, per quadrature point, etc...). Choose
-- "ignore" if you do not want this parameter (in this case it will stay at nullptr).
-- Expected format: "VALUE"