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 <dof_updater.h>
Public Member Functions | |
Life Cycle | |
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... | |
Operations | |
virtual DofUpdater::UniquePointer | Create () const |
Create a new instance of this class. More... | |
virtual void | Initialize (const DofsArrayType &rDofSet, const SystemVectorType &rDx) |
Initialize the DofUpdater in preparation for a subsequent UpdateDofs call. More... | |
virtual void | Clear () |
Free internal storage to reset the instance and/or optimize memory consumption. More... | |
virtual void | UpdateDofs (DofsArrayType &rDofSet, const SystemVectorType &rDx) |
Calculate new values for the problem's degrees of freedom using the update vector rDx. More... | |
virtual void | AssignDofs (DofsArrayType &rDofSet, const SystemVectorType &rX) |
Assign new values for the problem's degrees of freedom using the vector rX. 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... | |
Type Definitions | |
using | DofType = Dof< typename TSparseSpace::DataType > |
using | DofsArrayType = PointerVectorSet< DofType > |
using | SystemVectorType = typename TSparseSpace::VectorType |
KRATOS_CLASS_POINTER_DEFINITION (DofUpdater) | |
Pointer definition of DofUpdater. More... | |
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. DofUpdater takes care of both the operation and the eventual auxiliary infrastructure.
using Kratos::DofUpdater< TSparseSpace >::DofsArrayType = PointerVectorSet<DofType> |
using Kratos::DofUpdater< TSparseSpace >::DofType = Dof<typename TSparseSpace::DataType> |
using Kratos::DofUpdater< TSparseSpace >::SystemVectorType = typename TSparseSpace::VectorType |
|
inline |
Default constructor.
|
delete |
Deleted copy constructor.
|
inlinevirtual |
Destructor.
|
inlinevirtual |
Assign new values for the problem's degrees of freedom using the vector rX.
For each Dof in rDofSet, this function assigns the value for the corresponding variable as value = rX[dof.EquationId()].
[in/out] | rDofSet The list of degrees of freedom. | |
[in] | rX | The solution vector. This method will check if Initialize() was called before and call it if necessary. |
|
inlinevirtual |
Free internal storage to reset the instance and/or optimize memory consumption.
Note that the base DofUpdater does not have internal data, so this does nothing.
Reimplemented in Kratos::TrilinosDofUpdater< TSparseSpace >, Kratos::RelaxedDofUpdater< TSparseSpace >, Kratos::RelaxedDofUpdater< TSparseSpace >, and Kratos::RelaxedDofUpdater< TSparseSpace >.
|
inlinevirtual |
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 in Kratos::TrilinosDofUpdater< TSparseSpace >, and Kratos::RelaxedDofUpdater< TSparseSpace >.
|
inlinevirtual |
Turn back information as a string.
Reimplemented in Kratos::TrilinosDofUpdater< TSparseSpace >, Kratos::RelaxedDofUpdater< TSparseSpace >, Kratos::RelaxedDofUpdater< TSparseSpace >, and Kratos::RelaxedDofUpdater< TSparseSpace >.
|
inlinevirtual |
Initialize the DofUpdater in preparation for a subsequent UpdateDofs call.
Note that the base DofUpdater does not have internal data, so this does nothing.
[in] | rDofSet | The list of degrees of freedom. |
[in] | rDx | The update vector. |
Reimplemented in Kratos::TrilinosDofUpdater< TSparseSpace >, Kratos::RelaxedDofUpdater< TSparseSpace >, Kratos::RelaxedDofUpdater< TSparseSpace >, and Kratos::RelaxedDofUpdater< TSparseSpace >.
Kratos::DofUpdater< TSparseSpace >::KRATOS_CLASS_POINTER_DEFINITION | ( | DofUpdater< TSparseSpace > | ) |
Pointer definition of DofUpdater.
|
delete |
Deleted assignment operator.
|
inlinevirtual |
Print object's data.
Reimplemented in Kratos::TrilinosDofUpdater< TSparseSpace >, and Kratos::RelaxedDofUpdater< TSparseSpace >.
|
inlinevirtual |
Print information about this object.
Reimplemented in Kratos::TrilinosDofUpdater< TSparseSpace >, and Kratos::RelaxedDofUpdater< TSparseSpace >.
|
inlinevirtual |
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 in Kratos::TrilinosDofUpdater< TSparseSpace >, Kratos::RelaxedDofUpdater< TSparseSpace >, Kratos::RelaxedDofUpdater< TSparseSpace >, and Kratos::RelaxedDofUpdater< TSparseSpace >.