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 50e0e0c1 authored by Gautier Bureau's avatar Gautier Bureau Committed by GILLES Sebastien
Browse files

#884 New formulation working in sequential. Parallel still not sure.

parent 3db6e306
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1343EC271CC4D942009F854F"
BuildableName = "CardiacMechanicsPrestressDisplacementVelocityFormulation"
BlueprintName = "CardiacMechanicsPrestressDisplacementVelocityFormulation"
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 = "1343EC271CC4D942009F854F"
BuildableName = "CardiacMechanicsPrestressDisplacementVelocityFormulation"
BlueprintName = "CardiacMechanicsPrestressDisplacementVelocityFormulation"
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 = "1343EC271CC4D942009F854F"
BuildableName = "CardiacMechanicsPrestressDisplacementVelocityFormulation"
BlueprintName = "CardiacMechanicsPrestressDisplacementVelocityFormulation"
ReferencedContainer = "container:HappyHeart.xcodeproj">
</BuildableReference>
</MacroExpansion>
<CommandLineArguments>
<CommandLineArgument
argument = "-np 4"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "$(BUILT_PRODUCTS_DIR)/CardiacMechanicsPrestressDisplacementVelocityFormulation"
isEnabled = "YES">
</CommandLineArgument>
<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>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1343EC271CC4D942009F854F"
BuildableName = "CardiacMechanicsPrestressDisplacementVelocityFormulation"
BlueprintName = "CardiacMechanicsPrestressDisplacementVelocityFormulation"
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 = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
......
......@@ -87,9 +87,12 @@ namespace HappyHeart
HyperelasticLawNS::CiarletGeymonat
>;
//! Alias to the viscoelasticity derivate policy used.
using ViscoelasticityDerivate = LocalVariationalOperatorNS::SecondPiolaKirchhoffStressTensorNS::ViscoelasticityPolicyNS::DerivatesWithRespectTo;
//! Alias to the viscoelasticity policy used.
using ViscoelasticityPolicy =
GlobalVariationalOperatorNS::SecondPiolaKirchhoffStressTensorNS::ViscoelasticityPolicyNS::Viscoelasticity;
GlobalVariationalOperatorNS::SecondPiolaKirchhoffStressTensorNS::ViscoelasticityPolicyNS::Viscoelasticity<ViscoelasticityDerivate::displacement_and_velocity>;
//! Alias to the active stress policy used.
using ActiveStressPolicy =
......
......@@ -85,10 +85,10 @@ namespace HappyHeart
using HyperelasticityLaw =
GlobalVariationalOperatorNS::SecondPiolaKirchhoffStressTensorNS::HyperelasticLawNS::CiarletGeymonat;
//!
//! Alias to the viscoelasticity derivate policy used.
using ViscoelasticityDerivate = LocalVariationalOperatorNS::SecondPiolaKirchhoffStressTensorNS::ViscoelasticityPolicyNS::DerivatesWithRespectTo;
//! Alias to the viscoelasticity policy used.
//! Alias to the viscoelasticity in displacement policy used.
using ViscoelasticityDisplacementPolicy =
GlobalVariationalOperatorNS::SecondPiolaKirchhoffStressTensorNS::ViscoelasticityPolicyNS::Viscoelasticity<ViscoelasticityDerivate::displacement>;
......@@ -108,7 +108,7 @@ namespace HappyHeart
using ActiveStressNone =
GlobalVariationalOperatorNS::SecondPiolaKirchhoffStressTensorNS::ActiveStressPolicyNS::None;
//! Alias to the viscoelasticity policy used.
//! Alias to the viscoelasticity in velocity policy used.
using ViscoelasticityVelocityPolicy =
GlobalVariationalOperatorNS::SecondPiolaKirchhoffStressTensorNS::ViscoelasticityPolicyNS::Viscoelasticity<ViscoelasticityDerivate::velocity>;
......@@ -444,16 +444,16 @@ namespace HappyHeart
//! Get the find coords of global vector operator.
const FindCoordsOfGlobalVector& GetFindCoordsOfGlobalVectorOperator() const noexcept;
//!
//! Constant accessor to the monolithic to displacement interpolator.
const ConformInterpolatorNS::SubsetOrSuperset& GetMonolithicDisplacementVelocityToDisplacementInterpolator() const noexcept;
//! Constant accessor to
//! Constant accessor to the monolithic to velocity interpolator.
const ConformInterpolatorNS::SubsetOrSuperset& GetMonolithicDisplacementVelocityToVelocityInterpolator() const noexcept;
//! Constant accessor to
//! Constant accessor to the displacement to monolithic interpolator.
const ConformInterpolatorNS::SubsetOrSuperset& GetDisplacementToMonolithicDisplacementVelocityInterpolator() const noexcept;
//! Constant accessor to
//! Constant accessor to the velocity to monolithic interpolator.
const ConformInterpolatorNS::SubsetOrSuperset& GetVelocityToMonolithicDisplacementVelocityInterpolator() const noexcept;
private:
......@@ -486,7 +486,6 @@ namespace HappyHeart
/// \name Global interpolation operators.
///@{
ConformInterpolatorNS::SubsetOrSuperset::unique_ptr
monolithic_displacement_velocity_to_displacement_interpolator_ = nullptr;
......@@ -556,10 +555,18 @@ namespace HappyHeart
GlobalMatrix& GetNonCstMatrixIntermediateDisplacementToMonolithic() noexcept;
const GlobalMatrix& GetMatrixIntermediateDisplacementToMonolithic2() const noexcept;
GlobalMatrix& GetNonCstMatrixIntermediateDisplacementToMonolithic2() noexcept;
const GlobalMatrix& GetMatrixIntermediateVelocityToMonolithic() const noexcept;
GlobalMatrix& GetNonCstMatrixIntermediateVelocityToMonolithic() noexcept;
const GlobalMatrix& GetMatrixIntermediateVelocityToMonolithic2() const noexcept;
GlobalMatrix& GetNonCstMatrixIntermediateVelocityToMonolithic2() noexcept;
const GlobalVector& GetVectorFollowingPressureResidual() const noexcept;
......@@ -605,10 +612,6 @@ namespace HappyHeart
GlobalVector& GetNonCstVectorDiffDisplacement() noexcept;
const GlobalVector& GetVectorNewmarkResidual() const noexcept;
GlobalVector& GetNonCstVectorNewmarkResidual() noexcept;
const GlobalVector& GetVectorMonolithicDisplacementVelocityAtNewtonIteration() const noexcept;
GlobalVector& GetNonCstVectorMonolithicDisplacementVelocityAtNewtonIteration() noexcept;
......@@ -650,6 +653,11 @@ namespace HappyHeart
//! Constant accessor to velocity_.
double GetVelocity() const noexcept;
private:
//! Non constant accessor to the static solver.
Wrappers::Petsc::Snes& GetNonCstDisplacementSolver() noexcept;
private:
/*!
......@@ -714,32 +722,34 @@ namespace HappyHeart
//! Matrix displacement linear stiffness.
GlobalMatrix::unique_ptr matrix_velocity_linear_stiffness_ = nullptr;
//!
//! Matrix monolithic used for intermediate computation.
GlobalMatrix::unique_ptr matrix_monolithic_global_ = nullptr;
//!
//! Matrix monolithic used for intermediate computation.
GlobalMatrix::unique_ptr matrix_monolithic_global_2_ = nullptr;
//!
GlobalMatrix::unique_ptr matrix_monolithic_mass_per_square_time_step_velocity_velocity_ = nullptr;
//!
//! Matrix linear stiffness in monolithic in displacement displacement position.
GlobalMatrix::unique_ptr matrix_monolithic_linear_stiffness_displacement_displacement_ = nullptr;
//!
//! Matrix linear stiffness in monolithic in displacement velocity position.
GlobalMatrix::unique_ptr matrix_monolithic_linear_stiffness_displacement_velocity_ = nullptr;
//!
//! Matrix intermediate from displacement to monolithic.
GlobalMatrix::unique_ptr matrix_intermediate_displacement_to_monolithic_ = nullptr;
//!
//! Matrix intermediate from displacement to monolithic.
GlobalMatrix::unique_ptr matrix_intermediate_displacement_to_monolithic_2_ = nullptr;
//! Matrix intermediate from velocity to monolithic.
GlobalMatrix::unique_ptr matrix_intermediate_velocity_to_monolithic_ = nullptr;
//! Matrix intermediate from divelocitysplacement to monolithic.
GlobalMatrix::unique_ptr matrix_intermediate_velocity_to_monolithic_2_ = nullptr;
//! Evaluation state of the residual of the problem (only useful in SNES method)
//! Vector displacement at newton iteration.
GlobalVector::unique_ptr vector_displacement_at_newton_iteration_ = nullptr;
//! Evaluation state of the residual of the problem (only useful in SNES method)
//! Vector velocity at newton iteration.
GlobalVector::unique_ptr vector_velocity_at_newton_iteration_ = nullptr;
//! Velocity from previous time iteration.
......@@ -748,13 +758,13 @@ namespace HappyHeart
//! Displacement from previous time iteration.
GlobalVector::unique_ptr vector_displacement_previous_time_iteration_ = nullptr;
//!
//! Vector monolithic displacement and velocity from previous time iteration.
GlobalVector::unique_ptr vector_monolithic_displacement_velocity_previous_time_iteration_ = nullptr;
//! Midpoint position.
GlobalVector::unique_ptr vector_midpoint_position_ = nullptr;
//!
//! Midpoint position in velocity numbering subset used for assembling an operator not in the same NS.
GlobalVector::unique_ptr vector_midpoint_position_in_velocity_numbering_subset_ = nullptr;
//! Difference displacement Yn+1 - Yn. Here just to avoid allocate it every time step.
......@@ -763,19 +773,16 @@ namespace HappyHeart
//! Midpoint velocity.
GlobalVector::unique_ptr vector_midpoint_velocity_ = nullptr;
//!
//! Midpoint velocity in displacement numbering subset used for assembling an operator not in the same NS.
GlobalVector::unique_ptr vector_midpoint_velocity_in_displacement_numbering_subset_ = nullptr;
//!
//! Vector midpoint monolithic.
GlobalVector::unique_ptr vector_midpoint_monolithic_displacement_velocity_ = nullptr;
//!
GlobalVector::unique_ptr vector_newmark_residual_ = nullptr;
//!
//! Vector monolithic at newton iteration.
GlobalVector::unique_ptr vector_monolithic_displacement_velocity_at_newton_iteration_ = nullptr;
//!
//! Vector monolithic used for intermdediate computation.
GlobalVector::unique_ptr vector_monolithic_global_ = nullptr;
///@}
......@@ -858,6 +865,11 @@ namespace HappyHeart
//! Velocity of the electrical activation. See ComputeElectricalActivationAtTime().
double velocity_;
private:
//! Static solver on the displacement.
Wrappers::Petsc::Snes::unique_ptr displacement_solver_ = nullptr;
private:
//! Enum class to define electrical activation parameters.
......@@ -877,13 +889,6 @@ namespace HappyHeart
//! Constant accessor to all the electrical parameters.
double GetElectricalActivationParameter(electrical_activation_parameter_index index) const noexcept;
private:
//!
Wrappers::Petsc::Snes& GetNonCstDisplacementSolver() noexcept;
//!
Wrappers::Petsc::Snes::unique_ptr displacement_solver_ = nullptr;
};
......
......@@ -250,6 +250,19 @@ namespace HappyHeart
}
inline const GlobalMatrix& VariationalFormulation::GetMatrixIntermediateDisplacementToMonolithic2() const noexcept
{
assert(!(!matrix_intermediate_displacement_to_monolithic_2_));
return *matrix_intermediate_displacement_to_monolithic_2_;
}
inline GlobalMatrix& VariationalFormulation::GetNonCstMatrixIntermediateDisplacementToMonolithic2() noexcept
{
return const_cast<GlobalMatrix&>(GetMatrixIntermediateDisplacementToMonolithic2());
}
inline const GlobalMatrix& VariationalFormulation::GetMatrixIntermediateVelocityToMonolithic() const noexcept
{
assert(!(!matrix_intermediate_velocity_to_monolithic_));
......@@ -263,6 +276,19 @@ namespace HappyHeart
}
inline const GlobalMatrix& VariationalFormulation::GetMatrixIntermediateVelocityToMonolithic2() const noexcept
{
assert(!(!matrix_intermediate_velocity_to_monolithic_2_));
return *matrix_intermediate_velocity_to_monolithic_2_;
}
inline GlobalMatrix& VariationalFormulation::GetNonCstMatrixIntermediateVelocityToMonolithic2() noexcept
{
return const_cast<GlobalMatrix&>(GetMatrixIntermediateVelocityToMonolithic2());
}
inline const GlobalVector& VariationalFormulation::GetVectorStiffnessResidual() const noexcept
{
assert(!(!vector_stiffness_residual_));
......@@ -418,19 +444,6 @@ namespace HappyHeart
}
inline const GlobalVector& VariationalFormulation::GetVectorNewmarkResidual() const noexcept
{
assert(!(!vector_newmark_residual_));
return *vector_newmark_residual_;
}
inline GlobalVector& VariationalFormulation::GetNonCstVectorNewmarkResidual() noexcept
{
return const_cast<GlobalVector&>(GetVectorNewmarkResidual());
}
inline const GlobalVector& VariationalFormulation::GetVectorMonolithicDisplacementVelocityAtNewtonIteration() const noexcept
{
assert(!(!vector_monolithic_displacement_velocity_at_newton_iteration_));
......
......@@ -526,7 +526,6 @@ namespace HappyHeart
// Complete the tangent matrix with the linear part!
Seldon::Add(1., linear_part, tangent_matrix);
break;
}
case OperatorNS::Nature::linear:
......
......@@ -272,7 +272,6 @@ namespace HappyHeart
const char* invoking_file, int invoking_line,
DoReuseMatrix do_reuse_matrix = DoReuseMatrix::no);
/*!
* \brief Creates a new matrix object that behaves like A'.
*
......
......@@ -343,7 +343,6 @@ namespace HappyHeart
}
} // switch
if (error_code)
throw ExceptionNS::Exception(error_code, "MatMatTransposeMult", invoking_file, invoking_line);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment