KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver > Class Template Reference

Current class provides an implementation for standard builder and solving operations. More...

#include <residualbased_elimination_builder_and_solver_with_constraints.h>

Inheritance diagram for Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >:
Collaboration diagram for Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >:

Public Member Functions

Life Cycle
 ResidualBasedEliminationBuilderAndSolverWithConstraints ()
 Default constructor. More...
 
 ResidualBasedEliminationBuilderAndSolverWithConstraints (typename TLinearSolver::Pointer pNewLinearSystemSolver, Parameters ThisParameters)
 Default constructor. (with parameters) More...
 
 ResidualBasedEliminationBuilderAndSolverWithConstraints (typename TLinearSolver::Pointer pNewLinearSystemSolver, const bool CheckConstraintRelation=true, const bool ResetRelationMatrixEachIteration=false)
 Default constructor. More...
 
 ~ResidualBasedEliminationBuilderAndSolverWithConstraints () override
 
BuilderAndSolverBaseType::Pointer Create (typename TLinearSolver::Pointer pNewLinearSystemSolver, Parameters ThisParameters) const override
 Create method. More...
 
Input and output
std::string Info () const override
 Turn back information as a string. More...
 
void PrintInfo (std::ostream &rOStream) const override
 Print information about this object. More...
 
void PrintData (std::ostream &rOStream) const override
 Print object's data. More...
 
- Public Member Functions inherited from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
 ResidualBasedEliminationBuilderAndSolver ()
 Default constructor. More...
 
 ResidualBasedEliminationBuilderAndSolver (typename TLinearSolver::Pointer pNewLinearSystemSolver, Parameters ThisParameters)
 Default constructor. (with parameters) More...
 
 ResidualBasedEliminationBuilderAndSolver (typename TLinearSolver::Pointer pNewLinearSystemSolver)
 Constructor. More...
 
 ~ResidualBasedEliminationBuilderAndSolver () override
 
 KRATOS_CLASS_POINTER_DEFINITION (ResidualBasedEliminationBuilderAndSolver)
 Pointer definition of ResidualBasedEliminationBuilderAndSolverWithConstraints. More...
 
void BuildLHS (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA) override
 Function to perform the building of the LHS. More...
 
void BuildLHS_CompleteOnFreeRows (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA) override
 Build a rectangular matrix of size n*N where "n" is the number of unrestrained degrees of freedom and "N" is the total number of degrees of freedom involved. More...
 
