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.
|
Explicit Back-and-Forth Error Compensation Correction time-integration scheme. More...
#include <explicit_solving_strategy_bfecc.h>
Classes | |
struct | SubstepData |
Public Member Functions | |
Operations | |
void | Initialize () override |
Initialization of member variables and prior operations. 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::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > | |
ExplicitSolvingStrategy () | |
Default constructor. (empty) More... | |
ExplicitSolvingStrategy (ModelPart &rModelPart, Parameters ThisParameters) | |
Default constructor. (with parameters) More... | |
ExplicitSolvingStrategy (ModelPart &rModelPart, typename ExplicitBuilderType::Pointer pExplicitBuilder, bool MoveMeshFlag=false, int RebuildLevel=0) | |
Default constructor. More... | |
ExplicitSolvingStrategy (ModelPart &rModelPart, bool MoveMeshFlag=false, int RebuildLevel=0) | |
Default constructor. More... | |
ExplicitSolvingStrategy (const ExplicitSolvingStrategy &Other)=delete | |
virtual | ~ExplicitSolvingStrategy () |
KRATOS_CLASS_POINTER_DEFINITION (ExplicitSolvingStrategy) | |
void | Clear () override |
Clears the internal storage. More... | |
void | InitializeSolutionStep () override |
Performs all the required operations that should be done (for each step) before solving the solution step. More... | |
void | FinalizeSolutionStep () override |
Performs all the required operations that should be done (for each step) after solving the solution step. More... | |
bool | SolveSolutionStep () override |
Solves the current step. The function always return true as convergence is not checked in the explicit framework. More... | |
void | SetRebuildLevel (int Level) override |
int | GetRebuildLevel () const override |
This returns the build level. More... | |
ExplicitBuilderPointerType | pGetExplicitBuilder () |
Operations to get the pointer to the explicit builder and solver. More... | |
ExplicitBuilderType & | GetExplicitBuilder () |
Operations to get the explicit builder and solver. More... | |
const ExplicitBuilderType & | GetExplicitBuilder () const |
Operations to get the explicit builder and solver. More... | |
double | GetResidualNorm () override |
Operations to get the residual norm. More... | |
Public Member Functions inherited from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace > | |
SolvingStrategy () | |
Default constructor. More... | |
SolvingStrategy (ModelPart &rModelPart, Parameters ThisParameters) | |
Default constructor. (with parameters) More... | |
SolvingStrategy (ModelPart &rModelPart, bool MoveMeshFlag=false) | |
Default constructor. More... | |
virtual | ~SolvingStrategy () |
KRATOS_CLASS_POINTER_DEFINITION (SolvingStrategy) | |
virtual void | Predict () |
Operation to predict the solution ... if it is not called a trivial predictor is used in which the values of the solution step of interest are assumed equal to the old values. More... | |
virtual double | Solve () |
The problem of interest is solved. More... | |
virtual bool | IsConverged () |
This should be considered as a "post solution" convergence check which is useful for coupled analysis. More... | |
virtual void | CalculateOutputData () |
This operations should be called before printing the results when non trivial results (e.g. stresses) need to be calculated given the solution of the step. More... | |
virtual void | SetEchoLevel (const int Level) |
This sets the level of echo for the solving strategy. More... | |
int | GetEchoLevel () |
This returns the level of echo for the solving strategy. More... | |
void | SetMoveMeshFlag (bool Flag) |
This function sets the flag that says if the mesh is moved. More... | |
bool | MoveMeshFlag () |
This function returns the flag that says if the mesh is moved. More... | |
bool | GetMoveMeshFlag () |
This function returns the flag that says if the mesh is moved. More... | |
virtual void | MoveMesh () |
This function is designed to move the mesh. More... | |
ModelPart & | GetModelPart () |
Operations to get the pointer to the model. More... | |
const ModelPart & | GetModelPart () const |
Operations to get the pointer to the model. More... | |
virtual int | Check () |
Function to perform expensive checks. More... | |
virtual TSystemMatrixType & | GetSystemMatrix () |
This method returns the LHS matrix. More... | |
virtual TSystemVectorType & | GetSystemVector () |
This method returns the RHS vector. More... | |
virtual TSystemVectorType & | GetSolutionVector () |
This method returns the solution vector. More... | |
Protected Member Functions | |
Protected Operations | |
void | SolveWithLumpedMassMatrix () override |
Calculate the explicit update This method is intended to implement the explicit update calculation Note that it has to be implemented according to the explicit scheme in a derived class. More... | |
LocalSystemVectorType | CopySolutionStepData (const SubstepData SData) |
LocalSystemVectorType | ExtractSolutionStepData (const SizeType BufferPosition) const |
virtual void | InitializeBFECCForwardSubstep () |
Initialize the BFECC initial forward substep This method is intended to implement all the operations required before each BFECC initial forward substep. More... | |
virtual void | FinalizeBFECCForwardSubstep () |
Finalize the BFECC initial forward substep This method is intended to implement all the operations required after each BFECC initial forward substep. More... | |
virtual void | InitializeBFECCBackwardSubstep () |
Initialize the BFECC backward substep This method is intended to implement all the operations required before each BFECC backward substep. More... | |
virtual void | FinalizeBFECCBackwardSubstep () |
Finalize the BFECC backward substep This method is intended to implement all the operations required after each BFECC backward substep. More... | |
virtual void | InitializeBFECCFinalSubstep () |
Initialize the BFECC final substep This method is intended to implement all the operations required before each BFECC final substep. More... | |
virtual void | FinalizeBFECCFinalSubstep () |
Finalize the BFECC final substep This method is intended to implement all the operations required after each BFECC final substep. More... | |
virtual void | PerformSubstep (const Substep SubstepType) |
Performs a substep. More... | |
void | CorrectErrorAfterForwardsAndBackwards (const LocalSystemVectorType &rPrevStepSolution) |
Protected Member Functions inherited from Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > | |
virtual double | GetDeltaTime () |
Get the Delta Time object This method returns the DELTA_TIME from the ProcessInfo container. More... | |
Protected Member Functions inherited from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace > | |
virtual Parameters | ValidateAndAssignParameters (Parameters ThisParameters, const Parameters DefaultParameters) const |
This method validate and assign default parameters. More... | |
Type Definitions | |
enum | Substep { FORWARD , BACKWARD , FINAL } |
typedef ModelPart::SizeType | SizeType |
typedef SolvingStrategy< TSparseSpace, TDenseSpace > | SolvingStrategyType |
typedef ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > | BaseType |
typedef ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace > | ClassType |
The definition of the current class. More... | |
typedef BaseType::ExplicitBuilderType | ExplicitBuilderType |
typedef BaseType::DofType | DofType |
The DOF type. More... | |
typedef TDenseSpace::VectorType | LocalSystemVectorType |
The local vector definition. More... | |
typedef TDenseSpace::MatrixType | LocalSystemMatrixType |
KRATOS_CLASS_POINTER_DEFINITION (ExplicitSolvingStrategyBFECC) | |
Life Cycle | |
ExplicitSolvingStrategyBFECC () | |
Default constructor. (empty) More... | |
ExplicitSolvingStrategyBFECC (ModelPart &rModelPart, Parameters ThisParameters) | |
Default constructor. (with parameters) More... | |
ExplicitSolvingStrategyBFECC (ModelPart &rModelPart, typename ExplicitBuilderType::Pointer pExplicitBuilder, bool MoveMeshFlag=false, int RebuildLevel=0) | |
Default constructor. More... | |
ExplicitSolvingStrategyBFECC (ModelPart &rModelPart, bool MoveMeshFlag=false, int RebuildLevel=0) | |
Default constructor. More... | |
SolvingStrategyType::Pointer | Create (ModelPart &rModelPart, Parameters ThisParameters) const override |
Create method. More... | |
ExplicitSolvingStrategyBFECC (const ExplicitSolvingStrategyBFECC &Other)=delete | |
~ExplicitSolvingStrategyBFECC () override=default | |
virtual Parameters | GetDefaultParameters () const override |
This method provides the defaults parameters to avoid conflicts between the different constructors. More... | |
virtual void | AssignSettings (const Parameters ThisParameters) override |
This method assigns settings to member variables. 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::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > | |
typedef ExplicitBuilder< TSparseSpace, TDenseSpace > | ExplicitBuilderType |
typedef ExplicitBuilderType::Pointer | ExplicitBuilderPointerType |
typedef ExplicitBuilderType::DofType | DofType |
typedef SolvingStrategy< TSparseSpace, TDenseSpace > | BaseType |
The definition of the base class. More... | |
typedef ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > | ClassType |
The definition of the current class. More... | |
Public Types inherited from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace > | |
typedef TSparseSpace::DataType | TDataType |
typedef TSparseSpace::MatrixType | TSystemMatrixType |
typedef TSparseSpace::VectorType | TSystemVectorType |
typedef TSparseSpace::MatrixPointerType | TSystemMatrixPointerType |
typedef TSparseSpace::VectorPointerType | TSystemVectorPointerType |
typedef TDenseSpace::MatrixType | LocalSystemMatrixType |
typedef TDenseSpace::VectorType | LocalSystemVectorType |
typedef SolvingStrategy< TSparseSpace, TDenseSpace > | ClassType |
typedef ModelPart::DofType | TDofType |
typedef ModelPart::DofsArrayType | DofsArrayType |
typedef ModelPart::NodesContainerType | NodesArrayType |
typedef ModelPart::ElementsContainerType | ElementsArrayType |
typedef ModelPart::ConditionsContainerType | ConditionsArrayType |
Static Public Member Functions inherited from Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > | |
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::SolvingStrategy< TSparseSpace, TDenseSpace > | |
static std::string | Name () |
Returns the name of the class as used in the settings (snake_case format) More... | |
Protected Attributes inherited from Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace > | |
int | mRebuildLevel |
Protected Attributes inherited from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace > | |
int | mEchoLevel |
Explicit Back-and-Forth Error Compensation Correction time-integration scheme.
:
This scheme evaluates the residual three times per step and has quadratic accuracy in time. Will only work for formulations reading from buffer positions 0, and 1. Behaviour when reading from buffer position 2 or greater is left unspecified.
Formulation:
Note that for this scheme to work, the formulation must preserve information during steps 1 and 2. Hence, all non-numerical dissipative terms must be disabled during these back-and-forth steps for the correction to make sense.
The following methods are provided in order to extend this class:
Reference: HASHEMI, Mohammad R.; ROSSI, Riccardo; RYZHAKOV, Pavel B. An enhanced non-oscillatory BFECC algorithm for finite element solution of advective transport problems. Computer Methods in Applied Mechanics and Engineering, 2022, 391: 114576.
typedef ExplicitSolvingStrategy<TSparseSpace, TDenseSpace> Kratos::ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >::BaseType |
typedef ExplicitSolvingStrategyBFECC<TSparseSpace, TDenseSpace> Kratos::ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >::ClassType |
The definition of the current class.
typedef BaseType::DofType Kratos::ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >::DofType |
The DOF type.
typedef BaseType::ExplicitBuilderType Kratos::ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >::ExplicitBuilderType |
typedef TDenseSpace::MatrixType Kratos::ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >::LocalSystemMatrixType |
typedef TDenseSpace::VectorType Kratos::ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >::LocalSystemVectorType |
The local vector definition.
typedef ModelPart::SizeType Kratos::ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >::SizeType |
typedef SolvingStrategy<TSparseSpace, TDenseSpace> Kratos::ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >::SolvingStrategyType |
enum Kratos::ExplicitSolvingStrategyBFECC::Substep |
|
inlineexplicit |
Default constructor. (empty)
|
inlineexplicit |
Default constructor. (with parameters)
rModelPart | The model part of the problem |
ThisParameters | The configuration parameters |
|
inlineexplicit |
Default constructor.
rModelPart | The model part to be computed |
pExplicitBuilder | The pointer to the explicit builder and solver |
MoveMeshFlag | The flag to set if the mesh is moved or not |
|
inlineexplicit |
Default constructor.
rModelPart | The model part to be computed |
MoveMeshFlag | The flag to set if the mesh is moved or not |
|
delete |
Copy constructor.
|
overridedefault |
Destructor.
|
inlineoverridevirtual |
This method assigns settings to member variables.
ThisParameters | Parameters that are assigned to the member variables |
Reimplemented from Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >.
Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace > >.
|
inlineprotected |
Ovrwrite the destination buffer position with data from the source buffer position. Additionally, we save in an auxiliary vector the value of the fixed DOFs in the destination buffer position.
|
inlineprotected |
Computes the error by comparing the buffer position 0 and the previous step solution. Then stores the corrected starting point in the buffer position 1.
rPrevStepSolution |
|
inlineoverridevirtual |
Create method.
rModelPart | The model part to be computed |
ThisParameters | The configuration parameters |
Reimplemented from Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >.
Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >.
|
inlineprotected |
|
inlineprotectedvirtual |
Finalize the BFECC backward substep This method is intended to implement all the operations required after each BFECC backward substep.
Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >.
|
inlineprotectedvirtual |
Finalize the BFECC final substep This method is intended to implement all the operations required after each BFECC final substep.
Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >.
|
inlineprotectedvirtual |
Finalize the BFECC initial forward substep This method is intended to implement all the operations required after each BFECC initial forward substep.
Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >.
|
inlineoverridevirtual |
This method provides the defaults parameters to avoid conflicts between the different constructors.
Reimplemented from Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >.
Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >, and Kratos::CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace > >.
|
inlineoverridevirtual |
Turn back information as a string.
Reimplemented from Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >.
Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace > >, and Kratos::CompressibleNavierStokesExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >.
|
inlineoverridevirtual |
Initialization of member variables and prior operations.
Reimplemented from Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >.
Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace > >.
|
inlineprotectedvirtual |
Initialize the BFECC backward substep This method is intended to implement all the operations required before each BFECC backward substep.
Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >.
|
inlineprotectedvirtual |
Initialize the BFECC final substep This method is intended to implement all the operations required before each BFECC final substep.
Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >.
|
inlineprotectedvirtual |
Initialize the BFECC initial forward substep This method is intended to implement all the operations required before each BFECC initial forward substep.
Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >.
Kratos::ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace >::KRATOS_CLASS_POINTER_DEFINITION | ( | ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace > | ) |
Counted pointer of ClassName
|
inlinestatic |
Returns the name of the class as used in the settings (snake_case format)
|
inlineprotectedvirtual |
Performs a substep.
Substep | The type of substep it is |
|
inlineoverridevirtual |
Print object's data.
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace > >.
|
inlineoverridevirtual |
Print information about this object.
Reimplemented from Kratos::SolvingStrategy< TSparseSpace, TDenseSpace >.
Reimplemented in Kratos::CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace > >.
|
inlineoverrideprotectedvirtual |
Calculate the explicit update This method is intended to implement the explicit update calculation Note that it has to be implemented according to the explicit scheme in a derived class.
Reimplemented from Kratos::ExplicitSolvingStrategy< TSparseSpace, TDenseSpace >.