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.
|
Utility class to update the values of degree of freedom (Dof) variables after solving the system. More...
#include <trilinos_dof_updater.h>
Public Member Functions | |
Life Cycle | |
TrilinosDofUpdater () | |
Default constructor. More... | |
TrilinosDofUpdater (TrilinosDofUpdater const &rOther)=delete | |
Deleted copy constructor. More... | |
~TrilinosDofUpdater () override | |
Destructor. More... | |
TrilinosDofUpdater & | operator= (TrilinosDofUpdater const &rOther)=delete |
Deleted assignment operator. More... | |
Operations | |
BaseType::UniquePointer | Create () const override |
Create a new instance of this class. More... | |
void | Initialize (const DofsArrayType &rDofSet, const SystemVectorType &rDx) override |
Initialize the DofUpdater in preparation for a subsequent UpdateDofs call. More... | |
void | Clear () override |
Free internal storage to reset the instance and/or optimize memory consumption. More... | |
void | UpdateDofs (DofsArrayType &rDofSet, const SystemVectorType &rDx) override |
Calculate new values for the problem's degrees of freedom using the update vector rDx. 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::DofUpdater< TSparseSpace > | |
DofUpdater () | |
Default constructor. More... | |
DofUpdater (DofUpdater const &rOther)=delete | |
Deleted copy constructor. More... | |
virtual | ~DofUpdater () |
Destructor. More... | |
DofUpdater & | operator= (DofUpdater const &rOther)=delete |
Deleted assignment operator. More... | |
virtual void | AssignDofs (DofsArrayType &rDofSet, const SystemVectorType &rX) |
Assign new values for the problem's degrees of freedom using the vector rX. More... | |
KRATOS_CLASS_POINTER_DEFINITION (DofUpdater) | |
Pointer definition of DofUpdater. More... | |
Type Definitions | |
using | BaseType = DofUpdater< TSparseSpace > |
using | DofsArrayType = typename BaseType::DofsArrayType |
using | SystemVectorType = typename BaseType::SystemVectorType |
KRATOS_CLASS_POINTER_DEFINITION (TrilinosDofUpdater) | |
Pointer definition of TrilinosDofUpdater. More... | |
Additional Inherited Members | |
Public Types inherited from Kratos::DofUpdater< TSparseSpace > | |
using | DofType = Dof< typename TSparseSpace::DataType > |
using | DofsArrayType = PointerVectorSet< DofType > |
using | SystemVectorType = typename TSparseSpace::VectorType |
Utility class to update the values of degree of freedom (Dof) variables after solving the system.
This class encapsulates the operation of updating nodal degrees of freedom after a system solution. In pseudo-code, the operation to be performed is for each dof: dof.variable += dx[dof.equation_id] This operation is a simple loop in shared memory, but requires additional infrastructure in MPI, to obtain out-of-process update data. TrilinosDofUpdater manages both the update operation and the auxiliary infrastructure.
using Kratos::TrilinosDofUpdater< TSparseSpace >::BaseType = DofUpdater<TSparseSpace> |
using Kratos::TrilinosDofUpdater< TSparseSpace >::DofsArrayType = typename BaseType::DofsArrayType |
using Kratos::TrilinosDofUpdater< TSparseSpace >::SystemVectorType = typename BaseType::SystemVectorType |
|
inline |
Default constructor.
|
delete |
Deleted copy constructor.
|
inlineoverride |
Destructor.
|
inlineoverridevirtual |
Free internal storage to reset the instance and/or optimize memory consumption.
Reimplemented from Kratos::DofUpdater< TSparseSpace >.
|
inlineoverridevirtual |
Create a new instance of this class.
This function is used by the SparseSpace class to create new DofUpdater instances of the appropriate type.
Reimplemented from Kratos::DofUpdater< TSparseSpace >.
|
inlineoverridevirtual |
Turn back information as a string.
Reimplemented from Kratos::DofUpdater< TSparseSpace >.
|
inlineoverridevirtual |
Initialize the DofUpdater in preparation for a subsequent UpdateDofs call.
[in] | rDofSet | The list of degrees of freedom. |
[in] | rDx | The update vector. The DofUpdater needs to be initialized only if the dofset changes. If the problem does not require creating/destroying nodes or changing the mesh graph, it is in general enough to intialize this tool once at the begining of the problem. If the dofset only changes under certain conditions (for example because the domain is remeshed every N iterations), it is enough to call the Clear method to let this class know that its auxiliary data has to be re-generated and Initialize will be called as part of the next UpdateDofs call. |
Reimplemented from Kratos::DofUpdater< TSparseSpace >.
Kratos::TrilinosDofUpdater< TSparseSpace >::KRATOS_CLASS_POINTER_DEFINITION | ( | TrilinosDofUpdater< TSparseSpace > | ) |
Pointer definition of TrilinosDofUpdater.
|
delete |
Deleted assignment operator.
|
inlineoverridevirtual |
Print object's data.
Reimplemented from Kratos::DofUpdater< TSparseSpace >.
|
inlineoverridevirtual |
Print information about this object.
Reimplemented from Kratos::DofUpdater< TSparseSpace >.
|
inlineoverridevirtual |
Calculate new values for the problem's degrees of freedom using the update vector rDx.
For each Dof in rDofSet, this function calculates the updated value for the corresponding variable as value += rDx[dof.EquationId()].
[in/out] | rDofSet The list of degrees of freedom. | |
[in] | rDx | The update vector. This method will check if Initialize() was called before and call it if necessary. |
Reimplemented from Kratos::DofUpdater< TSparseSpace >.