void SystemSolve (TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
 This is a call to the linear system solver. More...
 
void SystemSolveWithPhysics (TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb, ModelPart &rModelPart)
 This is a call to the linear system solver (taking into account some physical particularities of the problem) More...
 
void BuildRHSAndSolve (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
 Corresponds to the previews, but the System's matrix is considered already built and only the RHS is built again. More...
 
int Check (ModelPart &rModelPart) override
 This function is designed to be called once to perform all the checks needed on the input provided. Checks can be "expensive" as the function is designed to catch user's errors. More...
 
- Public Member Functions inherited from Kratos::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
 BuilderAndSolver ()
 Default constructor. More...
 
 BuilderAndSolver (typename TLinearSolver::Pointer pNewLinearSystemSolver, Parameters ThisParameters)
 Default constructor with Parameters. More...
 
 BuilderAndSolver (typename TLinearSolver::Pointer pNewLinearSystemSolver)
 Default constructor. More...
 
virtual ~BuilderAndSolver ()
 
void SetEchoLevel (int Level)
 It sets the level of echo for the solving strategy. More...
 
int GetEchoLevel () const
 It returns the echo level. More...
 
virtual TSparseSpace::MatrixType & GetConstraintRelationMatrix ()
 This method returns constraint relation (T) matrix. More...
 
virtual TSparseSpace::VectorType & GetConstraintConstantVector ()
 This method returns constraint constant vector. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (BuilderAndSolver)
 Pointer definition of BuilderAndSolver. More...
 
bool GetCalculateReactionsFlag () const
 This method returns the flag mCalculateReactionsFlag. More...
 
void SetCalculateReactionsFlag (bool flag)
 This method sets the flag mCalculateReactionsFlag. More...
 
bool GetDofSetIsInitializedFlag () const
 This method returns the flag mDofSetIsInitialized. More...
 
void SetDofSetIsInitializedFlag (bool DofSetIsInitialized)
 This method sets the flag mDofSetIsInitialized. More...
 
bool GetReshapeMatrixFlag () const
 This method returns the flag mReshapeMatrixFlag. More...
 
void SetReshapeMatrixFlag (bool ReshapeMatrixFlag)
 This method sets the flag mReshapeMatrixFlag. More...
 
unsigned int GetEquationSystemSize () const
 This method returns the value mEquationSystemSize. More...
 
TLinearSolver::Pointer GetLinearSystemSolver () const
 This method return the linear solver used. More...
 
void SetLinearSystemSolver (typename TLinearSolver::Pointer pLinearSystemSolver)
 This method sets the linear solver to be used. More...
 
virtual void BuildLHS_Complete (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA)
 It builds a matrix of size N*N where "N" is the total number of degrees of freedom involved. More...
 
virtual void BuildAndSolveLinearizedOnPreviousIteration (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb, const bool MoveMesh)
 Function to perform the building and solving phase at the same time Linearizing with the database at the old iteration. More...
 
virtual void ApplyDirichletConditions_LHS (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx)
 The same of the precedent but affecting only the LHS. More...
 
virtual void ApplyDirichletConditions_RHS (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemVectorType &rDx, TSystemVectorType &rb)
 The same of the precedent but affecting only the RHS. More...
 
virtual void ApplyRHSConstraints (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemVectorType &rb)
 Applies the constraints with master-slave relation matrix (RHS only) More...
 
virtual void ApplyConstraints (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rb)
 Applies the constraints with master-slave relation matrix. More...
 
virtual DofsArrayTypeGetDofSet ()
 It allows to get the list of Dofs from the element. More...
 
virtual const DofsArrayTypeGetDofSet () const
 It allows to get the list of Dofs from the element. More...
 
virtual void InitializeSolutionStep (ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb)
 It applies certain operations at the system of equations at the beginning of the solution step. More...
 
virtual void FinalizeSolutionStep (ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb)
 It applies certain operations at the system of equations at the end of the solution step. More...
 

Protected Member Functions

Protected Operations
void AssembleRelationMatrix (TSystemMatrixType &rT, const LocalSystemMatrixType &rTransformationMatrix, const EquationIdVectorType &rSlaveEquationId, const EquationIdVectorType &rMasterEquationId)
 This method assembles the global relation matrix (T matrix used to impose the MPC) More...
 
void ConstructMatrixStructure (typename TSchemeType::Pointer pScheme, TSystemMatrixType &rA, ModelPart &rModelPart) override
 This method constructs the relationship between the DoF. More...
 
void BuildAndSolveWithConstraints (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb)
 The same methods as the base class but with constraints. More...
 
void BuildRHSWithConstraints (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemVectorType &rb)
 The same methods as the base class but with constraints. More...
 
void SetUpDofSetWithConstraints (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart)
 Builds the list of the DofSets involved in the problem by "asking" to each element and condition its Dofs. More...
 
void SystemSolveWithPhysics (TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb, ModelPart &rModelPart)
 This is a call to the linear system solver (taking into account some physical particularities of the problem) More...
 
virtual void ConstructMatrixStructureWithConstraints (typename TSchemeType::Pointer pScheme, TSystemMatrixType &rA, ModelPart &rModelPart)
 This function is exactly same as the ConstructMatrixStructure() function in base class except that the function. More...
 
virtual void ConstructRelationMatrixStructure (typename TSchemeType::Pointer pScheme, TSystemMatrixType &rT, ModelPart &rModelPart)
 This function is exactly same as the ConstructMatrixStructure() function in base class except that the function has the call to ApplyConstraints function call once the element and conditions compute their equation slave_ids. More...
 
void BuildWithConstraints (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rb, const bool UseBaseBuild=true)
 This function is exactly same as the Build() function in base class except that the function. More...
 
void BuildRHSNoDirichlet (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemVectorType &rb)
 Function to perform the build of the RHS. More...
 
void ResizeAndInitializeVectors (typename TSchemeType::Pointer pScheme, TSystemMatrixPointerType &pA, TSystemVectorPointerType &pDx, TSystemVectorPointerType &pb, ModelPart &rModelPart) override
 This method resize and initializes the system of euqations. More...
 
void CalculateReactions (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
 It computes the reactions of the system. More...
 
void ApplyDirichletConditions (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
 Applies the dirichlet conditions. This operation may be very heavy or completely unexpensive depending on the implementation chosen and on how the System Matrix is built. More...
 
void Clear () override
 This function is intended to be called at the end of the solution step to clean up memory storage not needed. More...
 
void AssignSettings (const Parameters ThisParameters) override
 This method assigns settings to member variables. More...
 
- Protected Member Functions inherited from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
void Assemble (TSystemMatrixType &rA, TSystemVectorType &rb, const LocalSystemMatrixType &rLHSContribution, const LocalSystemVectorType &rRHSContribution, const Element::EquationIdVectorType &rEquationId)
 This method assembles the system. More...
 
void AssembleLHS (TSystemMatrixType &rA, LocalSystemMatrixType &rLHSContribution, EquationIdVectorType &rEquationId)
 This method assembles the LHS of the system. More...
 
void AssembleRowContributionFreeDofs (TSystemMatrixType &rA, const Matrix &rALocal, const IndexType i, const IndexType i_local, const Element::EquationIdVectorType &EquationId)
 This function is equivalent to the AssembleRowContribution of the block builder and solver. More...
 
IndexType ForwardFind (const IndexType id_to_find, const IndexType start, const IndexType *index_vector)
 
IndexType BackwardFind (const IndexType id_to_find, const IndexType start, const IndexType *index_vector)
 
- Protected Member Functions inherited from Kratos::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
virtual Parameters ValidateAndAssignParameters (Parameters ThisParameters, const Parameters DefaultParameters) const
 This method validate and assign default parameters. More...
 

Protected Attributes

Protected member Variables
TSystemMatrixPointerType mpTMatrix = NULL
 
TSystemMatrixPointerType mpOldAMatrix = NULL
 This is matrix containing the global relation for the constraints. More...
 
TSystemVectorPointerType mpConstantVector = NULL
 This is matrix containing the old LHS structure. More...
 
TSystemVectorPointerType mpDeltaConstantVector = NULL
 This is vector containing the rigid movement of the constraint. More...
 
DofsArrayType mDoFMasterFixedSet
 This is vector contains the effective constant displacement. More...
 
DofsArrayType mDoFSlaveSet
 The set containing the fixed master DoF of the system. More...
 
SizeType mDoFToSolveSystemSize = 0
 The set containing the slave DoF of the system. More...
 
IndexMapType mReactionEquationIdMap
 Number of degrees of freedom of the problem to actually be solved. More...
 
bool mCheckConstraintRelation = false
 In order to know the corresponding EquaionId for each component of the reaction vector. More...
 
bool mResetRelationMatrixEachIteration = false
 If we do a constraint check relation. More...
 
bool mComputeConstantContribution = false
 If we reset the relation matrix at each iteration. More...
 
bool mCleared = true
 If we compute the constant contribution of the MPC. More...
 
- Protected Attributes inherited from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
double mScaleFactor = 1.0
 
SCALING_DIAGONAL mScalingDiagonal = SCALING_DIAGONAL::NO_SCALING
 The manually set scale factor. More...
 
- Protected Attributes inherited from Kratos::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
TLinearSolver::Pointer mpLinearSystemSolver = nullptr
 
DofsArrayType mDofSet
 Pointer to the linear solver. More...
 
bool mReshapeMatrixFlag = false
 The set containing the DoF of the system. More...
 
bool mDofSetIsInitialized = false
 If the matrix is reshaped each step. More...
 
bool mCalculateReactionsFlag = false
 Flag taking care if the dof set was initialized ot not. More...
 
unsigned int mEquationSystemSize
 Flag taking in account if it is needed or not to calculate the reactions. More...
 
int mEchoLevel = 0
 Number of degrees of freedom of the problem to be solve. More...
 
TSystemVectorPointerType mpReactionsVector
 

Type Definitions

typedef BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > BuilderAndSolverBaseType
 Definition of the base class. More...
 
typedef ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
 Definition of the base class. More...
 
typedef ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver > ClassType
 The definition of the current class. More...
 
typedef std::size_t SizeType
 
typedef std::size_t IndexType
 
typedef BaseType::TSchemeType TSchemeType
 Definition of the classes from the base class. More...
 
typedef BaseType::TDataType TDataType
 
typedef BaseType::DofsArrayType DofsArrayType
 
typedef BaseType::TSystemMatrixType TSystemMatrixType
 
typedef BaseType::TSystemVectorType TSystemVectorType
 
typedef BaseType::LocalSystemVectorType LocalSystemVectorType
 
typedef BaseType::LocalSystemMatrixType LocalSystemMatrixType
 
typedef BaseType::TSystemMatrixPointerType TSystemMatrixPointerType
 
typedef BaseType::TSystemVectorPointerType TSystemVectorPointerType
 
typedef BaseType::NodeType NodeType
 
typedef BaseType::NodesArrayType NodesArrayType
 
typedef BaseType::ElementsArrayType ElementsArrayType
 
typedef BaseType::ConditionsArrayType ConditionsArrayType
 
typedef PointerVectorSet< Element, IndexedObjectElementsContainerType
 Additional definitions. More...
 
typedef Element::EquationIdVectorType EquationIdVectorType
 
typedef Element::DofsVectorType DofsVectorType
 
typedef boost::numeric::ublas::compressed_matrix< doubleCompressedMatrixType
 
typedef NodeType::DofType DofType
 DoF types definition. More...
 
typedef DofType::Pointer DofPointerType
 
typedef std::unordered_set< IndexTypeIndexSetType
 Set definition. More...
 
typedef std::unordered_map< IndexType, IndexTypeIndexMapType
 Map definition. More...
 
typedef MasterSlaveConstraint MasterSlaveConstraintType
 MPC definitions. More...
 
typedef MasterSlaveConstraint::Pointer MasterSlaveConstraintPointerType
 
typedef std::vector< IndexTypeVectorIndexType
 
typedef Vector VectorType
 
 KRATOS_CLASS_POINTER_DEFINITION (ResidualBasedEliminationBuilderAndSolverWithConstraints)
 Pointer definition of ResidualBasedEliminationBuilderAndSolverWithConstraints. More...
 

Operations

void SetUpSystem (ModelPart &rModelPart) override
 Organises the dofset in order to speed up the building phase. More...
 
void Build (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rb) override
 Function to perform the build of the RHS. The vector could be sized as the total number of dofs or as the number of unrestrained ones. More...
 
void BuildAndSolve (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b) override
 Function to perform the building and solving phase at the same time. More...
 
void BuildRHS (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemVectorType &b) override
 Function to perform the build of the RHS. More...
 
void SetUpDofSet (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart) override
 Builds the list of the DofSets involved in the problem by "asking" to each element and condition its Dofs. More...
 
Parameters GetDefaultParameters () const override
 This method provides the defaults parameters to avoid conflicts between the different constructors. More...
 
static std::string Name ()
 Returns the name of the class as used in the settings (snake_case format) More...
 

Additional Inherited Members

- Public Types inherited from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
typedef BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
 Definition of the base class. More...
 
typedef ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > ClassType
 The definition of the current class. More...
 
typedef BaseType::SizeType SizeType
 Definition of the classes from the base class. More...
 
typedef BaseType::IndexType IndexType
 
typedef BaseType::TSchemeType TSchemeType
 
typedef BaseType::TDataType TDataType
 
typedef BaseType::DofsArrayType DofsArrayType
 
typedef BaseType::TSystemMatrixType TSystemMatrixType
 
typedef BaseType::TSystemVectorType TSystemVectorType
 
typedef BaseType::LocalSystemVectorType LocalSystemVectorType
 
typedef BaseType::LocalSystemMatrixType LocalSystemMatrixType
 
typedef BaseType::TSystemMatrixPointerType TSystemMatrixPointerType
 
typedef BaseType::TSystemVectorPointerType TSystemVectorPointerType
 
typedef Element::EquationIdVectorType EquationIdVectorType
 Definition of the equation id vector. More...
 
typedef Element::DofsVectorType DofsVectorType
 
typedef Node NodeType
 Node definition. More...
 
typedef BaseType::NodesArrayType NodesArrayType
 Containers definition. More...
 
typedef BaseType::ElementsArrayType ElementsArrayType
 
typedef BaseType::ConditionsArrayType ConditionsArrayType
 
typedef BaseType::ElementsContainerType ElementsContainerType
 
- Public Types inherited from Kratos::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
typedef BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > ClassType
 The definition of the current class. More...
 
typedef std::size_t SizeType
 Definition of the size type. More...
 
typedef std::size_t IndexType
 Definition of the index type. More...
 
typedef TSparseSpace::DataType TDataType
 Definition of the data type. More...
 
typedef TSparseSpace::MatrixType TSystemMatrixType
 Definition of the sparse matrix. More...
 
typedef TSparseSpace::VectorType TSystemVectorType
 Definition of the vector size. More...
 
typedef TSparseSpace::MatrixPointerType TSystemMatrixPointerType
 Definition of the pointer to the sparse matrix. More...
 
typedef TSparseSpace::VectorPointerType TSystemVectorPointerType
 Definition of the pointer to the vector. More...
 
typedef TDenseSpace::MatrixType LocalSystemMatrixType
 The local matrix definition. More...
 
typedef TDenseSpace::VectorType LocalSystemVectorType
 The local vector definition. More...
 
typedef Scheme< TSparseSpace, TDenseSpace > TSchemeType
 Definition of the scheme type. More...
 
typedef ModelPart::DofType TDofType
 Definition of the DoF class. More...
 
typedef ModelPart::DofsArrayType DofsArrayType
 Definition of the DoF array type. More...
 
typedef ModelPart::NodesContainerType NodesArrayType
 The containers of the entities. More...
 
typedef ModelPart::ElementsContainerType ElementsArrayType
 
typedef ModelPart::ConditionsContainerType ConditionsArrayType
 
typedef PointerVectorSet< Element, IndexedObjectElementsContainerType
 The definition of the element container type. More...
 
- Static Public Member Functions inherited from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
static std::string Name ()
 Returns the name of the class as used in the settings (snake_case format) More...
 
- Static Public Member Functions inherited from Kratos::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >
static std::string Name ()
 Returns the name of the class as used in the settings (snake_case format) More...
 

Detailed Description

template<class TSparseSpace, class TDenseSpace, class TLinearSolver>
class Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >

Current class provides an implementation for standard builder and solving operations.

The RHS is constituted by the unbalanced loads (residual) Degrees of freedom are reordered putting the restrained degrees of freedom at the end of the system ordered in reverse order with respect to the DofSet. Imposition of the dirichlet conditions is naturally dealt with as the residual already contains this information. Calculation of the reactions involves a cost very similar to the calculation of the total residual The system is build in the following manner. A T matrix is assembled and constant vector g is assembled too. The T matrix contains the relations of all the dofs of the system, even the nodes with no master/slave relation. Then the size is n_total x n_red The relation u = T u_red Then: A_red = T^t A T b_red = T^t (b - A g)

Todo:
There is a more efficient way to asemble the system, but more costly, which is the following. In this case T will be only a relation matrix between master and slave dofs. Then n_slave x n_master: us = T um + g Separating into independent dofs, master ans slave dofs: u = uu um us A = Auu Aum Aus Amu Amm Ams Asu Asm Ass b = bu bm bs Finally: A_red = Auu Aum + Aus T Amu + T^t Asu Amm + T^t Ams^t + Ams T + T^t Ass T b_red = bu - Aus g bm - Ams g

This system requires extra care and is more complicated and requires to compute the blocks properly

Author
Vicente Mataix Ferrandiz

Member Typedef Documentation

◆ BaseType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef ResidualBasedEliminationBuilderAndSolver<TSparseSpace, TDenseSpace, TLinearSolver> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::BaseType

Definition of the base class.

◆ BuilderAndSolverBaseType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BuilderAndSolver<TSparseSpace, TDenseSpace, TLinearSolver> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::BuilderAndSolverBaseType

Definition of the base class.

◆ ClassType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef ResidualBasedEliminationBuilderAndSolverWithConstraints<TSparseSpace, TDenseSpace, TLinearSolver> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ClassType

The definition of the current class.

◆ CompressedMatrixType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef boost::numeric::ublas::compressed_matrix<double> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::CompressedMatrixType

◆ ConditionsArrayType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::ConditionsArrayType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ConditionsArrayType

◆ DofPointerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef DofType::Pointer Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::DofPointerType

◆ DofsArrayType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::DofsArrayType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::DofsArrayType

◆ DofsVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef Element::DofsVectorType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::DofsVectorType

◆ DofType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef NodeType::DofType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::DofType

DoF types definition.

◆ ElementsArrayType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::ElementsArrayType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ElementsArrayType

◆ ElementsContainerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef PointerVectorSet<Element, IndexedObject> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ElementsContainerType

Additional definitions.

◆ EquationIdVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef Element::EquationIdVectorType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::EquationIdVectorType

◆ IndexMapType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef std::unordered_map<IndexType, IndexType> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::IndexMapType

Map definition.

◆ IndexSetType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef std::unordered_set<IndexType> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::IndexSetType

Set definition.

◆ IndexType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef std::size_t Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::IndexType

◆ LocalSystemMatrixType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::LocalSystemMatrixType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::LocalSystemMatrixType

◆ LocalSystemVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::LocalSystemVectorType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::LocalSystemVectorType

◆ MasterSlaveConstraintPointerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef MasterSlaveConstraint::Pointer Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::MasterSlaveConstraintPointerType

◆ MasterSlaveConstraintType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef MasterSlaveConstraint Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::MasterSlaveConstraintType

MPC definitions.

◆ NodesArrayType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::NodesArrayType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::NodesArrayType

◆ NodeType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::NodeType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::NodeType

◆ SizeType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef std::size_t Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::SizeType

◆ TDataType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TDataType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::TDataType

◆ TSchemeType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TSchemeType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::TSchemeType

Definition of the classes from the base class.

◆ TSystemMatrixPointerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TSystemMatrixPointerType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemMatrixPointerType

◆ TSystemMatrixType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TSystemMatrixType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemMatrixType

◆ TSystemVectorPointerType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TSystemVectorPointerType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemVectorPointerType

◆ TSystemVectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef BaseType::TSystemVectorType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemVectorType

◆ VectorIndexType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef std::vector<IndexType> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::VectorIndexType

◆ VectorType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef Vector Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::VectorType

Constructor & Destructor Documentation

◆ ResidualBasedEliminationBuilderAndSolverWithConstraints() [1/3]

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ResidualBasedEliminationBuilderAndSolverWithConstraints ( )
inlineexplicit

Default constructor.

◆ ResidualBasedEliminationBuilderAndSolverWithConstraints() [2/3]

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ResidualBasedEliminationBuilderAndSolverWithConstraints ( typename TLinearSolver::Pointer  pNewLinearSystemSolver,
Parameters  ThisParameters 
)
inlineexplicit

Default constructor. (with parameters)

◆ ResidualBasedEliminationBuilderAndSolverWithConstraints() [3/3]

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ResidualBasedEliminationBuilderAndSolverWithConstraints ( typename TLinearSolver::Pointer  pNewLinearSystemSolver,
const bool  CheckConstraintRelation = true,
const bool  ResetRelationMatrixEachIteration = false 
)
inlineexplicit

Default constructor.

◆ ~ResidualBasedEliminationBuilderAndSolverWithConstraints()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::~ResidualBasedEliminationBuilderAndSolverWithConstraints ( )
inlineoverride

Destructor.

Member Function Documentation

◆ ApplyDirichletConditions()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ApplyDirichletConditions ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemMatrixType rA,
TSystemVectorType rDx,
TSystemVectorType rb 
)
inlineoverrideprotectedvirtual

Applies the dirichlet conditions. This operation may be very heavy or completely unexpensive depending on the implementation chosen and on how the System Matrix is built.

In the base ResidualBasedEliminationBuilderAndSolver does nothing, due to the fact that the BC are automatically managed with the elimination. But in the constraints approach the slave DoF depending on fixed DoFs must be reconstructed

Parameters
pSchemeThe integration scheme considered
rModelPartThe model part of the problem to solve
rAThe LHS matrix
rDxThe Unknowns vector
rbThe RHS vector

Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ AssembleRelationMatrix()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::AssembleRelationMatrix ( TSystemMatrixType rT,
const LocalSystemMatrixType rTransformationMatrix,
const EquationIdVectorType rSlaveEquationId,
const EquationIdVectorType rMasterEquationId 
)
inlineprotected

This method assembles the global relation matrix (T matrix used to impose the MPC)

Parameters
rTThe global relation matrix
rTransformationMatrixThe local transformation contribution
rSlaveEquationIdThe equation id of the slave dofs
rMasterEquationIdThe equation id of the master dofs

◆ AssignSettings()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::AssignSettings ( const Parameters  ThisParameters)
inlineoverrideprotectedvirtual

This method assigns settings to member variables.

Parameters
ThisParametersParameters that are assigned to the member variables

Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

Reimplemented in Kratos::ContactResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ Build()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::Build ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemMatrixType rA,
TSystemVectorType rb 
)
inlineoverridevirtual

Function to perform the build of the RHS. The vector could be sized as the total number of dofs or as the number of unrestrained ones.

Parameters
pSchemeThe integration scheme considered
rModelPartThe model part of the problem to solve
rAThe LHS matrix
rbThe RHS vector

Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ BuildAndSolve()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::BuildAndSolve ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemMatrixType A,
TSystemVectorType Dx,
TSystemVectorType b 
)
inlineoverridevirtual

Function to perform the building and solving phase at the same time.

It is ideally the fastest and safer function to use when it is possible to solve just after building

Parameters
pSchemeThe integration scheme considered
rModelPartThe model part of the problem to solve
AThe LHS matrix
DxThe Unknowns vector
bThe RHS vector

Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ BuildAndSolveWithConstraints()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::BuildAndSolveWithConstraints ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemMatrixType rA,
TSystemVectorType rDx,
TSystemVectorType rb 
)
inlineprotected

