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::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > Class Template Reference

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

#include <residualbased_elimination_builder_and_solver.h>

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

Public Member Functions

Life Cycle
 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
 
BaseType::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::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 Assemble (TSystemMatrixType &rA, TSystemVectorType &rb, const LocalSystemMatrixType &rLHSContribution, const LocalSystemVectorType &rRHSContribution, const Element::EquationIdVectorType &rEquationId)
 This method assembles the system. More...
 
virtual void ConstructMatrixStructure (typename TSchemeType::Pointer pScheme, TSystemMatrixType &rA, ModelPart &rModelPart)
 This method constructs the relationship between the DoF. 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)
 
void AssignSettings (const Parameters ThisParameters) override
 This method assigns settings to member variables. More...
 
- 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
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 > 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
 
 KRATOS_CLASS_POINTER_DEFINITION (ResidualBasedEliminationBuilderAndSolver)
 Pointer definition of ResidualBasedEliminationBuilderAndSolverWithConstraints. More...
 

Operations

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 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 BuildAndSolve (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
 Function to perform the building and solving phase at the same time. 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...
 
void BuildRHS (typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemVectorType &rb) 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...
 
void SetUpSystem (ModelPart &rModelPart) override
 Organises the dofset in order to speed up the building phase. 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
 This method computes the reactions. 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...
 
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...
 
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::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::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::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >

Current class provides an implementation for standard elimination 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

Author
Riccardo Rossi

Member Typedef Documentation

◆ BaseType

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

Definition of the base class.

◆ ClassType

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

The definition of the current class.

◆ ConditionsArrayType

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

◆ DofsArrayType

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

◆ DofsVectorType

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

◆ ElementsArrayType

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

◆ ElementsContainerType

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

◆ EquationIdVectorType

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

Definition of the equation id vector.

◆ IndexType

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

◆ LocalSystemMatrixType

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

◆ LocalSystemVectorType

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

◆ NodesArrayType

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

Containers definition.

◆ NodeType

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
typedef Node Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::NodeType

Node definition.

◆ SizeType

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

Definition of the classes from the base class.

◆ TDataType

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

◆ TSchemeType

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

◆ TSystemMatrixPointerType

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

◆ TSystemMatrixType

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

◆ TSystemVectorPointerType

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

◆ TSystemVectorType

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

Constructor & Destructor Documentation

◆ ResidualBasedEliminationBuilderAndSolver() [1/3]

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

Default constructor.

◆ ResidualBasedEliminationBuilderAndSolver() [2/3]

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

Default constructor. (with parameters)

◆ ResidualBasedEliminationBuilderAndSolver() [3/3]

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

Constructor.

◆ ~ResidualBasedEliminationBuilderAndSolver()

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

Destructor.

Member Function Documentation

◆ ApplyDirichletConditions()

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

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.

For explanation of how it works for a particular implementation the user should refer to the particular Builder And Solver chosen

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::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

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

◆ Assemble()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::Assemble ( TSystemMatrixType rA,
TSystemVectorType rb,
const LocalSystemMatrixType rLHSContribution,
const LocalSystemVectorType rRHSContribution,
const Element::EquationIdVectorType rEquationId 
)
inlineprotected

This method assembles the system.

Parameters
rAThe LHS of the system
rbThe RHS of the system
rLHSContributionThe LHS local contribution
rRHSContributionThe RHS local contribution
rEquationIdThe equation id
rLockArrayThe lock of the dof
Note
The main difference respect the block builder and solver is the fact that the fixed DoFs are not considered on the assembling

◆ AssembleLHS()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::AssembleLHS ( TSystemMatrixType rA,
LocalSystemMatrixType rLHSContribution,
EquationIdVectorType rEquationId 
)
inlineprotected

This method assembles the LHS of the system.

Parameters
rAThe LHS to assemble
rLHSContributionThe local LHS contribution
rEquationIdThe equation id

◆ AssembleRowContributionFreeDofs()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::AssembleRowContributionFreeDofs ( TSystemMatrixType rA,
const Matrix rALocal,
const IndexType  i,
const IndexType  i_local,
const Element::EquationIdVectorType EquationId 
)
inlineprotected

This function is equivalent to the AssembleRowContribution of the block builder and solver.

Note
The main difference respect the block builder and solver is the fact that the fixed DoFs are skipped

◆ AssignSettings()

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

◆ BackwardFind()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
IndexType Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::BackwardFind ( const IndexType  id_to_find,
const IndexType  start,
const IndexType index_vector 
)
inlineprotected

◆ Build()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolver< 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::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

Reimplemented in Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >, and Kratos::ResidualBasedEliminationBuilderAndSolverComponentwise< TSparseSpace, TDenseSpace, TLinearSolver, TVariableType >.

◆ BuildAndSolve()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::BuildAndSolve ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemMatrixType rA,
TSystemVectorType rDx,
TSystemVectorType rb 
)
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
rAThe LHS matrix
rDxThe Unknowns vector
rbThe RHS vector

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

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

