13 #if !defined(KRATOS_FETI_DYNAMIC_COUPLING_UTILITIES_H_INCLUDED)
14 #define KRATOS_FETI_DYNAMIC_COUPLING_UTILITIES_H_INCLUDED
29 template<
class TSparseSpace,
class TDenseSpace>
49 static constexpr
double numerical_limit = std::numeric_limits<double>::epsilon();
57 void SetOriginAndDestinationDomainsWithInterfaceModelParts(
ModelPart& rInterfaceOrigin,
60 void SetEffectiveStiffnessMatrixImplicit(SparseMatrixType& rK,
const SolverIndex iSolverIndex);
64 if (iSolverIndex == SolverIndex::Origin) mSubTimestepIndex = 1;
69 mpMappingMatrix = &rMappingMatrix;
77 void SetOriginInitialKinematics();
79 void EquilibrateDomains();
83 ModelPart& mrDestinationInterfaceModelPart;
88 SparseMatrixType* mpKOrigin =
nullptr;
89 SparseMatrixType* mpKDestination =
nullptr;
91 SparseMatrixType* mpMappingMatrix =
nullptr;
92 SparseMatrixType* mpMappingMatrixForce =
nullptr;
95 DenseVectorType mInitialOriginInterfaceKinematics;
96 DenseVectorType mFinalOriginInterfaceKinematics;
97 SparseMatrixType mProjectorOrigin;
98 SparseMatrixType mUnitResponseOrigin;
101 SparseMatrixType mCondensationMatrix;
102 SparseMatrixType mUnitResponseDestination;
103 SparseMatrixType mProjectorDestination;
104 bool mIsLinearSetupComplete =
false;
106 EquilibriumVariable mEquilibriumVariable = EquilibriumVariable::Velocity;
108 LinearSolverSharedPointerType mpSolver =
nullptr;
110 bool mIsImplicitOrigin;
111 bool mIsImplicitDestination;
113 bool mIsLinear =
false;
114 SolverIndex mLagrangeDefinedOn = SolverIndex::Destination;
119 const bool mIsCheckEquilibrium =
true;
121 void CalculateUnbalancedInterfaceFreeKinematics(DenseVectorType& rUnbalancedKinematics,
const bool IsEquilibriumCheck =
false);
124 DenseVectorType& rContainer,
const SizeType nDOFs);
127 DenseVectorType& rContainer,
const SizeType nDOFs);
129 void GetExpandedMappingMatrix(SparseMatrixType& rExpandedMappingMat,
const SizeType nDOFs);
131 void ComposeProjector(SparseMatrixType& rProjector,
const SolverIndex solverIndex);
133 void DetermineDomainUnitAccelerationResponse(SparseMatrixType* pK,
134 const SparseMatrixType& rProjector, SparseMatrixType& rUnitResponse,
const SolverIndex solverIndex);
136 void DetermineDomainUnitAccelerationResponseExplicit(SparseMatrixType& rUnitResponse,
137 const SparseMatrixType& rProjector,
ModelPart& rDomain,
const SolverIndex solverIndex);
139 void DetermineDomainUnitAccelerationResponseImplicit(SparseMatrixType& rUnitResponse,
140 const SparseMatrixType& rProjector, SparseMatrixType* pK,
const SolverIndex solverIndex);
142 void CalculateCondensationMatrix(SparseMatrixType& rCondensationMatrix,
143 const SparseMatrixType& rOriginUnitResponse,
const SparseMatrixType& rDestinationUnitResponse,
144 const SparseMatrixType& rOriginProjector,
const SparseMatrixType& rDestinationProjector);
146 void DetermineLagrangianMultipliers(DenseVectorType& rLagrangeVec,
147 SparseMatrixType& rCondensationMatrix, DenseVectorType& rUnbalancedKinematics);
149 void ApplyCorrectionQuantities(DenseVectorType& rLagrangeVec,
150 const SparseMatrixType& rUnitResponse,
const SolverIndex solverIndex);
152 void AddCorrectionToDomain(
ModelPart* pDomain,
154 const DenseVectorType& rCorrection,
const bool IsImplicit);
156 void WriteLagrangeMultiplierResults(
const DenseVectorType& rLagrange);
158 void ApplyMappingMatrixToProjector(SparseMatrixType& rProjector,
const SizeType DOFs);
Definition: feti_dynamic_coupling_utilities.h:31
void SetLinearSolver(LinearSolverSharedPointerType pSolver)
Definition: feti_dynamic_coupling_utilities.h:72
std::size_t IndexType
Definition: feti_dynamic_coupling_utilities.h:34
void SetMappingMatrix(SparseMatrixType &rMappingMatrix)
Definition: feti_dynamic_coupling_utilities.h:67
Geometry< NodeType > GeometryType
Definition: feti_dynamic_coupling_utilities.h:38
Node NodeType
Definition: feti_dynamic_coupling_utilities.h:36
TSparseSpace::MatrixType SparseMatrixType
Definition: feti_dynamic_coupling_utilities.h:41
TDenseSpace::MatrixType DenseMatrixType
Definition: feti_dynamic_coupling_utilities.h:42
Kratos::shared_ptr< LinearSolverType > LinearSolverSharedPointerType
Definition: feti_dynamic_coupling_utilities.h:46
SolverIndex
Definition: feti_dynamic_coupling_utilities.h:51
TDenseSpace::VectorType DenseVectorType
Definition: feti_dynamic_coupling_utilities.h:43
void SetEffectiveStiffnessMatrixExplicit(const SolverIndex iSolverIndex)
Definition: feti_dynamic_coupling_utilities.h:62
LinearSolver< TSparseSpace, TDenseSpace > LinearSolverType
Definition: feti_dynamic_coupling_utilities.h:45
EquilibriumVariable
Definition: feti_dynamic_coupling_utilities.h:52
NodeType::Pointer NodePointerType
Definition: feti_dynamic_coupling_utilities.h:37
GeometryType::Pointer GeometryPointerType
Definition: feti_dynamic_coupling_utilities.h:39
std::size_t SizeType
Definition: feti_dynamic_coupling_utilities.h:33
Geometry base class.
Definition: geometry.h:71
Base class for all the linear solvers in Kratos.
Definition: linear_solver.h:65
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::shared_ptr< T > shared_ptr
Definition: smart_pointers.h:27
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43