The same methods as the base class but with constraints.

Parameters
pSchemeThe pointer to the integration scheme
rModelPartThe model part to compute
rAThe LHS matrix of the system of equations
rDxThe vector of unknowns
rbThe RHS vector of the system of equations

◆ BuildRHS()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::BuildRHS ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemVectorType b 
)
inlineoverridevirtual

Function to perform the build of the RHS.

The vector could be sized as the total number of dofs or as the number of unrestrained ones

Parameters
pSchemeThe integration scheme considered
rModelPartThe model part of the problem to solve

Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ BuildRHSNoDirichlet()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::BuildRHSNoDirichlet ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemVectorType rb 
)
inlineprotected

Function to perform the build of the RHS.

The vector could be sized as the total number of dofs or as the number of unrestrained ones

Parameters
pSchemeThe integration scheme considered
rModelPartThe model part of the problem to solve
rbThe RHS of the system

◆ BuildRHSWithConstraints()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::BuildRHSWithConstraints ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemVectorType rb 
)
inlineprotected

The same methods as the base class but with constraints.

Parameters
pSchemeThe pointer to the integration scheme
rModelPartThe model part to compute
rbThe RHS vector of the system of equations

◆ BuildWithConstraints()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::BuildWithConstraints ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemMatrixType rA,
TSystemVectorType rb,
const bool  UseBaseBuild = true 
)
inlineprotected

