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.
|
Solution scheme base class. More...
#include <solution_scheme.hpp>
Public Member Functions | |
Life Cycle | |
SolutionScheme () | |
Default Constructor. More... | |
SolutionScheme (Flags &rOptions) | |
Constructor. More... | |
SolutionScheme (IntegrationMethodsVectorType &rTimeVectorIntegrationMethods, Flags &rOptions) | |
Constructor. More... | |
SolutionScheme (IntegrationMethodsVectorType &rTimeVectorIntegrationMethods) | |
Constructor. More... | |
SolutionScheme (IntegrationMethodsScalarType &rTimeScalarIntegrationMethods, Flags &rOptions) | |
Constructor. More... | |
SolutionScheme (IntegrationMethodsScalarType &rTimeScalarIntegrationMethods) | |
Constructor. More... | |
SolutionScheme (IntegrationMethodsVectorType &rTimeVectorIntegrationMethods, IntegrationMethodsScalarType &rTimeScalarIntegrationMethods, Flags &rOptions) | |
Constructor. More... | |
SolutionScheme (IntegrationMethodsVectorType &rTimeVectorIntegrationMethods, IntegrationMethodsScalarType &rTimeScalarIntegrationMethods) | |
Constructor. More... | |
SolutionScheme (SolutionScheme &rOther) | |
Copy contructor. More... | |
virtual SolutionSchemePointerType | Clone () |
Clone. More... | |
~SolutionScheme () override | |
Destructor. More... | |
Access | |
void | SetOptions (Flags &rOptions) |
Sets strategy options. More... | |
Flags & | GetOptions () |
Get strategy options. More... | |
void | SetProcess (ProcessPointerType pProcess) |
Set process to execute after move_mesh. More... | |
void | SetProcessVector (ProcessPointerVectorType &rProcessVector) |
Set list of processes to execute after move_mesh. More... | |
Public Member Functions inherited from Kratos::Flags | |
Flags & | operator= (Flags const &rOther) |
Assignment operator. More... | |
operator bool () const | |
Flags | operator~ () const |
bool | operator! () const |
void | AssignFlags (Flags const &rOther) |
void | Set (const Flags ThisFlag) |
void | Set (const Flags ThisFlag, bool Value) |
void | Reset (const Flags ThisFlag) |
void | Flip (const Flags ThisFlag) |
void | SetPosition (IndexType Position, bool Value=true) |
bool | GetPosition (IndexType Position) const |
void | FlipPosition (IndexType Position) |
void | ClearPosition (IndexType Position) |
void | Clear () |
Flags | AsFalse () const |
bool | Is (Flags const &rOther) const |
bool | IsDefined (Flags const &rOther) const |
bool | IsNot (Flags const &rOther) const |
bool | IsNotDefined (Flags const &rOther) const |
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... | |
KRATOS_CLASS_POINTER_DEFINITION (Flags) | |
Pointer definition of Flags. More... | |
const Flags & | operator|= (const Flags &Other) |
const Flags & | operator&= (const Flags &Other) |
Flags () | |
Default constructor. More... | |
Flags (Flags const &rOther) | |
Copy constructor. More... | |
virtual | ~Flags () |
Destructor. More... | |
Protected Member Functions | |
Protected Operations | |
virtual void | InitializeElements (ModelPart &rModelPart) |
Initialize the elements. More... | |
virtual void | InitializeConditions (ModelPart &rModelPart) |
Initialize the conditions. More... | |
virtual void | InitializeNonLinearIteration (Condition::Pointer rCurrentCondition, ProcessInfo &rCurrentProcessInfo) |
Initialize the conditions. More... | |
virtual void | InitializeNonLinearIteration (Element::Pointer rCurrentElement, ProcessInfo &rCurrentProcessInfo) |
Initialize the elements. More... | |
virtual void | IntegrationMethodUpdate (NodeType &rNode) |
virtual void | IntegrationMethodPredict (NodeType &rNode) |
Protected Attributes | |
Protected member Variables | |
Flags | mOptions |
IntegrationMethodsVectorType | mTimeVectorIntegrationMethods |
IntegrationMethodsScalarType | mTimeScalarIntegrationMethods |
ProcessPointerVectorType | mProcesses |
Operations | |
void | SetDefaultFlags () |
SetDefaultSchemeFlags. More... | |
virtual void | Initialize (ModelPart &rModelPart) |
Performs all the required operations that should be done (for each step) before solving the solution step. More... | |
virtual void | InitializeSolutionStep (ModelPart &rModelPart) |
Performs all the required operations that should be done (for each step) before solving the solution step. More... | |
virtual void | FinalizeSolutionStep (ModelPart &rModelPart) |
Performs all the required operations that should be done (for each step) after solving the solution step. More... | |
virtual void | InitializeNonLinearIteration (ModelPart &rModelPart) |
Performs all the required operations that should be done (for each iteration) before solving a solution iteration. More... | |
virtual void | FinalizeNonLinearIteration (ModelPart &rModelPart) |
Performs all the required operations that should be done (for each iteration) after solving a solution iteration. More... | |
virtual void | Predict (ModelPart &rModelPart, DofsArrayType &rDofSet, SystemVectorType &rDx) |
Performing the prediction of the solution. More... | |
virtual void | Update (ModelPart &rModelPart, DofsArrayType &rDofSet, SystemVectorType &rDx) |
Performing the update of the solution. More... | |
virtual void | UpdateDofs (ModelPart &rModelPart, DofsArrayType &rDofSet, SystemVectorType &rDx) |
Performing the update of the solution Dofs. More... | |
virtual void | UpdateVariables (ModelPart &rModelPart) |
Performing the update of the solution variables. More... | |
virtual void | PredictVariables (ModelPart &rModelPart) |
Performing the prediction of the solution variables. More... | |
virtual void | MoveMesh (ModelPart &rModelPart) |
This function is designed to move the mesh. More... | |
virtual void | Clear (Element::Pointer rCurrentElement) |
Liberates internal storage for an element. More... | |
virtual void | Clear (Condition::Pointer rCurrentCondition) |
Liberates internal storage for a condition. More... | |
virtual void | Clear () |
Liberates internal storage. More... | |
virtual int | Check (ModelPart &rModelPart) |
This function is designed to be called once to perform all the checks needed. More... | |
virtual void | CalculateSystemContributions (Element::Pointer pCurrentElement, LocalSystemMatrixType &rLHS_Contribution, LocalSystemVectorType &rRHS_Contribution, Element::EquationIdVectorType &rEquationId, ProcessInfo &rCurrentProcessInfo) |
virtual void | Calculate_RHS_Contribution (Element::Pointer pCurrentElement, LocalSystemVectorType &rRHS_Contribution, Element::EquationIdVectorType &rEquationId, ProcessInfo &rCurrentProcessInfo) |
virtual void | Calculate_LHS_Contribution (Element::Pointer pCurrentElement, LocalSystemMatrixType &rLHS_Contribution, Element::EquationIdVectorType &rEquationId, ProcessInfo &rCurrentProcessInfo) |
virtual void | EquationId (Element::Pointer pCurrentElement, Element::EquationIdVectorType &rEquationId, ProcessInfo &rCurrentProcessInfo) |
virtual void | Condition_CalculateSystemContributions (Condition::Pointer pCurrentCondition, LocalSystemMatrixType &rLHS_Contribution, LocalSystemVectorType &rRHS_Contribution, Element::EquationIdVectorType &rEquationId, ProcessInfo &rCurrentProcessInfo) |
virtual void | Condition_Calculate_RHS_Contribution (Condition::Pointer pCurrentCondition, LocalSystemVectorType &rRHS_Contribution, Element::EquationIdVectorType &rEquationId, ProcessInfo &rCurrentProcessInfo) |
virtual void | Condition_Calculate_LHS_Contribution (Condition::Pointer pCurrentCondition, LocalSystemMatrixType &rLHS_Contribution, Element::EquationIdVectorType &rEquationId, ProcessInfo &rCurrentProcessInfo) |
virtual void | Condition_EquationId (Condition::Pointer pCurrentCondition, Element::EquationIdVectorType &rEquationId, ProcessInfo &rCurrentProcessInfo) |
virtual void | GetElementalDofList (Element::Pointer pCurrentElement, Element::DofsVectorType &rElementalDofList, ProcessInfo &rCurrentProcessInfo) |
virtual void | GetConditionDofList (Condition::Pointer pCurrentCondition, Element::DofsVectorType &rConditionDofList, ProcessInfo &rCurrentProcessInfo) |
static void | SetSolution (ModelPart &rModelPart, DofsArrayType &rDofSet, SystemVectorType &rDx) |
Performing the update of the solution Dofs (total solution) More... | |
static void | AddSolution (ModelPart &rModelPart, DofsArrayType &rDofSet, SystemVectorType &rDx) |
Performing the update of the solution Dofs (incremental solution) More... | |
Additional Inherited Members | |
Public Types inherited from Kratos::Flags | |
enum | FlagsList { Flag0 = BlockType(1) , Flag1 = BlockType(1) << 1 , Flag2 = BlockType(1) << 2 , Flag3 = BlockType(1) << 3 , Flag4 = BlockType(1) << 4 , Flag5 = BlockType(1) << 5 , Flag6 = BlockType(1) << 6 , Flag7 = BlockType(1) << 7 , Flag8 = BlockType(1) << 8 , Flag9 = BlockType(1) << 9 , Flag10 = BlockType(1) << 10 , Flag11 = BlockType(1) << 11 , Flag12 = BlockType(1) << 12 , Flag13 = BlockType(1) << 13 , Flag14 = BlockType(1) << 14 , Flag15 = BlockType(1) << 15 , Flag16 = BlockType(1) << 16 , Flag17 = BlockType(1) << 17 , Flag18 = BlockType(1) << 18 , Flag19 = BlockType(1) << 19 , Flag20 = BlockType(1) << 20 , Flag21 = BlockType(1) << 21 , Flag22 = BlockType(1) << 22 , Flag23 = BlockType(1) << 23 , Flag24 = BlockType(1) << 24 , Flag25 = BlockType(1) << 25 , Flag26 = BlockType(1) << 26 , Flag27 = BlockType(1) << 27 , Flag28 = BlockType(1) << 28 , Flag29 = BlockType(1) << 29 , Flag30 = BlockType(1) << 30 } |
typedef int64_t | BlockType |
typedef int64_t | FlagType |
typedef std::size_t | IndexType |
Static Public Member Functions inherited from Kratos::Flags | |
static const Flags | AllDefined () |
static const Flags | AllTrue () |
static Flags | Create (IndexType ThisPosition, bool Value=true) |
Solution scheme base class.
This is the base class for the schemes
typedef ModelPart::ConditionsContainerType Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::ConditionsContainerType |
typedef ModelPart::DofsArrayType Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::DofsArrayType |
typedef ModelPart::ElementsContainerType Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::ElementsContainerType |
typedef std::vector<IntegrationScalarPointerType> Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::IntegrationMethodsScalarType |
typedef std::vector<IntegrationVectorPointerType> Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::IntegrationMethodsVectorType |
typedef IntegrationScalarType::Pointer Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::IntegrationScalarPointerType |
typedef TimeIntegrationMethod<VariableScalarType, double> Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::IntegrationScalarType |
typedef IntegrationVectorType::Pointer Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::IntegrationVectorPointerType |
typedef TimeIntegrationMethod<VariableVectorType,VectorType> Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::IntegrationVectorType |
typedef SolverLocalFlags Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::LocalFlagType |
typedef TDenseSpace::MatrixType Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::LocalSystemMatrixType |
typedef TDenseSpace::VectorType Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::LocalSystemVectorType |
typedef ModelPart::NodesContainerType Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::NodesContainerType |
typedef ModelPart::NodeType Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::NodeType |
typedef SolverProcess::Pointer Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::ProcessPointerType |
typedef std::vector<ProcessPointerType> Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::ProcessPointerVectorType |
typedef SolutionSchemeType::Pointer Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::SolutionSchemePointerType |
typedef SolutionScheme<TSparseSpace,TDenseSpace> Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::SolutionSchemeType |
typedef TSparseSpace::MatrixType Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::SystemMatrixType |
typedef TSparseSpace::VectorType Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::SystemVectorType |
typedef Variable<double> Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::VariableScalarType |
typedef Variable<VectorType> Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::VariableVectorType |
typedef array_1d<double, 3> Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::VectorType |
|
inline |
Default Constructor.
|
inline |
Constructor.
|
inline |
Constructor.
|
inline |
Constructor.
|
inline |
Constructor.
|
inline |
Constructor.
|
inline |
Constructor.
|
inline |
Constructor.
|
inline |
Copy contructor.
|
inlineoverride |
Destructor.
|
inlinestatic |
Performing the update of the solution Dofs (incremental solution)
this function must be called only once per iteration
|
inlinevirtual |
This function is designed to calculate just the LHS contribution
pCurrentElement | The element to compute |
rLHS_Contribution | The LHS matrix contribution |
rEquationId | The ID's of the element degrees of freedom |
rCurrentProcessInfo | The current process info instance |
Reimplemented in Kratos::EigensolverScheme< TSparseSpace, TDenseSpace >.
|
inlinevirtual |
This function is designed to calculate just the RHS contribution
pCurrentElement | The element to compute |
rRHS_Contribution | The RHS vector contribution |
rEquationId | The ID's of the element degrees of freedom |
rCurrentProcessInfo | The current process info instance |
Reimplemented in Kratos::ExplicitCentralDifferencesScheme< TSparseSpace, TDenseSpace >, and Kratos::DynamicScheme< TSparseSpace, TDenseSpace >.
|
inlinevirtual |
these functions is designed to be called in the builder and solver to introduce the selected time integration scheme. It "asks" the matrix needed to the element and performs the operations needed to introduce the seected time integration scheme. this function calculates at the same time the contribution to the LHS and to the RHS of the system This function is designed to be called in the builder and solver to introduce
pCurrentElement | The element to compute |
rLHS_Contribution | The LHS matrix contribution |
rRHS_Contribution | The RHS vector contribution |
rEquationId | The ID's of the element degrees of freedom |
rCurrentProcessInfo | The current process info instance |
Reimplemented in Kratos::EigensolverScheme< TSparseSpace, TDenseSpace >, and Kratos::DynamicScheme< TSparseSpace, TDenseSpace >.
|
inlinevirtual |
This function is designed to be called once to perform all the checks needed.
Reimplemented in Kratos::StaticScheme< TSparseSpace, TDenseSpace >, Kratos::ExplicitCentralDifferencesScheme< TSparseSpace, TDenseSpace >, and Kratos::DynamicScheme< TSparseSpace, TDenseSpace >.
|
inlinevirtual |
Liberates internal storage.
|
inlinevirtual |
Liberates internal storage for a condition.
|
inlinevirtual |
Liberates internal storage for an element.
|
inlinevirtual |
|
inlinevirtual |
Functions that calculates the RHS of a "condition" object
rCurrentCondition | The condition to compute |
rRHS_Contribution | The RHS vector contribution |
rEquationId | The ID's of the condition degrees of freedom |
rCurrentProcessInfo | The current process info instance |
Reimplemented in Kratos::EigensolverScheme< TSparseSpace, TDenseSpace >.
|
inlinevirtual |
Functions totally analogous to the precedent but applied to the "condition" objects
rCurrentCondition | The condition to compute |
rLHS_Contribution | The LHS matrix contribution |
rRHS_Contribution | The RHS vector contribution |
rEquationId | The ID's of the element degrees of freedom |
rCurrentProcessInfo | The current process info instance |
Reimplemented in Kratos::ExplicitCentralDifferencesScheme< TSparseSpace, TDenseSpace >, and Kratos::DynamicScheme< TSparseSpace, TDenseSpace >.
|
inlinevirtual |
Functions totally analogous to the precedent but applied to the "condition" objects
pCurrentCondition | The condition to compute |
rLHS_Contribution | The LHS matrix contribution |
rRHS_Contribution | The RHS vector contribution |
rEquationId | The ID's of the element degrees of freedom |
rCurrentProcessInfo | The current process info instance |
Reimplemented in Kratos::DynamicScheme< TSparseSpace, TDenseSpace >, and Kratos::EigensolverScheme< TSparseSpace, TDenseSpace >.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Performs all the required operations that should be done (for each iteration) after solving a solution iteration.
this function must be called only once per iteration
|
inlinevirtual |
Performs all the required operations that should be done (for each step) after solving the solution step.
this function must be called only once per step.
|
inlinevirtual |
Function that returns the list of Degrees of freedom to be assembled in the system for a Given Element
rCurrentCondition | The condition to compute |
rConditionDofsList | The condition dofs list |
rCurrentProcessInfo | The current process info instance |
|
inlinevirtual |
Function that returns the list of Degrees of freedom to be assembled in the system for a Given Element
rCurrentElement | The element to compute |
rElementalDofsList | The element dofs list |
rCurrentProcessInfo | The current process info instance |
|
inline |
Get strategy options.
|
inlinevirtual |
Performs all the required operations that should be done (for each step) before solving the solution step.
This is intended to be called just once when the strategy is initialized
Reimplemented in Kratos::ExplicitCentralDifferencesScheme< TSparseSpace, TDenseSpace >, Kratos::StaticScheme< TSparseSpace, TDenseSpace >, Kratos::ExplicitCentralDifferencesScheme< TSparseSpace, TDenseSpace >, and Kratos::DynamicScheme< TSparseSpace, TDenseSpace >.
|
inlineprotectedvirtual |
Initialize the conditions.
This is intended to be called just once when the strategy is initialized
|
inlineprotectedvirtual |
Initialize the elements.
This is intended to be called just once when the strategy is initialized
|
inlineprotectedvirtual |
Initialize the conditions.
this function must be called only once per iteration
|
inlineprotectedvirtual |
Initialize the elements.
This is intended to be called every iteration
|
inlinevirtual |
Performs all the required operations that should be done (for each iteration) before solving a solution iteration.
this function must be called only once per iteration
|
inlinevirtual |
Performs all the required operations that should be done (for each step) before solving the solution step.
this function must be called only once per step.
Reimplemented in Kratos::ExplicitCentralDifferencesScheme< TSparseSpace, TDenseSpace >.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
Kratos::SolutionScheme< TSparseSpace, TDenseSpace >::KRATOS_CLASS_POINTER_DEFINITION | ( | SolutionScheme< TSparseSpace, TDenseSpace > | ) |
Pointer definition of SolutionScheme.
|
inlinevirtual |
This function is designed to move the mesh.
|
inlinevirtual |
Performing the prediction of the solution.
this function must be called only once per step.
Reimplemented in Kratos::StaticScheme< TSparseSpace, TDenseSpace >.
|
inlinevirtual |
Performing the prediction of the solution variables.
this function must be called only once per iteration
|
inline |
SetDefaultSchemeFlags.
This is intended to be called with the constructor
|
inline |
Sets strategy options.
|
inline |
Set process to execute after move_mesh.
|
inline |
Set list of processes to execute after move_mesh.
|
inlinestatic |
Performing the update of the solution Dofs (total solution)
this function must be called only once per iteration
|
inlinevirtual |
Performing the update of the solution.
this function must be called only once per iteration
Reimplemented in Kratos::StaticScheme< TSparseSpace, TDenseSpace >, and Kratos::ExplicitCentralDifferencesScheme< TSparseSpace, TDenseSpace >.
|
inlinevirtual |
Performing the update of the solution Dofs.
this function must be called only once per iteration
|
inlinevirtual |
Performing the update of the solution variables.
this function must be called only once per iteration
|
protected |
|
protected |
|
protected |
|
protected |