Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit 3db6e306 authored by Gautier Bureau's avatar Gautier Bureau Committed by GILLES Sebastien
Browse files

#884 Working on the new formulation but not working. Viscoelasticity policy...

#884 Working on the new formulation but not working. Viscoelasticity policy changed but not reported in all models.

Code review: SCons target all works here (With CardiacMechanics models out of the loop).
parent 612f133e
......@@ -43,12 +43,12 @@ NumberingSubset1 = {
}
-- NumberingSubset
-- NumberingSubset2
NumberingSubset2 = {
-- Name of the numbering subset (not really used; at the moment I just need one input parameter to ground
-- the possible values to choose elsewhere).
-- Expected format: "VALUE"
name = "displacement_velocity",
name = "velocity",
-- Whether a vector defined on this numbering subset might be used to compute a movemesh. If true, a
-- FEltSpace featuring this numbering subset will compute additional quantities to enable fast computation.
......@@ -61,6 +61,22 @@ NumberingSubset2 = {
-- NumberingSubset3
NumberingSubset3 = {
-- Name of the numbering subset (not really used; at the moment I just need one input parameter to ground
-- the possible values to choose elsewhere).
-- Expected format: "VALUE"
name = "monolithic_displacement_velocity",
-- Whether a vector defined on this numbering subset might be used to compute a movemesh. If true, a
-- FEltSpace featuring this numbering subset will compute additional quantities to enable fast computation.
-- This should be false for most numbering subsets, and when it's true the sole unknown involved should be a
-- displacement.
-- Expected format: 'true' or 'false' (without the quote)
do_move_mesh = false
}
-- NumberingSubset4
NumberingSubset4 = {
-- Name of the numbering subset (not really used; at the moment I just need one input parameter to ground
-- the possible values to choose elsewhere).
-- Expected format: "VALUE"
......@@ -87,8 +103,8 @@ Unknown1 = {
nature = "vectorial",
}
-- Unknown2: velocity_displacement.
Unknown1 = {
-- Unknown2: solid_velocity.
Unknown2 = {
-- Name of the unknown (used for displays in output).
-- Expected format: "VALUE"
name = "solid_velocity",
......@@ -294,11 +310,10 @@ FiniteElementSpace1 = {
-- List of the shape function to use for each unknown;
-- Expected format: {"VALUE1", "VALUE2", ...}
shape_function_list = {"P1", "P1", "P1"},
-- List of the numbering subset to use for each unknown;
-- Expected format: {VALUE1, VALUE2, ...}
numbering_subset_list = { 1 , 2}
numbering_subset_list = { 1 , 2, 4}
}
-- FiniteElementSpace2
......@@ -307,6 +322,31 @@ FiniteElementSpace2 = {
-- Expected format: VALUE
god_of_dof_index = 1,
-- Index of the domain onto which the finite element space is defined. This domain must be unidimensional.
-- Expected format: VALUE
domain_index = 1,
-- List of all unknowns defined in the finite element space. Unknowns here must be defined in this file as
-- an 'Unknown' block; expected name/identifier is the name given there.
-- Expected format: {"VALUE1", "VALUE2", ...}
unknown_list = {"solid_displacement", "solid_velocity", "electrical_activation"},
-- List of the shape function to use for each unknown;
-- Expected format: {"VALUE1", "VALUE2", ...}
shape_function_list = {"P1", "P1", "P1"},
-- List of the numbering subset to use for each unknown;
-- Expected format: {VALUE1, VALUE2, ...}
numbering_subset_list = { 3 , 3, 4}
}
-- FiniteElementSpace3
FiniteElementSpace3 = {
-- Index of the god of dof into which the finite element space is defined.
-- Expected format: VALUE
god_of_dof_index = 1,
-- Index of the domain onto which the finite element space is defined. This domain must be unidimensional.
-- Expected format: VALUE
domain_index = 2,
......@@ -367,6 +407,48 @@ Petsc1 = {
} -- Petsc1
Petsc2 = {
-- Absolute tolerance
-- Expected format: {VALUE1, VALUE2, ...}
-- Constraint: v > 0.
absoluteTolerance = 1e-10,
-- gmresStart
-- Expected format: {VALUE1, VALUE2, ...}
-- Constraint: v >= 0
gmresRestart = 200,
-- Maximum iteration
-- Expected format: {VALUE1, VALUE2, ...}
-- Constraint: v > 0
maxIteration = 20,
-- List of preconditioner: { none jacobi sor lu bjacobi ilu asm cholesky }.
-- To use mumps:
-- preconditioner = lu
-- Expected format: {"VALUE1", "VALUE2", ...}
-- Constraint: ops_in(v, 'lu')
preconditioner = 'lu',
-- Relative tolerance
-- Expected format: {VALUE1, VALUE2, ...}
-- Constraint: v > 0.
relativeTolerance = 1e-6,
-- Step size tolerance
-- Expected format: {VALUE1, VALUE2, ...}
-- Constraint: v > 0.
stepSizeTolerance = 1e-8,
-- List of solver: { chebychev cg gmres preonly bicg python };
-- To use Mumps choose preonly.
-- Expected format: {"VALUE1", "VALUE2", ...}
-- Constraint: ops_in(v, {'Mumps', 'Umfpack'})
solver = 'Mumps',
} -- Petsc2
Solid = {
-- For 2D operators, which approximation to use.
-- Expected format: "VALUE"
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1318EDFE1CAEC0AF005F2579"
BuildableName = "CardiacMechanicsPrestress"
BlueprintName = "CardiacMechanicsPrestress"
ReferencedContainer = "container:HappyHeart.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1318EDFE1CAEC0AF005F2579"
BuildableName = "CardiacMechanicsPrestress"
BlueprintName = "CardiacMechanicsPrestress"
ReferencedContainer = "container:HappyHeart.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<PathRunnable
runnableDebuggingMode = "0"
FilePath = "/Users/Shared/LibraryVersions/clang/Openmpi/bin/orterun">
</PathRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1318EDFE1CAEC0AF005F2579"
BuildableName = "CardiacMechanicsPrestress"
BlueprintName = "CardiacMechanicsPrestress"
ReferencedContainer = "container:HappyHeart.xcodeproj">
</BuildableReference>
</MacroExpansion>
<CommandLineArguments>
<CommandLineArgument
argument = "-np 2"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "$(BUILT_PRODUCTS_DIR)/CardiacMechanicsPrestress"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "--input_parameters ${HOME}/Codes/HappyHeart/Data/Lua/demo_input_cardiac_mechanics_prestress.lua"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1318EDFE1CAEC0AF005F2579"
BuildableName = "CardiacMechanicsPrestress"
BlueprintName = "CardiacMechanicsPrestress"
ReferencedContainer = "container:HappyHeart.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1318EDFE1CAEC0AF005F2579"
BuildableName = "CardiacMechanicsPrestress"
BlueprintName = "CardiacMechanicsPrestress"
ReferencedContainer = "container:HappyHeart.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1318EDFE1CAEC0AF005F2579"
BuildableName = "CardiacMechanicsPrestress"
BlueprintName = "CardiacMechanicsPrestress"
ReferencedContainer = "container:HappyHeart.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1318EDFE1CAEC0AF005F2579"
BuildableName = "CardiacMechanicsPrestress"
BlueprintName = "CardiacMechanicsPrestress"
ReferencedContainer = "container:HappyHeart.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "--input_parameters ${HOME}/Codes/HappyHeart/Data/Lua/demo_input_cardiac_mechanics_prestress.lua"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1318EDFE1CAEC0AF005F2579"
BuildableName = "CardiacMechanicsPrestress"
BlueprintName = "CardiacMechanicsPrestress"
ReferencedContainer = "container:HappyHeart.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
......@@ -42,7 +42,7 @@
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
......@@ -61,6 +61,12 @@
ReferencedContainer = "container:HappyHeart.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "--input_parameters ${HOME}/Codes/HappyHeart/Data/Lua/demo_input_cardiac_mechanics_prestress_displacement_velocity_formulation.lua"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BE3B37221D91846C00DB81A3"
BuildableName = "Ensight4CardiacMechanicsPrestress"
BlueprintName = "Ensight4CardiacMechanicsPrestress"
ReferencedContainer = "container:HappyHeart.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BE3B37221D91846C00DB81A3"
BuildableName = "Ensight4CardiacMechanicsPrestress"
BlueprintName = "Ensight4CardiacMechanicsPrestress"
ReferencedContainer = "container:HappyHeart.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BE3B37221D91846C00DB81A3"
BuildableName = "Ensight4CardiacMechanicsPrestress"
BlueprintName = "Ensight4CardiacMechanicsPrestress"
ReferencedContainer = "container:HappyHeart.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "--input_parameters ${HOME}/Codes/HappyHeart/Data/Lua/demo_input_cardiac_mechanics_prestress.lua"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BE3B37221D91846C00DB81A3"
BuildableName = "Ensight4CardiacMechanicsPrestress"
BlueprintName = "Ensight4CardiacMechanicsPrestress"
ReferencedContainer = "container:HappyHeart.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
......@@ -54,7 +54,8 @@ namespace HappyHeart
enum class FEltSpaceIndex
{
highest_dimension = 1,
surface_pressure = 2
monolithic = 2,
surface_pressure = 3
};
......@@ -68,7 +69,8 @@ namespace HappyHeart
enum class SolverIndex
{
solver = 1
displacement = 1,
monolithic = 2
};
......@@ -76,7 +78,7 @@ namespace HappyHeart
{
displacement = 1,
velocity = 2,
displacement_velocity = 3,
monolithic_displacement_velocity = 3,
electrical_activation = 4
};
......@@ -99,7 +101,7 @@ namespace HappyHeart
InputParameter::NumberingSubset<EnumUnderlyingType(NumberingSubsetIndex::displacement)>,
InputParameter::NumberingSubset<EnumUnderlyingType(NumberingSubsetIndex::velocity)>,
InputParameter::NumberingSubset<EnumUnderlyingType(NumberingSubsetIndex::displacement_velocity)>,
InputParameter::NumberingSubset<EnumUnderlyingType(NumberingSubsetIndex::monolithic_displacement_velocity)>,
InputParameter::NumberingSubset<EnumUnderlyingType(NumberingSubsetIndex::electrical_activation)>,
InputParameter::Unknown<EnumUnderlyingType(UnknownIndex::displacement)>,
......@@ -116,9 +118,11 @@ namespace HappyHeart
InputParameter::DirichletBoundaryCondition<EnumUnderlyingType(BoundaryConditionIndex::velocity)>,
InputParameter::FEltSpace<EnumUnderlyingType(FEltSpaceIndex::highest_dimension)>,
InputParameter::FEltSpace<EnumUnderlyingType(FEltSpaceIndex::monolithic)>,
InputParameter::FEltSpace<EnumUnderlyingType(FEltSpaceIndex::surface_pressure)>,
InputParameter::Petsc<EnumUnderlyingType(SolverIndex::solver)>,
InputParameter::Petsc<EnumUnderlyingType(SolverIndex::displacement)>,
InputParameter::Petsc<EnumUnderlyingType(SolverIndex::monolithic)>,
InputParameter::Solid,
InputParameter::Solid::PlaneStressStrain,
......
......@@ -42,8 +42,8 @@ namespace HappyHeart
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::displacement));
const auto& velocity_numbering_subset =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::velocity));
const auto& displacement_velocity_numbering_subset =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::displacement_velocity));
const auto& monolithic_displacement_velocity_numbering_subset =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::monolithic_displacement_velocity));
const auto& electrical_activation_numbering_subset =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::electrical_activation));
......@@ -51,46 +51,29 @@ namespace HappyHeart
std::make_unique<VariationalFormulation>(MpiHappyHeart(),
displacement_numbering_subset,
velocity_numbering_subset,
displacement_velocity_numbering_subset,
monolithic_displacement_velocity_numbering_subset,
electrical_activation_numbering_subset,
GetTimeManager(),
god_of_dof,
std::move(bc_list));
}
auto& formulation = GetNonCstVariationalFormulation();
auto& variational_formulation = GetNonCstVariationalFormulation();
formulation.SetStaticAndOrDynamic(VariationalFormulation::StaticAndOrDynamic::static_and_dynamic_case);
variational_formulation.SetStaticAndOrDynamic(VariationalFormulation::StaticAndOrDynamic::static_and_dynamic_case);
formulation.Init(input_parameter_data);
variational_formulation.Init(input_parameter_data);
const auto& displacement_numbering_subset_ptr = god_of_dof.GetNumberingSubsetPtr(EnumUnderlyingType(NumberingSubsetIndex::displacement));
const auto& displacement_numbering_subset = *displacement_numbering_subset_ptr;
if (formulation.GetStaticAndOrDynamic() == VariationalFormulation::StaticAndOrDynamic::static_case || formulation.GetStaticAndOrDynamic() == VariationalFormulation::StaticAndOrDynamic::static_and_dynamic_case)
if (variational_formulation.GetStaticAndOrDynamic() == VariationalFormulation::StaticAndOrDynamic::static_case || variational_formulation.GetStaticAndOrDynamic() == VariationalFormulation::StaticAndOrDynamic::static_and_dynamic_case)
{
const auto& mpi = MpiHappyHeart();
Wrappers::Petsc::PrintMessageOnFirstProcessor("\n----------------------------------------------\n",
mpi, __FILE__, __LINE__);
Wrappers::Petsc::PrintMessageOnFirstProcessor("Static problem\n",
mpi, __FILE__, __LINE__);
Wrappers::Petsc::PrintMessageOnFirstProcessor("----------------------------------------------\n",
mpi, __FILE__, __LINE__);