This function is exactly same as the Build() function in base class except that the function.

It has the call to ApplyConstraints function call once the LHS or RHS are computed by elements and conditions

Parameters
pSchemeThe integration scheme considered
rModelPartThe model part of the problem to solve
rAThe LHS matrix
rbThe RHS vector
UseBaseBuildIf the abse Build function will be used

◆ CalculateReactions()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::CalculateReactions ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemMatrixType rA,
TSystemVectorType rDx,
TSystemVectorType rb 
)
inlineoverrideprotectedvirtual

It computes the reactions of the system.

Parameters
pSchemeThe pointer to the integration scheme
rModelPartThe model part to compute
rAThe LHS matrix of the system of equations
rDxThe vector of unknowns
rbThe RHS vector of the system of equations

Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ Clear()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::Clear ( )
inlineoverrideprotectedvirtual

This function is intended to be called at the end of the solution step to clean up memory storage not needed.

Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ ConstructMatrixStructure()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ConstructMatrixStructure ( typename TSchemeType::Pointer  pScheme,
TSystemMatrixType rA,
ModelPart rModelPart 
)
inlineoverrideprotectedvirtual

This method constructs the relationship between the DoF.

Parameters
pSchemeThe integration scheme
rAThe LHS of the system
rModelPartThe model part which defines the problem

Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ ConstructMatrixStructureWithConstraints()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
virtual void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ConstructMatrixStructureWithConstraints ( typename TSchemeType::Pointer  pScheme,
TSystemMatrixType rA,
ModelPart rModelPart 
)
inlineprotectedvirtual

