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.
|
Current class provides an implementation for standard builder and solving operations. More...
#include <residualbased_elimination_builder_and_solver_with_constraints.h>
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 DofsArrayType & | GetDofSet () |
It allows to get the list of Dofs from the element. More... | |
virtual const DofsArrayType & | GetDofSet () 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 |
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, IndexedObject > | ElementsContainerType |
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... | |
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)
This system requires extra care and is more complicated and requires to compute the blocks properly
typedef ResidualBasedEliminationBuilderAndSolver<TSparseSpace, TDenseSpace, TLinearSolver> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::BaseType |
Definition of the base class.
typedef BuilderAndSolver<TSparseSpace, TDenseSpace, TLinearSolver> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::BuilderAndSolverBaseType |
Definition of the base class.
typedef ResidualBasedEliminationBuilderAndSolverWithConstraints<TSparseSpace, TDenseSpace, TLinearSolver> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ClassType |
The definition of the current class.
typedef boost::numeric::ublas::compressed_matrix<double> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::CompressedMatrixType |
typedef BaseType::ConditionsArrayType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ConditionsArrayType |
typedef DofType::Pointer Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::DofPointerType |
typedef BaseType::DofsArrayType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::DofsArrayType |
typedef Element::DofsVectorType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::DofsVectorType |
typedef NodeType::DofType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::DofType |
DoF types definition.
typedef BaseType::ElementsArrayType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ElementsArrayType |
typedef PointerVectorSet<Element, IndexedObject> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::ElementsContainerType |
Additional definitions.
typedef Element::EquationIdVectorType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::EquationIdVectorType |
typedef std::unordered_map<IndexType, IndexType> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::IndexMapType |
Map definition.
typedef std::unordered_set<IndexType> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::IndexSetType |
Set definition.
typedef std::size_t Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::IndexType |
typedef BaseType::LocalSystemMatrixType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::LocalSystemMatrixType |
typedef BaseType::LocalSystemVectorType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::LocalSystemVectorType |
typedef MasterSlaveConstraint::Pointer Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::MasterSlaveConstraintPointerType |
typedef MasterSlaveConstraint Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::MasterSlaveConstraintType |
MPC definitions.
typedef BaseType::NodesArrayType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::NodesArrayType |
typedef BaseType::NodeType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::NodeType |
typedef std::size_t Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::SizeType |
typedef BaseType::TDataType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::TDataType |
typedef BaseType::TSchemeType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::TSchemeType |
Definition of the classes from the base class.
typedef BaseType::TSystemMatrixPointerType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemMatrixPointerType |
typedef BaseType::TSystemMatrixType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemMatrixType |
typedef BaseType::TSystemVectorPointerType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemVectorPointerType |
typedef BaseType::TSystemVectorType Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::TSystemVectorType |
typedef std::vector<IndexType> Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::VectorIndexType |
typedef Vector Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::VectorType |
|
inlineexplicit |
Default constructor.
|
inlineexplicit |
Default constructor. (with parameters)
|
inlineexplicit |
Default constructor.
|
inlineoverride |
Destructor.
|
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
pScheme | The integration scheme considered |
rModelPart | The model part of the problem to solve |
rA | The LHS matrix |
rDx | The Unknowns vector |
rb | The RHS vector |
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
|
inlineprotected |
This method assembles the global relation matrix (T matrix used to impose the MPC)
rT | The global relation matrix |
rTransformationMatrix | The local transformation contribution |
rSlaveEquationId | The equation id of the slave dofs |
rMasterEquationId | The equation id of the master dofs |
|
inlineoverrideprotectedvirtual |
This method assigns settings to member variables.
ThisParameters | Parameters that are assigned to the member variables |
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
Reimplemented in Kratos::ContactResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >.
|
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.
pScheme | The integration scheme considered |
rModelPart | The model part of the problem to solve |
rA | The LHS matrix |
rb | The RHS vector |
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
|
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
pScheme | The integration scheme considered |
rModelPart | The model part of the problem to solve |
A | The LHS matrix |
Dx | The Unknowns vector |
b | The RHS vector |
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
|
inlineprotected |
The same methods as the base class but with constraints.
pScheme | The pointer to the integration scheme |
rModelPart | The model part to compute |
rA | The LHS matrix of the system of equations |
rDx | The vector of unknowns |
rb | The RHS vector of the system of equations |
|
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
pScheme | The integration scheme considered |
rModelPart | The model part of the problem to solve |
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
|
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
pScheme | The integration scheme considered |
rModelPart | The model part of the problem to solve |
rb | The RHS of the system |
|
inlineprotected |
The same methods as the base class but with constraints.
pScheme | The pointer to the integration scheme |
rModelPart | The model part to compute |
rb | The RHS vector of the system of equations |
|
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
pScheme | The integration scheme considered |
rModelPart | The model part of the problem to solve |
rA | The LHS matrix |
rb | The RHS vector |
UseBaseBuild | If the abse Build function will be used |
|
inlineoverrideprotectedvirtual |
It computes the reactions of the system.
pScheme | The pointer to the integration scheme |
rModelPart | The model part to compute |
rA | The LHS matrix of the system of equations |
rDx | The vector of unknowns |
rb | The RHS vector of the system of equations |
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
|
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 >.
|
inlineoverrideprotectedvirtual |
This method constructs the relationship between the DoF.
pScheme | The integration scheme |
rA | The LHS of the system |
rModelPart | The model part which defines the problem |
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
|
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
Definition of the eqautio id vector type
|
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.
pScheme | The pointer to the integration scheme |
rT | The global relation matrix |
rModelPart | The model part to compute |
Definition of the eqautio id vector type
|
inlineoverridevirtual |
Create method.
pNewLinearSystemSolver | The linear solver for the system of equations |
ThisParameters | The configuration parameters |
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
Reimplemented in Kratos::ContactResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >.
|
inlineoverridevirtual |
This method provides the defaults parameters to avoid conflicts between the different constructors.
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
Reimplemented in Kratos::ContactResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >.
|
inlineoverridevirtual |
Turn back information as a string.
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >::KRATOS_CLASS_POINTER_DEFINITION | ( | ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver > | ) |
Pointer definition of ResidualBasedEliminationBuilderAndSolverWithConstraints.
|
inlinestatic |
Returns the name of the class as used in the settings (snake_case format)
|
inlineoverridevirtual |
Print object's data.
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
|
inlineoverridevirtual |
Print information about this object.
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
|
inlineoverrideprotectedvirtual |
This method resize and initializes the system of euqations.
Additionally what is done in the base class the constraints are initialized
pA | The pointer to the LHS matrix |
pDx | The pointer to the vector of Unknowns |
pb | The pointer to the RHS vector |
rModelPart | The model part to be computed |
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
|
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
pScheme | The integration scheme considered |
rModelPart | The model part of the problem to solve |
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
Reimplemented in Kratos::ContactResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >.
|
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
pScheme | The integration scheme considered |
rModelPart | The 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.
We transfer the temporal sets to our DoF set
|
inlineoverridevirtual |
Organises the dofset in order to speed up the building phase.
rModelPart | The model part of the problem to solve |
Reimplemented from Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.
Reimplemented in Kratos::ContactResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >.
|
inlineprotected |
This is a call to the linear system solver (taking into account some physical particularities of the problem)
rA | The LHS matrix |
rDx | The Unknowns vector |
rb | The RHS vector |
rModelPart | The model part of the problem to solve |
|
protected |
In order to know the corresponding EquaionId for each component of the reaction vector.
|
protected |
If we compute the constant contribution of the MPC.
|
protected |
If we reset the relation matrix at each iteration.
|
protected |
This is vector contains the effective constant displacement.
|
protected |
The set containing the fixed master DoF of the system.
|
protected |
The set containing the slave DoF of the system.
|
protected |
This is matrix containing the old LHS structure.
|
protected |
This is vector containing the rigid movement of the constraint.
|
protected |
This is matrix containing the global relation for the constraints.
|
protected |
|
protected |
Number of degrees of freedom of the problem to actually be solved.
|
protected |
If we do a constraint check relation.