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

#718 FSI: Reorganize the code and add some comments.

parent 3d059490
......@@ -21,7 +21,7 @@ transient = {
-- Maximum time, if set to zero run a case.
-- Expected format: VALUE
-- Constraint: v >= 0.
timeMax = 1.5e-4
timeMax = 5.5e-4
} -- transient
......
......@@ -335,7 +335,6 @@
BE4ED31D1A2CBAC400DE374E /* MatrixOperations.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE4ED31A1A2CBAC400DE374E /* MatrixOperations.hpp */; };
BE4ED31E1A2CBAC400DE374E /* MatrixOperations.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE4ED31B1A2CBAC400DE374E /* MatrixOperations.hxx */; };
BE501D041A2DC03900B92486 /* MatrixOrVector.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE501D031A2DC03900B92486 /* MatrixOrVector.hpp */; };
BE5295461BD67DA900441303 /* VariationalFormulationElasticity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE5295431BD67DA900441303 /* VariationalFormulationElasticity.cpp */; settings = {ASSET_TAGS = (); }; };
BE58EB751B9087B1006899EA /* InitializeHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE58EB741B9087B1006899EA /* InitializeHelper.cpp */; };
BE58EB781B908827006899EA /* libModel.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE58EB4D1B908757006899EA /* libModel.a */; };
BE58EB7B1B90883E006899EA /* libModel.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE58EB4D1B908757006899EA /* libModel.a */; };
......@@ -466,7 +465,6 @@
BE64E4071B25B8A600DD48A0 /* TimeManager.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE64E4051B25B8A600DD48A0 /* TimeManager.hpp */; };
BE65A1D21BBD2B4E00E99115 /* ElasticityModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE63B4921A31C20E003A6523 /* ElasticityModel.cpp */; };
BE65A1D61BBD2B6B00E99115 /* libElasticity-lib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE65A1A81BBD2AFE00E99115 /* libElasticity-lib.a */; };
BE65A1E31BBD377C00E99115 /* Elasticity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE65A1E01BBD377C00E99115 /* Elasticity.cpp */; settings = {ASSET_TAGS = (); }; };
BE65A1E61BBD3CB600E99115 /* libElasticity-lib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE65A1A81BBD2AFE00E99115 /* libElasticity-lib.a */; };
BE65F6B01BA17D6600B14925 /* ComputePatternHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE65F6AD1BA17D6600B14925 /* ComputePatternHelper.cpp */; };
BE65F6B11BA17D6600B14925 /* ComputePatternHelper.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE65F6AE1BA17D6600B14925 /* ComputePatternHelper.hpp */; };
......@@ -1210,6 +1208,8 @@
BEFADE971B909581004DBBE9 /* libModel.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE58EB4D1B908757006899EA /* libModel.a */; };
BEFADE981B90958D004DBBE9 /* libOps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE43AD351AFB9ADB0082AF43 /* libOps.a */; };
BEFADE991B90958D004DBBE9 /* libSeldon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE781C051B0B582500DBE49F /* libSeldon.a */; };
BEFC2B301BD7D6770067F358 /* Policy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BEFC2B2A1BD7D6770067F358 /* Policy.cpp */; settings = {ASSET_TAGS = (); }; };
BEFC2B311BD7D6770067F358 /* VariationalFormulation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BEFC2B2D1BD7D6770067F358 /* VariationalFormulation.cpp */; settings = {ASSET_TAGS = (); }; };
BEFEEB6F1AFBA1F000C6341E /* libOps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE43AD351AFB9ADB0082AF43 /* libOps.a */; };
BEFEEB7F1AFBA21500C6341E /* libOps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE43AD351AFB9ADB0082AF43 /* libOps.a */; };
BEFEEB821AFBA21E00C6341E /* libOps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE43AD351AFB9ADB0082AF43 /* libOps.a */; };
......@@ -3645,9 +3645,6 @@
BE4FC35A18F2AE87007B6DED /* QuadratureRuleList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QuadratureRuleList.cpp; sourceTree = "<group>"; };
BE4FC35B18F2AE87007B6DED /* QuadratureRuleList.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = QuadratureRuleList.hpp; sourceTree = "<group>"; };
BE501D031A2DC03900B92486 /* MatrixOrVector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MatrixOrVector.hpp; sourceTree = "<group>"; };
BE5295431BD67DA900441303 /* VariationalFormulationElasticity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VariationalFormulationElasticity.cpp; path = SolidVariationalFormulationPolicy/VariationalFormulationElasticity.cpp; sourceTree = "<group>"; };
BE5295441BD67DA900441303 /* VariationalFormulationElasticity.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = VariationalFormulationElasticity.hpp; path = SolidVariationalFormulationPolicy/VariationalFormulationElasticity.hpp; sourceTree = "<group>"; };
BE5295451BD67DA900441303 /* VariationalFormulationElasticity.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = VariationalFormulationElasticity.hxx; path = SolidVariationalFormulationPolicy/VariationalFormulationElasticity.hxx; sourceTree = "<group>"; };
BE589C281A160ABD00D23130 /* UniqueId.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = UniqueId.hpp; path = Sources/Utilities/UniqueId/UniqueId.hpp; sourceTree = "<group>"; };
BE589C291A160ABD00D23130 /* UniqueId.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = UniqueId.hxx; path = Sources/Utilities/UniqueId/UniqueId.hxx; sourceTree = "<group>"; };
BE589C381A446A1200745D08 /* SConscript */ = {isa = PBXFileReference; explicitFileType = text.script.python; fileEncoding = 4; path = SConscript; sourceTree = "<group>"; };
......@@ -3798,9 +3795,6 @@
BE65A1A81BBD2AFE00E99115 /* libElasticity-lib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libElasticity-lib.a"; sourceTree = BUILT_PRODUCTS_DIR; };
BE65A1DD1BBD2C8F00E99115 /* Hyperelasticity.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Hyperelasticity.hpp; path = SolidVariationalFormulationPolicy/Hyperelasticity.hpp; sourceTree = "<group>"; };
BE65A1DE1BBD2C8F00E99115 /* Hyperelasticity.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Hyperelasticity.hxx; path = SolidVariationalFormulationPolicy/Hyperelasticity.hxx; sourceTree = "<group>"; };
BE65A1E01BBD377C00E99115 /* Elasticity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Elasticity.cpp; path = SolidVariationalFormulationPolicy/Elasticity.cpp; sourceTree = "<group>"; };
BE65A1E11BBD377C00E99115 /* Elasticity.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Elasticity.hpp; path = SolidVariationalFormulationPolicy/Elasticity.hpp; sourceTree = "<group>"; };
BE65A1E21BBD377C00E99115 /* Elasticity.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Elasticity.hxx; path = SolidVariationalFormulationPolicy/Elasticity.hxx; sourceTree = "<group>"; };
BE65F6AD1BA17D6600B14925 /* ComputePatternHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = ComputePatternHelper.cpp; path = Private/ComputePatternHelper.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
BE65F6AE1BA17D6600B14925 /* ComputePatternHelper.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = ComputePatternHelper.hpp; path = Private/ComputePatternHelper.hpp; sourceTree = "<group>"; };
BE65F6AF1BA17D6600B14925 /* ComputePatternHelper.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = ComputePatternHelper.hxx; path = Private/ComputePatternHelper.hxx; sourceTree = "<group>"; };
......@@ -4467,6 +4461,12 @@
BEF9835C180451CF00E7905D /* Factory.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Factory.hpp; sourceTree = "<group>"; };
BEFA212A17297DE800FA1E67 /* main_header_guards.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main_header_guards.cpp; path = Sources/Utilities/main_header_guards.cpp; sourceTree = SOURCE_ROOT; };
BEFA213017297E0000FA1E67 /* HeaderGuards */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = HeaderGuards; sourceTree = BUILT_PRODUCTS_DIR; };
BEFC2B2A1BD7D6770067F358 /* Policy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Policy.cpp; sourceTree = "<group>"; };
BEFC2B2B1BD7D6770067F358 /* Policy.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Policy.hpp; sourceTree = "<group>"; };
BEFC2B2C1BD7D6770067F358 /* Policy.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Policy.hxx; sourceTree = "<group>"; };
BEFC2B2D1BD7D6770067F358 /* VariationalFormulation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VariationalFormulation.cpp; sourceTree = "<group>"; };
BEFC2B2E1BD7D6770067F358 /* VariationalFormulation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = VariationalFormulation.hpp; sourceTree = "<group>"; };
BEFC2B2F1BD7D6770067F358 /* VariationalFormulation.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = VariationalFormulation.hxx; sourceTree = "<group>"; };
BEFF48FC1859C519005BB48A /* TestInputOutputMesh */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TestInputOutputMesh; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
 
