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 the base explicit builder and solving operations. More...
#include <explicit_builder.h>
Public Member Functions | |
Life Cycle | |
ExplicitBuilder (Parameters ThisParameters) | |
Construct a new Explicit Builder object Default constructor with Parameters. More... | |
ExplicitBuilder ()=default | |
Construct a new Explicit Builder object Default empty constructor. More... | |
virtual | ~ExplicitBuilder ()=default |
Destroy the Explicit Builder object Default destructor. More... | |
virtual ClassType::Pointer | Create (Parameters ThisParameters) const |
Create method. More... | |
Input and output | |
virtual std::string | Info () const |
Turn back information as a string. More... | |
virtual void | PrintInfo (std::ostream &rOStream) const |
Print information about this object. More... | |
virtual void | PrintData (std::ostream &rOStream) const |
Print object's data. More... | |
Protected Member Functions | |
Protected Operations | |
virtual void | SetUpDofSet (const ModelPart &rModelPart) |
Builds the list of the DofSets involved in the problem by "asking" to each element and condition its Dofs. More... | |
virtual void | SetUpDofSetEquationIds () |
Set the Up Dof Set Equation Ids object Set up the DOF set equation ids. More... | |
virtual void | SetUpLumpedMassVector (const ModelPart &rModelPart) |
Set the Up Lumped Mass Vector object This method sets up the lumped mass vector used in the explicit update. Note that it requires that the equation ids. are already set and the implementation of the mass contributions to be done in the element level in the CalculateLumpedMassVector method. More... | |
virtual void | InitializeDofSetReactions () |
Initialize the DOF set reactions For an already initialized dof set (mDofSet), this method sets to zero the corresponding reaction variable values. Note that in the explicit build the reactions are used as residual container. More... | |
virtual void | CalculateReactions () |
It computes the reactions of the system. More... | |
virtual Parameters | ValidateAndAssignParameters (Parameters ThisParameters, const Parameters DefaultParameters) const |
This method validate and assign default parameters. More... | |
virtual void | AssignSettings (const Parameters ThisParameters) |
This method assigns settings to member variables. More... | |
Protected Attributes | |
Protected member Variables | |
DofsArrayType | mDofSet |
TSystemVectorPointerType | mpLumpedMassVector |
The set containing the DoF of the system. More... | |
bool | mResetDofSetFlag = false |
bool | mResetLumpedMassVectorFlag = false |
If the DOF set requires to be set at each time step. More... | |
bool | mDofSetIsInitialized = false |
If the lumped mass vector requires to be set at each time step. More... | |
bool | mLumpedMassVectorIsInitialized = false |
Flag taking care if the dof set was initialized ot not. More... | |
bool | mCalculateReactionsFlag = false |
Flag taking care if the lumped mass vector was initialized or 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... | |
Type Definitions | |
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 ModelPart::DofType | DofType |
Definition of the DoF class. More... | |
typedef ModelPart::DofsArrayType | DofsArrayType |
Definition of the DoF array type. More... | |
typedef ModelPart::DofsVectorType | DofsVectorType |
Definition of the DoF vector type. More... | |
typedef std::unordered_set< DofType::Pointer, DofPointerHasher > | DofSetType |
The definition of the DoF set 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... | |
typedef ExplicitBuilder< TSparseSpace, TDenseSpace > | ClassType |
The definition of the current class. More... | |
KRATOS_CLASS_POINTER_DEFINITION (ExplicitBuilder) | |
Pointer definition of ExplicitBuilder. More... | |
Operations | |
bool | GetCalculateReactionsFlag () const |
This method returns the flag mCalculateReactionsFlag. More... | |
void | SetCalculateReactionsFlag (bool CalculateReactionsFlag) |
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 | GetResetDofSetFlag () const |
This method returns the flag mReshapeMatrixFlag. More... | |
void | SetResetDofSetFlag (bool ResetDofSetFlag) |
This method sets the flag mResetDofSetFlag. More... | |
bool | GetResetLumpedMassVectorFlag () const |
This method returns the flag GetResetLumpedMassVectorFlag. More... | |
void | SetResetLumpedMassVectorFlag (bool ResetLumpedMassVectorFlag) |
This method sets the flag mResetLumpedMassVectorFlag. More... | |
unsigned int | GetEquationSystemSize () const |
This method returns the value mEquationSystemSize. More... | |
DofsArrayType & | GetDofSet () |
It allows to get the list of Dofs from the element. More... | |
const DofsArrayType & | GetDofSet () const |
It allows to get the list of Dofs from the element. More... | |
TSystemVectorPointerType & | pGetLumpedMassMatrixVector () |
Get the lumped mass matrix vector pointer It allows to get the lumped mass matrix vector pointer. More... | |
TSystemVectorType & | GetLumpedMassMatrixVector () |
Get the lumped mass matrix vector It allows to get the lumped mass matrix vector. More... | |
virtual void | BuildRHS (ModelPart &rModelPart) |
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... | |
virtual void | BuildRHSNoDirichlet (ModelPart &rModelPart) |
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... | |
virtual void | ApplyConstraints (ModelPart &rModelPart) |
Applies the constraints. More... | |
virtual void | Initialize (ModelPart &rModelPart) |
It applied those operations that are expected to be executed once. More... | |
virtual void | InitializeSolutionStep (ModelPart &rModelPart) |
It applies certain operations at the system of equations at the beginning of the solution step. More... | |
virtual void | FinalizeSolutionStep (ModelPart &rModelPart) |
It applies certain operations at the system of equations at the end of the solution step. More... | |
virtual void | Clear () |
This function is intended to be called at the end of the solution step to clean up memory storage not needed. More... | |
virtual int | Check (const ModelPart &rModelPart) const |
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... | |
virtual Parameters | GetDefaultParameters () const |
This method provides the defaults parameters to avoid conflicts between the different constructors. More... | |
void | SetEchoLevel (int Level) |
It sets the level of echo for the solving strategy. More... | |
int | GetEchoLevel () const |
It returns the echo level. More... | |
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 the base explicit 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.
typedef ExplicitBuilder<TSparseSpace, TDenseSpace> Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::ClassType |
The definition of the current class.
typedef ModelPart::ConditionsContainerType Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::ConditionsArrayType |
typedef ModelPart::DofsArrayType Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::DofsArrayType |
Definition of the DoF array type.
typedef std::unordered_set<DofType::Pointer, DofPointerHasher> Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::DofSetType |
The definition of the DoF set type.
typedef ModelPart::DofsVectorType Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::DofsVectorType |
Definition of the DoF vector type.
typedef ModelPart::DofType Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::DofType |
Definition of the DoF class.
typedef ModelPart::ElementsContainerType Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::ElementsArrayType |
typedef PointerVectorSet<Element, IndexedObject> Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::ElementsContainerType |
The definition of the element container type.
typedef std::size_t Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::IndexType |
Definition of the index type.
typedef TDenseSpace::MatrixType Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::LocalSystemMatrixType |
The local matrix definition.
typedef TDenseSpace::VectorType Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::LocalSystemVectorType |
The local vector definition.
typedef ModelPart::NodesContainerType Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::NodesArrayType |
The containers of the entities.
typedef std::size_t Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::SizeType |
Definition of the size type.
typedef TSparseSpace::DataType Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::TDataType |
Definition of the data type.
typedef TSparseSpace::MatrixPointerType Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::TSystemMatrixPointerType |
Definition of the pointer to the sparse matrix.
typedef TSparseSpace::MatrixType Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::TSystemMatrixType |
Definition of the sparse matrix.
typedef TSparseSpace::VectorPointerType Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::TSystemVectorPointerType |
Definition of the pointer to the vector.
typedef TSparseSpace::VectorType Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::TSystemVectorType |
Definition of the vector size.
|
inlineexplicit |
Construct a new Explicit Builder object Default constructor with Parameters.
ThisParameters | The configuration parameters |
|
explicitdefault |
Construct a new Explicit Builder object Default empty constructor.
|
virtualdefault |
Destroy the Explicit Builder object Default destructor.
|
inlinevirtual |
Applies the constraints.
rModelPart | The model part to compute |
rA | The LHS matrix of the system of equations |
rb | The RHS vector of the system of equations |
|
inlineprotectedvirtual |
This method assigns settings to member variables.
ThisParameters | Parameters that are assigned to the member variables |
|
inlinevirtual |
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.
rModelPart | The model part to compute |
|
inlinevirtual |
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.
rModelPart | The model part to compute |
|
inlineprotectedvirtual |
It computes the reactions of the system.
rModelPart | The model part to compute |
|
inlinevirtual |
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.
rModelPart | The model part to compute |
|
inlinevirtual |
This function is intended to be called at the end of the solution step to clean up memory storage not needed.
|
inlinevirtual |
Create method.
ThisParameters | The configuration parameters |
|
inlinevirtual |
It applies certain operations at the system of equations at the end of the solution step.
rModelPart | The model part to compute |
|
inline |
This method returns the flag mCalculateReactionsFlag.
|
inlinevirtual |
This method provides the defaults parameters to avoid conflicts between the different constructors.
|
inline |
It allows to get the list of Dofs from the element.
|
inline |
It allows to get the list of Dofs from the element.
|
inline |
This method returns the flag mDofSetIsInitialized.
|
inline |
It returns the echo level.
|
inline |
This method returns the value mEquationSystemSize.
|
inline |
Get the lumped mass matrix vector It allows to get the lumped mass matrix vector.
|
inline |
This method returns the flag mReshapeMatrixFlag.
|
inline |
This method returns the flag GetResetLumpedMassVectorFlag.
|
inlinevirtual |
Turn back information as a string.
|
inlinevirtual |
It applied those operations that are expected to be executed once.
rModelPart |
|
inlineprotectedvirtual |
Initialize the DOF set reactions For an already initialized dof set (mDofSet), this method sets to zero the corresponding reaction variable values. Note that in the explicit build the reactions are used as residual container.
|
inlinevirtual |
It applies certain operations at the system of equations at the beginning of the solution step.
rModelPart | The model part to compute |
Kratos::ExplicitBuilder< TSparseSpace, TDenseSpace >::KRATOS_CLASS_POINTER_DEFINITION | ( | ExplicitBuilder< TSparseSpace, TDenseSpace > | ) |
Pointer definition of ExplicitBuilder.
|
inlinestatic |
Returns the name of the class as used in the settings (snake_case format)
|
inline |
Get the lumped mass matrix vector pointer It allows to get the lumped mass matrix vector pointer.
|
inlinevirtual |
Print object's data.
|
inlinevirtual |
Print information about this object.
|
inline |
This method sets the flag mCalculateReactionsFlag.
CalculateReactionsFlag | The flag that tells if the reactions are computed |
|
inline |
This method sets the flag mDofSetIsInitialized.
DofSetIsInitialized | The flag that tells if the dof set is initialized |
|
inline |
It sets the level of echo for the solving strategy.
Level | The level to set |
The different levels of echo are:
|
inline |
This method sets the flag mResetDofSetFlag.
mResetDofSetFlag | The flag that tells if we need to reset the DOF set |
|
inline |
This method sets the flag mResetLumpedMassVectorFlag.
ResetLumpedMassVectorFlag | The flag that tells if we need to reset the lumped mass vector |
|
inlineprotectedvirtual |
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 ExplicitBuilder as it is closely connected to the way the matrix and RHS are built
rModelPart | The model part to compute |
|
inlineprotectedvirtual |
Set the Up Dof Set Equation Ids object Set up the DOF set equation ids.
|
inlineprotectedvirtual |
Set the Up Lumped Mass Vector object This method sets up the lumped mass vector used in the explicit update. Note that it requires that the equation ids. are already set and the implementation of the mass contributions to be done in the element level in the CalculateLumpedMassVector method.
rModelPart | The model part to compute |
|
inlineprotectedvirtual |
This method validate and assign default parameters.
rParameters | Parameters to be validated |
DefaultParameters | The default parameters |
|
protected |
Flag taking care if the lumped mass vector was initialized or not.
|
protected |
|
protected |
If the lumped mass vector requires to be set at each time step.
|
protected |
Number of degrees of freedom of the problem to be solve.
|
protected |
Flag taking in account if it is needed or not to calculate the reactions.
|
protected |
Flag taking care if the dof set was initialized ot not.
|
protected |
The set containing the DoF of the system.
|
protected |
|
protected |
If the DOF set requires to be set at each time step.