This function is exactly same as the ConstructMatrixStructure() function in base class except that the function.

Has the call to ApplyConstraints function call once the element and conditions compute their equation ids

Todo:
Move this method to a common class with block builder and solver with constraints

Definition of the eqautio id vector type

◆ ConstructRelationMatrixStructure()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
virtual void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ConstructRelationMatrixStructure ( typename TSchemeType::Pointer  pScheme,
TSystemMatrixType rT,
ModelPart rModelPart 
)
inlineprotectedvirtual

This function is exactly same as the ConstructMatrixStructure() function in base class except that the function has the call to ApplyConstraints function call once the element and conditions compute their equation slave_ids.

Parameters
pSchemeThe pointer to the integration scheme
rTThe global relation matrix
rModelPartThe model part to compute

Definition of the eqautio id vector type

◆ Create()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
BuilderAndSolverBaseType::Pointer Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::Create ( typename TLinearSolver::Pointer  pNewLinearSystemSolver,
Parameters  ThisParameters 
) const
inlineoverridevirtual

Create method.

Parameters
pNewLinearSystemSolverThe linear solver for the system of equations
ThisParametersThe configuration parameters

Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

Reimplemented in Kratos::ContactResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ GetDefaultParameters()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
Parameters Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::GetDefaultParameters ( ) const
inlineoverridevirtual