......@@ -6156,14 +6156,9 @@
BE65A1D71BBD2C1200E99115 /* SolidVariationalFormulationPolicy */ = {
isa = PBXGroup;
children = (
BEFC2B291BD7D6770067F358 /* Elasticity */,
BE65A1DD1BBD2C8F00E99115 /* Hyperelasticity.hpp */,
BE65A1DE1BBD2C8F00E99115 /* Hyperelasticity.hxx */,
BE65A1E01BBD377C00E99115 /* Elasticity.cpp */,
BE65A1E11BBD377C00E99115 /* Elasticity.hpp */,
BE65A1E21BBD377C00E99115 /* Elasticity.hxx */,
BE5295431BD67DA900441303 /* VariationalFormulationElasticity.cpp */,
BE5295441BD67DA900441303 /* VariationalFormulationElasticity.hpp */,
BE5295451BD67DA900441303 /* VariationalFormulationElasticity.hxx */,
);
name = SolidVariationalFormulationPolicy;
sourceTree = "<group>";
......@@ -7917,6 +7912,20 @@
path = src/Utilities/src/Utilities/HeaderGuards;
sourceTree = SOURCE_ROOT;
};
BEFC2B291BD7D6770067F358 /* Elasticity */ = {
isa = PBXGroup;
children = (
BEFC2B2A1BD7D6770067F358 /* Policy.cpp */,
BEFC2B2B1BD7D6770067F358 /* Policy.hpp */,
BEFC2B2C1BD7D6770067F358 /* Policy.hxx */,
BEFC2B2D1BD7D6770067F358 /* VariationalFormulation.cpp */,
BEFC2B2E1BD7D6770067F358 /* VariationalFormulation.hpp */,
BEFC2B2F1BD7D6770067F358 /* VariationalFormulation.hxx */,
);
name = Elasticity;
path = SolidVariationalFormulationPolicy/Elasticity;
sourceTree = "<group>";
};
/* End PBXGroup section */
 
