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

#743 Fix conflicts from uncontrolled rebase on one branch/content present on another.

parent f136d5ab
......@@ -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 = 3.1e-4
} -- transient
......@@ -633,12 +633,12 @@ Petsc2 = {
-- Absolute tolerance
-- Expected format: {VALUE1, VALUE2, ...}
-- Constraint: v > 0.
absoluteTolerance = 1e-10,
absoluteTolerance = 1.e-10,
-- gmresStart
-- Expected format: {VALUE1, VALUE2, ...}
-- Constraint: v >= 0
gmresRestart = 200,
gmresRestart = 100,
-- Maximum iteration
-- Expected format: {VALUE1, VALUE2, ...}
......@@ -650,12 +650,12 @@ Petsc2 = {
-- preconditioner = lu
-- Expected format: {"VALUE1", "VALUE2", ...}
-- Constraint: ops_in(v, 'lu')
preconditioner = 'lu',
preconditioner = 'none',
-- Relative tolerance
-- Expected format: {VALUE1, VALUE2, ...}
-- Constraint: v > 0.
relativeTolerance = 1e-6,
relativeTolerance = 1.e-4,
-- List of solver: { chebychev cg gmres preonly bicg python };
-- Expected format: {"VALUE1", "VALUE2", ...}
......
......@@ -21,7 +21,7 @@ transient = {
-- Maximum time, if set to zero run a case.
-- Expected format: VALUE
-- Constraint: v >= 0.
timeMax = .5,
timeMax = .15,
} -- transient
......
......@@ -102,6 +102,8 @@
BE04F07D1BB2FE5F00EF1652 /* InterpolationData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE04F07A1BB2FE5F00EF1652 /* InterpolationData.cpp */; };
BE04F07E1BB2FE5F00EF1652 /* InterpolationData.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE04F07B1BB2FE5F00EF1652 /* InterpolationData.hpp */; };
BE04F07F1BB2FE5F00EF1652 /* InterpolationData.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE04F07C1BB2FE5F00EF1652 /* InterpolationData.hxx */; };
BE0736F21BEB6220009F6D53 /* Array.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE0736EF1BEB6220009F6D53 /* Array.hpp */; };
BE0736F31BEB6220009F6D53 /* Array.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE0736F01BEB6220009F6D53 /* Array.hxx */; };
BE17F3371B149A2A00EAAACE /* Configuration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE17F3341B149A2A00EAAACE /* Configuration.cpp */; };
BE17F3381B149A2A00EAAACE /* Configuration.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE17F3351B149A2A00EAAACE /* Configuration.hpp */; };
BE17F3391B149A2A00EAAACE /* Configuration.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE17F3361B149A2A00EAAACE /* Configuration.hxx */; };
......@@ -3451,6 +3453,8 @@
BE04F07C1BB2FE5F00EF1652 /* InterpolationData.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = InterpolationData.hxx; path = Private/InterpolationData.hxx; sourceTree = "<group>"; };
BE05B4DD16D23573000E248D /* libGeometry.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libGeometry.a; sourceTree = BUILT_PRODUCTS_DIR; };
BE05B52916D238FE000E248D /* libCore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCore.a; sourceTree = BUILT_PRODUCTS_DIR; };
BE0736EF1BEB6220009F6D53 /* Array.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Array.hpp; sourceTree = "<group>"; };
BE0736F01BEB6220009F6D53 /* Array.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Array.hxx; sourceTree = "<group>"; };
BE09762F1A723F93000C46A1 /* ___FILEBASENAME___.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = "___FILEBASENAME___.cpp"; sourceTree = "<group>"; };
BE0976301A723F93000C46A1 /* ___FILEBASENAME___.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = "___FILEBASENAME___.hpp"; sourceTree = "<group>"; };
BE0976311A723F93000C46A1 /* ___FILEBASENAME___.hxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = "___FILEBASENAME___.hxx"; sourceTree = "<group>"; };
......@@ -4145,26 +4149,6 @@
BEA4FC4518214D8F002B2EA1 /* VariationalFormulation.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = VariationalFormulation.hxx; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
BEA8A379177AD4FE009436C9 /* libUtilities.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libUtilities.a; sourceTree = BUILT_PRODUCTS_DIR; };
BEA8B83C1A6CF91700EDA883 /* SConscript */ = {isa = PBXFileReference; explicitFileType = text.script.python; fileEncoding = 4; path = SConscript; sourceTree = "<group>"; };
BEA9608C1BD4D43800A2E77B /* ExplicitStepVariationalFormulation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExplicitStepVariationalFormulation.cpp; sourceTree = "<group>"; };
BEA9608D1BD4D43800A2E77B /* ExplicitStepVariationalFormulation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ExplicitStepVariationalFormulation.hpp; sourceTree = "<group>"; };
BEA9608E1BD4D43800A2E77B /* ExplicitStepVariationalFormulation.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ExplicitStepVariationalFormulation.hxx; sourceTree = "<group>"; };
BEA9608F1BD4D43800A2E77B /* ImplicitStepFluidVariationalFormulation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImplicitStepFluidVariationalFormulation.cpp; sourceTree = "<group>"; };
BEA960901BD4D43800A2E77B /* ImplicitStepFluidVariationalFormulation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ImplicitStepFluidVariationalFormulation.hpp; sourceTree = "<group>"; };
BEA960911BD4D43800A2E77B /* ImplicitStepFluidVariationalFormulation.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ImplicitStepFluidVariationalFormulation.hxx; sourceTree = "<group>"; };
BEA960921BD4D43800A2E77B /* InputParameter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InputParameter.cpp; sourceTree = "<group>"; };
BEA960931BD4D43800A2E77B /* InputParameter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = InputParameter.hpp; sourceTree = "<group>"; };
BEA960941BD4D43800A2E77B /* InputParameterList.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = InputParameterList.hpp; sourceTree = "<group>"; };
BEA960951BD4D43800A2E77B /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
BEA960961BD4D43800A2E77B /* Model.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Model.hpp; sourceTree = "<group>"; };
BEA960971BD4D43800A2E77B /* Model.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Model.hxx; sourceTree = "<group>"; };
BEA960981BD4D43800A2E77B /* ModelAccessors.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ModelAccessors.hxx; sourceTree = "<group>"; };
BEA960991BD4D43800A2E77B /* ModelForward.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ModelForward.hxx; sourceTree = "<group>"; };
BEA9609C1BD4D43800A2E77B /* Elasticity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Elasticity.cpp; sourceTree = "<group>"; };
BEA9609D1BD4D43800A2E77B /* Elasticity.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Elasticity.hpp; sourceTree = "<group>"; };
BEA9609E1BD4D43800A2E77B /* Elasticity.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Elasticity.hxx; sourceTree = "<group>"; };
BEA9609F1BD4D43800A2E77B /* Hyperelasticity.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Hyperelasticity.hpp; sourceTree = "<group>"; };
BEA960A01BD4D43800A2E77B /* Hyperelasticity.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Hyperelasticity.hxx; sourceTree = "<group>"; };
BEA960A61BD4D49400A2E77B /* demo_input_fsi_ei_2_meshes.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = demo_input_fsi_ei_2_meshes.lua; path = Data/Lua/demo_input_fsi_ei_2_meshes.lua; sourceTree = SOURCE_ROOT; };
BEA9CB891A1E2532003A6276 /* GeometricMeshRegion_Connectivity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeometricMeshRegion_Connectivity.cpp; sourceTree = "<group>"; };
BEA9CB911A1E25BF003A6276 /* main_test_coloring.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main_test_coloring.cpp; sourceTree = "<group>"; };
BEA9CB971A1E25DD003A6276 /* TestColoring */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TestColoring; sourceTree = BUILT_PRODUCTS_DIR; };
......@@ -6938,7 +6922,6 @@
BE63B4911A31C20E003A6523 /* Elasticity */,
BEA0754A1860549B00E83E71 /* Hyperelasticity */,
BEC57D281B909F3400F0F4B4 /* FSI_EI */,
BEA9608B1BD4D43800A2E77B /* FSI_EI_2_meshes */,
BEF2828F1A850E2800857342 /* Heat */,
);
name = ModelInstances;
......@@ -6991,42 +6974,6 @@
path = Sources/FormulationSolver;
sourceTree = "<group>";
};
BEA9608B1BD4D43800A2E77B /* FSI_EI_2_meshes */ = {
isa = PBXGroup;
children = (
BEA960A61BD4D49400A2E77B /* demo_input_fsi_ei_2_meshes.lua */,
BEA9608C1BD4D43800A2E77B /* ExplicitStepVariationalFormulation.cpp */,
BEA9608D1BD4D43800A2E77B /* ExplicitStepVariationalFormulation.hpp */,
BEA9608E1BD4D43800A2E77B /* ExplicitStepVariationalFormulation.hxx */,
BEA9608F1BD4D43800A2E77B /* ImplicitStepFluidVariationalFormulation.cpp */,
BEA960901BD4D43800A2E77B /* ImplicitStepFluidVariationalFormulation.hpp */,
BEA960911BD4D43800A2E77B /* ImplicitStepFluidVariationalFormulation.hxx */,
BEA960921BD4D43800A2E77B /* InputParameter.cpp */,
BEA960931BD4D43800A2E77B /* InputParameter.hpp */,
BEA960941BD4D43800A2E77B /* InputParameterList.hpp */,
BEA960951BD4D43800A2E77B /* main.cpp */,
BEA960961BD4D43800A2E77B /* Model.hpp */,
BEA960971BD4D43800A2E77B /* Model.hxx */,
BEA960981BD4D43800A2E77B /* ModelAccessors.hxx */,
BEA960991BD4D43800A2E77B /* ModelForward.hxx */,
BEA9609B1BD4D43800A2E77B /* SolidVariationalFormulationPolicy */,
);
name = FSI_EI_2_meshes;
path = Sources/ModelInstances/FSI_EI_2_meshes;
sourceTree = SOURCE_ROOT;
};
BEA9609B1BD4D43800A2E77B /* SolidVariationalFormulationPolicy */ = {
isa = PBXGroup;
children = (
BEA9609C1BD4D43800A2E77B /* Elasticity.cpp */,
BEA9609D1BD4D43800A2E77B /* Elasticity.hpp */,
BEA9609E1BD4D43800A2E77B /* Elasticity.hxx */,
BEA9609F1BD4D43800A2E77B /* Hyperelasticity.hpp */,
BEA960A01BD4D43800A2E77B /* Hyperelasticity.hxx */,
);
path = SolidVariationalFormulationPolicy;
sourceTree = "<group>";
};
BEABCD4A17AA906000EDE896 /* Private */ = {
isa = PBXGroup;
children = (
......@@ -7160,6 +7107,8 @@
BEB991BD18F42080009ACA4C /* Sort.hpp */,
BEB991EE18F4231F009ACA4C /* Vector.hpp */,
BEB991ED18F42297009ACA4C /* UnorderedMap.hpp */,
BE0736EF1BEB6220009F6D53 /* Array.hpp */,
BE0736F01BEB6220009F6D53 /* Array.hxx */,
BEB991B418F42080009ACA4C /* BoolArray.cpp */,
BEB991B518F42080009ACA4C /* BoolArray.hpp */,
BEB991B618F42080009ACA4C /* BoolArray.hxx */,
......@@ -8736,6 +8685,7 @@
BE768E851B832795009B24CB /* Subtuple.hpp in Headers */,
BE41A8CF1A24AA46004E4312 /* Mpi.hxx in Headers */,
BE1E87641B8DFB710002EE64 /* PrepareDefaultEntry.hxx in Headers */,
BE0736F21BEB6220009F6D53 /* Array.hpp in Headers */,
BE56978E1BE383AD00B2EC67 /* MatrixOperations.hpp in Headers */,
BE90E1861A24929A00CCAFDE /* ExceptionHelper.hxx in Headers */,
BE90E1CE1A2492AA00CCAFDE /* PetscSnes.hpp in Headers */,
......@@ -8792,6 +8742,7 @@
BE6FFAD91A399E2200D048BD /* Numeric.hxx in Headers */,
BE90E1A51A24929A00CCAFDE /* Helper.hpp in Headers */,
BE768EAC1B833366009B24CB /* TupleItem.hpp in Headers */,
BE0736F31BEB6220009F6D53 /* Array.hxx in Headers */,
BE90E1D81A2492AA00CCAFDE /* Directory.hpp in Headers */,
BE90E1921A24929A00CCAFDE /* UniqueId.hpp in Headers */,
BE4F2DA51BE7FFDE00FFF373 /* Umfpack.hxx in Headers */,
......@@ -12639,7 +12590,7 @@
/Users/Shared/Library/Parmetis/lib,
);
LLVM_LTO = NO;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.11;
ONLY_ACTIVE_ARCH = YES;
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
......@@ -12748,7 +12699,7 @@
/Users/Shared/Library/Parmetis/lib,
);
LLVM_LTO = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.11;
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-ftemplate-backtrace-limit=0",
......
......@@ -95,7 +95,7 @@ namespace HappyHeart
const std::string& Preconditioner::Constraint()
{
static std::string ret("ops_in(v, {'lu'})"); // none', 'jacobi', 'sor', 'lu', 'bjacobi', 'ilu', 'asm', 'cholesky'})");
static std::string ret("ops_in(v, {'lu', 'none'})"); // none', 'jacobi', 'sor', 'lu', 'bjacobi', 'ilu', 'asm', 'cholesky'})");
return ret;
}
......
......@@ -64,12 +64,7 @@ namespace HappyHeart
};
} // namespace ShapeFunctionNS
......
......@@ -21,6 +21,8 @@
# include "FiniteElement/FiniteElementSpace/GodOfDofManager.hpp"
# include "FiniteElement/BoundaryConditions/Private/DirichletBoundaryConditionManager.hpp"
# include "FiniteElement/RefFiniteElement/Private/BasicRefFEltFactory.hpp" // only for #740...
# include "FiniteElement/BoundaryConditions/Private/ComponentFactory.hpp" // only for #740...
# include "Parameters/Instances/Fiber/Private/FiberListManager.hpp"
......
......@@ -199,9 +199,23 @@ namespace HappyHeart
// singletons.
Private::FiberListManager<ParameterNS::Type::scalar>::GetInstance().Destroy();
Private::FiberListManager<ParameterNS::Type::vector>::GetInstance().Destroy();
// Additional operations required by DerivedT.
static_cast<DerivedT&>(*this).SupplFinalize();
// #740 gcc 5.2 no longer seems able to correctly destroy the singletons after the end of the main program.
// A quite inelegant work-around is to destroy the underlying objects beforehand here.
DomainManager::GetInstance().Destroy();
GeometricMeshRegionManager::GetInstance().Destroy();
GodOfDofManager::GetInstance().Destroy();
TimeKeep::GetInstance().Destroy();
UnknownManager::GetInstance().Destroy();
Private::ComponentFactory::GetInstance().Destroy();
Private::DirichletBoundaryConditionManager::GetInstance().Destroy();
Private::GeometricEltFactory::GetInstance().Destroy();
Private::NumberingSubsetManager::GetInstance().Destroy();
RefFEltNS::Private::BasicRefFEltFactory::GetInstance().Destroy();
}
......
......@@ -6,11 +6,11 @@
// Copyright (c) 2015 Inria. All rights reserved.
//
# include "Parameters/InitParameter.hpp"
# include "Parameters/Instances/Private/Configuration.hpp"
#include "Parameters/InitParameter.hpp"
#include "Parameters/Instances/Private/Configuration.hpp"
# include "Operators/GlobalVariationalOperator/DetermineDefaultQuadratureRule.hpp"
#include "Operators/GlobalVariationalOperator/DetermineDefaultQuadratureRule.hpp"
#include "ModelInstances/FSI_EI/ExplicitStepVariationalFormulation.hpp"
......@@ -191,8 +191,8 @@ namespace HappyHeart
{
const auto& mass_fluid_velocity = GetMassFluidVelocity();
const auto& previous_iteration = GetNonCstPreviousFluidVelocity();
const auto& previous_iteration = GetPreviousFluidVelocity();
Wrappers::Petsc::MatMult(mass_fluid_velocity, previous_iteration, residual_rhs, __FILE__, __LINE__);
auto& system_matrix = GetNonCstSystemMatrix(numbering_subset, numbering_subset);
......
......@@ -166,6 +166,8 @@ namespace HappyHeart
GlobalVector& GetNonCstPreviousFluidVelocity() noexcept;
const GlobalVector& GetPreviousFluidVelocity() const noexcept;
private:
......
......@@ -118,13 +118,20 @@ namespace HappyHeart
}
inline GlobalVector& ExplicitStepVariationalFormulation::GetNonCstPreviousFluidVelocity() noexcept
inline const GlobalVector& ExplicitStepVariationalFormulation::GetPreviousFluidVelocity() const noexcept
{
assert(!(!previous_fluid_velocity_));
return *previous_fluid_velocity_;
}
inline GlobalVector& ExplicitStepVariationalFormulation::GetNonCstPreviousFluidVelocity() noexcept
{
return const_cast<GlobalVector&>(GetPreviousFluidVelocity());
}
inline const GlobalMatrix& ExplicitStepVariationalFormulation::GetResidualMatrix() const noexcept
{
assert(!(!residual_matrix_));
......
......@@ -231,7 +231,7 @@ namespace HappyHeart
}
const GlobalVector& ImplicitStepFluidVariationalFormulation::ComputeResidual()
const GlobalVector& ImplicitStepFluidVariationalFormulation::ComputeResidual(const double factor)
{
auto& mixed_residual = GetNonCstMixedResidual(); // with velocity and pressure
......@@ -268,6 +268,8 @@ namespace HappyHeart
Wrappers::Petsc::AssertNumericValues(residual, __FILE__, __LINE__);
#endif // NDEBUG
residual.Scale(factor, __FILE__, __LINE__); // \todo #723 Hack for test!
return residual;
}
......
......@@ -120,7 +120,7 @@ namespace HappyHeart
//! Compute the residual after the resolution of the system and return it.
const GlobalVector& ComputeResidual();
const GlobalVector& ComputeResidual(double factor = 1.);
......
......@@ -12,6 +12,10 @@
# include <memory>
# include <vector>
# include "Utilities/Containers/Array.hpp"
# include "ThirdParty/Wrappers/Petsc/Matrix/ShellMatrix.hpp"
# include "Operators/ConformInterpolatorInstances/P1_to_P2.hpp"
# include "Operators/ConformInterpolatorInstances/SubsetOrSuperset.hpp"
......@@ -165,29 +169,19 @@ namespace HappyHeart
*/
void UpdateFluidDirichletCondition();
void UpdateSolidVelocityOnInterfaceAfterFluidImplicitStep();
void UpdateSolidVelocityOnInterfaceAfterDiffFluidImplicitStep(const GlobalVector& solid_displacement);
//! Update solid displacements before SoF.
void UpdateSolidDisplacementBeforeSoF();
//! Compute solid residual (in input of solid variational formulation).
void ComputeSolidResidual();
//! Implicit solid step.
void ImplicitSolidStep(const std::string& output_dir);
//! Update solid displacements after SoF.
void UpdateSolidDisplacementAfterSoF();
///@}
public: // \todo #723 See what is better once shell has been mastered.
void dH();
void dH(Vec petsc_input_vector,
Vec& petsc_output_vector);
private:
......@@ -217,48 +211,66 @@ namespace HappyHeart
//! Get the interpolation matrix for solid velocity -> fluid velocity.
GlobalMatrix& GetNonCstInterpolationMatrixSolid2FluidVelocity() noexcept;
//! Solid displacement before SoF is applied (in Aitken loop). See Bruno's note for more details about Aitken.
const GlobalVector& GetSolidDisplacementBeforeSoF() const noexcept;
//! Solid displacement before SoF is applied (in Aitken loop). See Bruno's note for more details about Aitken.
GlobalVector& GetNonCstSolidDisplacementBeforeSoF() noexcept;
//! Solid displacement after SoF is applied (in Aitken loop). See Bruno's note for more details about Aitken.
const GlobalVector& GetSolidDisplacementAfterSoF() const noexcept;
//! Solid displacement after SoF is applied (in Aitken loop). See Bruno's note for more details about Aitken.
GlobalVector& GetNonCstSolidDisplacementAfterSoF() noexcept;
//! Evolution of solid displacement in the latest SoF computation.
const GlobalVector& GetSolidDisplacementEvolutionInSoF() const noexcept;
//! Evolution of solid displacement in the latest SoF computation.
GlobalVector& GetNonCstSolidDisplacementEvolutionInSoF() noexcept;
//! Evolution of solid displacement in the latest SoF computation.
const GlobalVector& GetSolidDisplacementEvolutionInSoFOnInterface() const noexcept;
//! Access to the linear solver used to solve the diffferential of the solid variational formulation.
Wrappers::Petsc::Snes& GetNonCstDifferentialSolidSolver() noexcept;
//! Evolution of solid displacement in the latest SoF computation.
GlobalVector& GetNonCstSolidDisplacementEvolutionInSoFOnInterface() noexcept;
Wrappers::Petsc::Snes& GetNonCstdHSolver() noexcept;
const Wrappers::Petsc::ShellMatrix& GetGmresShellMatrix() const noexcept;
enum class Solid : std::size_t
{
dispSr = 0,
dispSrk0,
dispSOldr,
dispSOldr_on_interface,
dispSr_on_interface,
H0,
work_var_full_numbering_subset,
work_var_full_numbering_subset_2,
work_var_interface_numbering_subset,
residual,
dispSdelta,
Nvector
};
enum class Fluid : std::size_t
{
velFromSr_on_interface = 0,
p2_vel_on_interface,
vel_last_implicit_solution,
Nvector
};
template<Solid SolidT>
const GlobalVector& GetVector() const noexcept;
template<Solid SolidT>
GlobalVector& GetNonCstVector() noexcept;
// Only to init them!
template<Solid SolidT>
const GlobalVector::unique_ptr& GetVectorPtr() const noexcept;
//! Solid displacement before SoF is applied (in Aitken loop). See Bruno's note for more details about Aitken.
const GlobalVector& GetSolidDisplacementBeforeSoFOnInterface() const noexcept;
//! Solid displacement before SoF is applied (in Aitken loop). See Bruno's note for more details about Aitken.
GlobalVector& GetNonCstSolidDisplacementBeforeSoFOnInterface() noexcept;
template<Solid SolidT>
GlobalVector::unique_ptr& GetNonCstVectorPtr() noexcept;
//! Solid velocity on interface.
const GlobalVector& GetSolidVelocityOnInterface() const noexcept;
template<Fluid FluidT>
const GlobalVector& GetVector() const noexcept;
//! Solid velocity on interface.
GlobalVector& GetNonCstSolidVelocityOnInterface() noexcept;
template<Fluid FluidT>
GlobalVector& GetNonCstVector() noexcept;
//! Access to the linear solver used to solve the diffferential of the solid variational formulation.
Wrappers::Petsc::Snes& GetNonCstDifferentialSolidSolver() noexcept;
// Only to init them!
template<Fluid FluidT>
const GlobalVector::unique_ptr& GetVectorPtr() const noexcept;
Wrappers::Petsc::Snes& GetNonCstdHSolver() noexcept;
template<Fluid FluidT>
GlobalVector::unique_ptr& GetNonCstVectorPtr() noexcept;
private:
......@@ -275,24 +287,18 @@ namespace HappyHeart
//! Residual on the solid function space of sum_fluid_residual_.
GlobalVector::unique_ptr solid_residual_ = nullptr;
//! Solid displacement before SoF is applied (in Aitken loop). See Bruno's note for more details about Aitken.
GlobalVector::unique_ptr solid_displacement_before_SoF_ = nullptr;
GlobalVector::unique_ptr solid_displacement_before_SoF_on_interface_ = nullptr;
GlobalVector::unique_ptr solid_displacement_after_SoF_ = nullptr;
std::array<GlobalVector::unique_ptr, EnumUnderlyingType(Solid::Nvector)> solid_vector_list_
= Utilities::NullptrArray<GlobalVector::unique_ptr, EnumUnderlyingType(Solid::Nvector)>();
GlobalVector::unique_ptr solid_displacement_evolution_in_SoF_ = nullptr;
GlobalVector::unique_ptr solid_displacement_evolution_in_SoF_on_interface_ = nullptr;
GlobalVector::unique_ptr solid_velocity_on_interface_ = nullptr;
GlobalVector::unique_ptr p2_solid_velocity_on_interface_ = nullptr;
GlobalVector::unique_ptr solid_displacement_previous_time_iteration_ = nullptr;
GlobalVector::unique_ptr solid_displacement_previous_time_iteration_on_interface_ = nullptr;
GlobalVector::unique_ptr work_vector_1_ = nullptr;
GlobalVector::unique_ptr work_vector_2_ = nullptr;
GlobalVector::unique_ptr work_vector_3_ = nullptr;
std::array<GlobalVector::unique_ptr, EnumUnderlyingType(Fluid::Nvector)> fluid_vector_list_
= Utilities::NullptrArray<GlobalVector::unique_ptr, EnumUnderlyingType(Fluid::Nvector)>();
private:
GlobalVector::unique_ptr solid_displacement_inside_dh_ = nullptr;
Wrappers::Petsc::ShellMatrix::unique_ptr gmres_shell_matrix_ = nullptr;
/*!
* \brief Interpolation matrix for solid velocity -> fluid velocity.
......@@ -313,6 +319,10 @@ namespace HappyHeart
};
template<class SolidVariationalFormulationPolicyT>
PetscInt ApplydH(Mat shell_matrix, Vec x, Vec y);
} // namespace FSI_EINS
......
......@@ -77,6 +77,11 @@ namespace HappyHeart
std::move(bc_list),
*explicit_step_variational_formulation_);
GetNonCstVectorPtr<Fluid::vel_last_implicit_solution>() =
std::make_unique<GlobalVector>(numbering_subset);
HappyHeart::AllocateGlobalVector(god_of_dof, GetNonCstVector<Fluid::vel_last_implicit_solution>());
auto& formulation = this->GetNonCstImplicitStepFluidVariationalFormulation();
formulation.Init(input_parameter_data);
}
......@@ -85,7 +90,6 @@ namespace HappyHeart
const auto& solid_numbering_subset = god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::solid_displacement));
solid_residual_ = std::make_unique<GlobalVector>(solid_numbering_subset);
AllocateGlobalVector(god_of_dof, *solid_residual_);
}
{
......@@ -110,42 +114,38 @@ namespace HappyHeart
const auto& solid_numbering_subset_on_interface =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::solid_displacement_on_interface));
solid_displacement_before_SoF_ =
std::make_unique<GlobalVector>(numbering_subset);
GetNonCstVectorPtr<Solid::dispSr>() = std::make_unique<GlobalVector>(numbering_subset);
HappyHeart::AllocateGlobalVector(god_of_dof, GetNonCstVector<Solid::dispSr>() );
const auto& dispSr = GetVector<Solid::dispSr>();
GetNonCstVectorPtr<Solid::dispSOldr>() = std::make_unique<GlobalVector>(dispSr);
GetNonCstVectorPtr<Solid::dispSrk0>() = std::make_unique<GlobalVector>(dispSr);
GetNonCstVectorPtr<Solid::work_var_full_numbering_subset>() = std::make_unique<GlobalVector>(dispSr);
GetNonCstVectorPtr<Solid::work_var_full_numbering_subset_2>() = std::make_unique<GlobalVector>(dispSr);
GetNonCstVectorPtr<Solid::H0>() = std::make_unique<GlobalVector>(dispSr);
GetNonCstVectorPtr<Solid::residual>() = std::make_unique<GlobalVector>(dispSr);
GetNonCstVectorPtr<Solid::dispSdelta>() = std::make_unique<GlobalVector>(dispSr);
auto& solid_displacement_before_SoF = GetNonCstSolidDisplacementBeforeSoF();
HappyHeart::AllocateGlobalVector(god_of_dof, solid_displacement_before_SoF);
solid_displacement_inside_dh_ = std::make_unique<GlobalVector>(solid_displacement_before_SoF);
GetNonCstVectorPtr<Solid::dispSr_on_interface>() = std::make_unique<GlobalVector>(solid_numbering_subset_on_interface);
HappyHeart::AllocateGlobalVector(god_of_dof, GetNonCstVector<Solid::dispSr_on_interface>() );
solid_displacement_evolution_in_SoF_ = std::make_unique<GlobalVector>(solid_displacement_before_SoF);
const auto& dispSr_on_interface = GetVector<Solid::dispSr_on_interface>();
solid_displacement_before_SoF_on_interface_ =
std::make_unique<GlobalVector>(solid_numbering_subset_on_interface);
GetNonCstVectorPtr<Solid::dispSOldr_on_interface>() = std::make_unique<GlobalVector>(dispSr_on_interface);
GetNonCstVectorPtr<Solid::work_var_interface_numbering_subset>() = std::make_unique<GlobalVector>(dispSr_on_interface);
GetNonCstVectorPtr<Fluid::velFromSr_on_interface>() = std::make_unique<GlobalVector>(dispSr_on_interface);
{
auto& solid_displacement_before_SoF_on_interface = GetNonCstSolidDisplacementBeforeSoFOnInterface();
HappyHeart::AllocateGlobalVector(god_of_dof, solid_displacement_before_SoF_on_interface);
const auto& fsi_fluid_numbering_subset =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::fluid_on_interface));
solid_displacement_evolution_in_SoF_on_interface_ = std::make_unique<GlobalVector>(solid_displacement_before_SoF_on_interface);
auto& p2_solid_velocity_on_interface = GetNonCstVectorPtr<Fluid::p2_vel_on_interface>();
p2_solid_velocity_on_interface = std::make_unique<GlobalVector>(fsi_fluid_numbering_subset);
HappyHeart::AllocateGlobalVector(god_of_dof, *p2_solid_velocity_on_interface);
}
solid_displacement_after_SoF_ =
std::make_unique<GlobalVector>(solid_displacement_before_SoF);
solid_displacement_previous_time_iteration_ =
std::make_unique<GlobalVector>(solid_displacement_before_SoF);
solid_displacement_previous_time_iteration_on_interface_ =