This method provides the defaults parameters to avoid conflicts between the different constructors.

Returns
The default parameters

Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

Reimplemented in Kratos::ContactResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ Info()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
std::string Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::Info ( ) const
inlineoverridevirtual

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::KRATOS_CLASS_POINTER_DEFINITION ( ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >  )

◆ Name()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
static std::string Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::Name ( )
inlinestatic

Returns the name of the class as used in the settings (snake_case format)

Returns
The name of the class

◆ PrintData()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::PrintData ( std::ostream &  rOStream) const
inlineoverridevirtual

◆ PrintInfo()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::PrintInfo ( std::ostream &  rOStream) const
inlineoverridevirtual

◆ ResizeAndInitializeVectors()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ResizeAndInitializeVectors ( typename TSchemeType::Pointer  pScheme,
TSystemMatrixPointerType pA,
TSystemVectorPointerType pDx,
TSystemVectorPointerType pb,
ModelPart rModelPart 
)
inlineoverrideprotectedvirtual

This method resize and initializes the system of euqations.

Additionally what is done in the base class the constraints are initialized

Parameters
pAThe pointer to the LHS matrix
pDxThe pointer to the vector of Unknowns
pbThe pointer to the RHS vector
rModelPartThe model part to be computed

Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ SetUpDofSet()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::SetUpDofSet ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart 
)
inlineoverridevirtual