◆ BuildLHS()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::BuildLHS ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemMatrixType rA 
)
inlineoverridevirtual

Function to perform the building of the LHS.

Depending on the implementation chosen the size of the matrix could be equal to the total number of Dofs or to the number of unrestrained dofs

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

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

◆ BuildLHS_CompleteOnFreeRows()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::BuildLHS_CompleteOnFreeRows ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
TSystemMatrixType rA 
)
inlineoverridevirtual

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.

This matrix is obtained by building the total matrix without the lines corresponding to the fixed degrees of freedom (but keeping the columns!!)

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

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

◆ BuildRHS()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::BuildRHS ( typename TSchemeType::Pointer  pScheme,
ModelPart rModelPart,
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

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

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

◆ BuildRHSAndSolve()

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

Corresponds to the previews, but the System's matrix is considered already built and only the RHS is built again.

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::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ CalculateReactions()

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

This method computes the reactions.

Parameters
pSchemeThe integration scheme considered
rModelPartThe model part considered
rAThe LHS of the system
rDxThe vector of Unknowns
rbThe RHS vector

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

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

◆ Check()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
int Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::Check ( ModelPart rModelPart)
inlineoverridevirtual

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.

Parameters
rModelPartThe model part of the problem to solve
Returns
0 all ok

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

◆ Clear()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::Clear ( )
inlineoverridevirtual

◆ ConstructMatrixStructure()

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

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 in Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >.

◆ Create()

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

◆ ForwardFind()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
IndexType Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::ForwardFind ( const IndexType  id_to_find,
const IndexType  start,
const IndexType index_vector 
)
inlineprotected

◆ GetDefaultParameters()

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

◆ Info()

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

◆ KRATOS_CLASS_POINTER_DEFINITION()

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

◆ Name()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
static std::string Kratos::ResidualBasedEliminationBuilderAndSolver< 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::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::PrintData ( std::ostream &  rOStream) const
inlineoverridevirtual

◆ PrintInfo()

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

◆ ResizeAndInitializeVectors()

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

This method resize and initializes the system of euqations.

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::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

Reimplemented in Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >, and Kratos::ResidualBasedEliminationBuilderAndSolverComponentwise< TSparseSpace, TDenseSpace, TLinearSolver, TVariableType >.

◆ SetUpDofSet()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolver< 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::BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >.

Reimplemented in Kratos::ResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >, Kratos::ContactResidualBasedEliminationBuilderAndSolverWithConstraints< TSparseSpace, TDenseSpace, TLinearSolver >, and Kratos::ResidualBasedEliminationBuilderAndSolverComponentwise< TSparseSpace, TDenseSpace, TLinearSolver, TVariableType >.

◆ SetUpSystem()

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

◆ SystemSolve()

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
void Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::SystemSolve ( TSystemMatrixType rA,
TSystemVectorType rDx,
TSystemVectorType rb 
)
inlineoverridevirtual

This is a call to the linear system solver.

Parameters
rAThe LHS matrix
rDxThe Unknowns vector
rbThe RHS vector

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

◆ SystemSolveWithPhysics()

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

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

◆ mScaleFactor

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
double Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::mScaleFactor = 1.0
protected

◆ mScalingDiagonal

template<class TSparseSpace , class TDenseSpace , class TLinearSolver >
SCALING_DIAGONAL Kratos::ResidualBasedEliminationBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver >::mScalingDiagonal = SCALING_DIAGONAL::NO_SCALING
protected

The manually set scale factor.


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