/* Begin PBXHeadersBuildPhase section */
......@@ -10174,12 +10183,12 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BE65A1E31BBD377C00E99115 /* Elasticity.cpp in Sources */,
BEFC2B301BD7D6770067F358 /* Policy.cpp in Sources */,
BEC57D351B909F3400F0F4B4 /* ExplicitStepVariationalFormulation.cpp in Sources */,
BEC57D371B909F3400F0F4B4 /* InputParameter.cpp in Sources */,
BE5295461BD67DA900441303 /* VariationalFormulationElasticity.cpp in Sources */,
BEC57D381B909F3400F0F4B4 /* main.cpp in Sources */,
BEC57D361B909F3400F0F4B4 /* ImplicitStepFluidVariationalFormulation.cpp in Sources */,
BEFC2B311BD7D6770067F358 /* VariationalFormulation.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -13440,15 +13449,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
BEA9608A1BD4D3EF00A2E77B /* Build configuration list for PBXNativeTarget "FSI_EI_2_meshes" */ = {
isa = XCConfigurationList;
buildConfigurations = (
BEA960881BD4D3EF00A2E77B /* Debug */,
BEA960891BD4D3EF00A2E77B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
BEA9CB9B1A1E25DD003A6276 /* Build configuration list for PBXNativeTarget "TestColoring" */ = {
isa = XCConfigurationList;
buildConfigurations = (
......
......@@ -7,8 +7,8 @@
//
#ifndef HAPPY_HEART_x_CORE_x_INPUT_PARAMETER_x_PARAMETER_x_DIFFUSION_x_TENSOR_HXX_
# define HAPPY_HEART_x_CORE_x_INPUT_PARAMETER_x_PARAMETER_x_DIFFUSION_x_TENSOR_HXX_
#ifndef HAPPY_HEART_x_CORE_x_INPUT_PARAMETER_x_PARAMETER_x_DIFFUSION_x_DIFFUSION_HXX_
# define HAPPY_HEART_x_CORE_x_INPUT_PARAMETER_x_PARAMETER_x_DIFFUSION_x_DIFFUSION_HXX_
namespace HappyHeart
{
......@@ -38,4 +38,4 @@ namespace HappyHeart
} // namespace HappyHeart
#endif // HAPPY_HEART_x_CORE_x_INPUT_PARAMETER_x_PARAMETER_x_DIFFUSION_x_TENSOR_HXX_
#endif // HAPPY_HEART_x_CORE_x_INPUT_PARAMETER_x_PARAMETER_x_DIFFUSION_x_DIFFUSION_HXX_
......@@ -6,7 +6,7 @@
// Copyright © 2015 Inria. All rights reserved.
//
#include "ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/Elasticity.hpp"
#include "ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/Elasticity/Policy.hpp"
namespace HappyHeart
......
......@@ -6,13 +6,13 @@
// Copyright © 2015 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_HPP_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_HPP_
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_x_POLICY_HPP_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_x_POLICY_HPP_
# include <memory>
# include <vector>
# include "ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/VariationalFormulationElasticity.hpp"
# include "ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/Elasticity/VariationalFormulation.hpp"
# include "ModelInstances/FSI_EI/InputParameterList.hpp"
......@@ -80,7 +80,8 @@ namespace HappyHeart
* \param[in] god_of_dof God of dof into which the formulation works.
* \param[in] main_felt_space Finite element space upon which the variational formulation apply.
* \param[in] solid_displacement Unknown considered; it should be a solid displacement.
* \param[in] dof_source_policy_args Supplementary arguments that might be required by the DofSourcePolicyT.
* \param[in] dof_source Contribution to the RHS that stems from the solution of the fluid variational
* formulations.
*
*/
void CreateSolidFormulation(const Wrappers::Mpi& mpi,
......@@ -96,7 +97,13 @@ namespace HappyHeart
//! Call the appropriate solver to deal with the equation.
void Solve();
//! Action to do in the variational formulation when Model::FinalizeStep() is called.
/*!
* \brief Action to do in the variational formulation when Model::FinalizeStep() is called
*
* \param[in] newest_displacement Displacement that has just been computed at the end of the implicit
* loop.
* \param[in] former_displacement Actually the \a newest_displacement obtained one time iteration ago.
*/
void FinalizeStepForFormulation(const GlobalVector& newest_displacement,
const GlobalVector& former_displacement,
const std::string& output_dir);
......@@ -127,7 +134,7 @@ namespace HappyHeart
} // namespace HappyHeart
# include "ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/Elasticity.hxx"
# include "ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/Elasticity/Policy.hxx"
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_HPP_
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_x_POLICY_HPP_
......@@ -6,8 +6,8 @@
// Copyright © 2015 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_HXX_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_HXX_
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_x_POLICY_HXX_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_x_POLICY_HXX_
namespace HappyHeart
......@@ -48,4 +48,4 @@ namespace HappyHeart
} // namespace HappyHeart
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_HXX_
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_x_POLICY_HXX_
......@@ -8,7 +8,7 @@
#include "Parameters/InitParameter.hpp"
#include "ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/VariationalFormulationElasticity.hpp"
#include "ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/Elasticity/VariationalFormulation.hpp"
#include "ModelInstances/FSI_EI/InputParameterList.hpp"
......@@ -112,8 +112,8 @@ namespace HappyHeart
mass_ = std::make_unique<GlobalMatrix>(system_matrix);
stiffness_ = std::make_unique<GlobalMatrix>(system_matrix);
matrix_current_displacement_ = std::make_unique<GlobalMatrix>(system_matrix);
matrix_current_velocity_ = std::make_unique<GlobalMatrix>(system_matrix);
matrix_displacement = std::make_unique<GlobalMatrix>(system_matrix);
matrix_velocity_ = std::make_unique<GlobalMatrix>(system_matrix);
vector_velocity_previous_time_iteration_ = std::make_unique<GlobalVector>(system_rhs);
fixed_contribution_to_rhs_ = std::make_unique<GlobalVector>(system_rhs);
......@@ -241,8 +241,8 @@ namespace HappyHeart
{
const auto& displacement_matrix = GetMatrixCurrentDisplacement();
const auto& velocity_matrix = GetMatrixCurrentVelocity();
const auto& displacement_matrix = GetMatrixDisplacement();
const auto& velocity_matrix = GetMatrixVelocity();
Wrappers::Petsc::MatMult(displacement_matrix, newest_displacement,
......
......@@ -6,8 +6,8 @@
// Copyright © 2015 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_NEW_ELASTICITY_HPP_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_NEW_ELASTICITY_HPP_
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_x_VARIATIONAL_FORMULATION_HPP_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_x_VARIATIONAL_FORMULATION_HPP_
# include <memory>
......@@ -109,7 +109,11 @@ namespace HappyHeart
//! Finite element space upon which the variational formulation apply.
const FEltSpace& GetFEltSpace() const noexcept;
//! Update data from previous time iteration.
/*!
* \brief Update data from previous time iteration.
*
* \param[in] newest_displacement Displacement
*/
void UpdatePreviousTimeIterationData(const GlobalVector& newest_displacement,
const GlobalVector& former_displacement,
const std::string& output_dir);
......@@ -172,13 +176,11 @@ namespace HappyHeart
const GlobalMatrix& GetMatrixCurrentDisplacement() const noexcept;
public: //todo #691
const GlobalMatrix& GetMatrixDisplacement() const noexcept;
GlobalMatrix& GetNonCstMatrixCurrentDisplacement() noexcept;
const GlobalMatrix& GetMatrixCurrentVelocity() const noexcept;
const GlobalMatrix& GetMatrixVelocity() const noexcept;
GlobalMatrix& GetNonCstMatrixCurrentVelocity() noexcept;
......@@ -250,10 +252,10 @@ namespace HappyHeart
GlobalVector::unique_ptr fixed_contribution_to_rhs_ = nullptr;
//! Matrix current displacement.
GlobalMatrix::unique_ptr matrix_current_displacement_ = nullptr;
GlobalMatrix::unique_ptr matrix_displacement = nullptr;
//! Matrix current velocity.
GlobalMatrix::unique_ptr matrix_current_velocity_ = nullptr;
GlobalMatrix::unique_ptr matrix_velocity_ = nullptr;
//! Mass matrix.
GlobalMatrix::unique_ptr mass_ = nullptr;
......@@ -301,7 +303,7 @@ namespace HappyHeart
} // namespace HappyHeart
# include "ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/VariationalFormulationElasticity.hxx"
# include "ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/Elasticity/VariationalFormulation.hxx"
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_NEW_ELASTICITY_HPP_
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_x_VARIATIONAL_FORMULATION_HPP_
......@@ -6,8 +6,8 @@
// Copyright © 2015 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_NEW_ELASTICITY_HXX_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_NEW_ELASTICITY_HXX_
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_x_VARIATIONAL_FORMULATION_HXX_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_x_VARIATIONAL_FORMULATION_HXX_
namespace HappyHeart
......@@ -76,10 +76,10 @@ namespace HappyHeart
inline const GlobalMatrix& VariationalFormulationElasticity
::GetMatrixCurrentDisplacement() const noexcept
::GetMatrixDisplacement() const noexcept
{
assert(!(!matrix_current_displacement_));
return *matrix_current_displacement_;
assert(!(!matrix_displacement));
return *matrix_displacement;
}
......@@ -87,16 +87,16 @@ namespace HappyHeart
inline GlobalMatrix& VariationalFormulationElasticity
::GetNonCstMatrixCurrentDisplacement() noexcept
{
return const_cast<GlobalMatrix&>(GetMatrixCurrentDisplacement());
return const_cast<GlobalMatrix&>(GetMatrixDisplacement());
}
inline const GlobalMatrix& VariationalFormulationElasticity
::GetMatrixCurrentVelocity() const noexcept
::GetMatrixVelocity() const noexcept
{
assert(!(!matrix_current_velocity_));
return *matrix_current_velocity_;
assert(!(!matrix_velocity_));
return *matrix_velocity_;
}
......@@ -104,7 +104,7 @@ namespace HappyHeart
inline GlobalMatrix& VariationalFormulationElasticity
::GetNonCstMatrixCurrentVelocity() noexcept
{
return const_cast<GlobalMatrix&>(GetMatrixCurrentVelocity());
return const_cast<GlobalMatrix&>(GetMatrixVelocity());
}
......@@ -220,4 +220,4 @@ namespace HappyHeart
} // namespace HappyHeart
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_NEW_ELASTICITY_HXX_
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_F_S_I_x_E_I_x_SOLID_VARIATIONAL_FORMULATION_POLICY_x_ELASTICITY_x_VARIATIONAL_FORMULATION_HXX_
......@@ -16,7 +16,7 @@
#include "ModelInstances/FSI_EI/Model.hpp"
#include "ModelInstances/FSI_EI/InputParameterList.hpp"
#include "ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/Hyperelasticity.hpp"
#include "ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/Elasticity.hpp"
#include "ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/Elasticity/Policy.hpp"
using namespace HappyHeart;
......
Supports Markdown
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