Builds the list of the DofSets involved in the problem by "asking" to each element and condition its Dofs.

The list of dofs is stores inside the BuilderAndSolver as it is closely connected to the way the matrix and RHS are built

Parameters
pSchemeThe integration scheme considered
rModelPartThe model part of the problem to solve

Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

Reimplemented in Kratos::ContactResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ SetUpDofSetWithConstraints()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::SetUpDofSetWithConstraints ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart 
)
inlineprotected

Builds the list of the DofSets involved in the problem by "asking" to each element and condition its Dofs.

Equivalent to the ResidualBasedEliminationBuilderAndSolver but with constraints. The list of dofs is stores inside the BuilderAndSolver as it is closely connected to the way the matrix and RHS are built

Parameters
pSchemeThe integration scheme considered
rModelPartThe model part of the problem to solve

This corresponds with all the DoF of the system

This corresponds with the slave (the ones not solved after compacting the system using MPC)

Here we declare three sets.

  • The global set: Contains all the DoF of the system
  • The slave set: The DoF that are not going to be solved, due to MPC formulation

We transfer the temporal sets to our DoF set

◆ SetUpSystem()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::SetUpSystem ( ModelPart rModelPart)
inlineoverridevirtual

Organises the dofset in order to speed up the building phase.

Parameters
rModelPartThe model part of the problem to solve

Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

Reimplemented in Kratos::ContactResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ SystemSolveWithPhysics()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::SystemSolveWithPhysics ( TSystemMatrixType rA,
TSystemVectorType rDx,
TSystemVectorType rb,
ModelPart rModelPart 
)
inlineprotected

This is a call to the linear system solver (taking into account some physical particularities of the problem)

Parameters
rAThe LHS matrix
rDxThe Unknowns vector
rbThe RHS vector
rModelPartThe model part of the problem to solve

Member Data Documentation

◆ mCheckConstraintRelation

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
bool Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::mCheckConstraintRelation = false
protected

In order to know the corresponding EquaionId for each component of the reaction vector.

◆ mCleared

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
bool Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::mCleared = true
protected

If we compute the constant contribution of the MPC.

◆ mComputeConstantContribution

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
bool Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::mComputeConstantContribution = false
protected

If we reset the relation matrix at each iteration.

◆ mDoFMasterFixedSet

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
DofsArrayType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::mDoFMasterFixedSet
protected

This is vector contains the effective constant displacement.

◆ mDoFSlaveSet

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
DofsArrayType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::mDoFSlaveSet
protected

The set containing the fixed master DoF of the system.

◆ mDoFToSolveSystemSize

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
SizeType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::mDoFToSolveSystemSize = 0
protected

The set containing the slave DoF of the system.

◆ mpConstantVector

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
TSystemVectorPointerType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::mpConstantVector = NULL
protected

This is matrix containing the old LHS structure.

◆ mpDeltaConstantVector

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
TSystemVectorPointerType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::mpDeltaConstantVector = NULL
protected

This is vector containing the rigid movement of the constraint.

◆ mpOldAMatrix

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
TSystemMatrixPointerType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::mpOldAMatrix = NULL
protected

This is matrix containing the global relation for the constraints.

◆ mpTMatrix

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
TSystemMatrixPointerType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::mpTMatrix = NULL
protected

◆ mReactionEquationIdMap

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
IndexMapType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::mReactionEquationIdMap
protected

Number of degrees of freedom of the problem to actually be solved.

◆ mResetRelationMatrixEachIteration

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
bool Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::mResetRelationMatrixEachIteration = false
protected

If we do a constraint check relation.


The documentation for this class was generated from the following file: