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 <relaxed_dof_updater.h>
Public Member Functions | |
void | Initialize (const DofsArrayType &rDofSet, const SystemVectorType &rDx) |
Initialize the DofUpdater in preparation for a subsequent UpdateDofs call. More... | |
void | Clear () |
Free internal storage to reset the instance and/or optimize memory consumption. More... | |
void | UpdateDofs (DofsArrayType &rDofSet, const SystemVectorType &rDx) |
Calculate new values for the problem's degrees of freedom using the update vector rDx. More... | |
std::string | Info () const |
Turn back information as a string. More... | |
void | Initialize (const DofsArrayType &rDofSet, const SystemVectorType &rDx) |
Initialize the DofUpdater in preparation for a subsequent UpdateDofs call. More... | |
void | Clear () |
Free internal storage to reset the instance and/or optimize memory consumption. More... | |
void | UpdateDofs (DofsArrayType &rDofSet, const SystemVectorType &rDx) |
Calculate new values for the problem's degrees of freedom using the update vector rDx. More... | |
std::string | Info () const |
Turn back information as a string. More... | |
Life Cycle | |
RelaxedDofUpdater (const double RelaxationFactor) | |
Default constructor. More... | |
RelaxedDofUpdater (RelaxedDofUpdater const &rOther)=delete | |
Deleted copy constructor. More... | |
virtual | ~RelaxedDofUpdater ()=default |
Destructor. More... | |
RelaxedDofUpdater & | operator= (RelaxedDofUpdater 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 RelaxedDofUpdater 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 | DofType = typename BaseType::DofType |
using | DofsArrayType = typename BaseType::DofsArrayType |
using | SystemVectorType = typename TSparseSpace::VectorType |
KRATOS_CLASS_POINTER_DEFINITION (RelaxedDofUpdater) | |
Pointer definition of RelaxedDofUpdater. 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] * Relaxation This operation is a simple loop in shared memory, but requires additional infrastructure in MPI, to obtain out-of-process update data. RelaxedDofUpdater takes care of both the operation and the eventual auxiliary infrastructure.
using Kratos::RelaxedDofUpdater< TSparseSpace >::BaseType = DofUpdater<TSparseSpace> |
using Kratos::RelaxedDofUpdater< TSparseSpace >::DofsArrayType = typename BaseType::DofsArrayType |
using Kratos::RelaxedDofUpdater< TSparseSpace >::DofType = typename BaseType::DofType |
using Kratos::RelaxedDofUpdater< TSparseSpace >::SystemVectorType = typename TSparseSpace::VectorType |
|
inline |
Default constructor.
|
delete |
Deleted copy constructor.
|
virtualdefault |
Destructor.
|
virtual |
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 from Kratos::DofUpdater< TSparseSpace >.
|
virtual |
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 from Kratos::DofUpdater< TSparseSpace >.
|
overridevirtual |
Free internal storage to reset the instance and/or optimize memory consumption.
Note that the base RelaxedDofUpdater does not have internal data, so this does nothing.
Reimplemented from Kratos::DofUpdater< TSparseSpace >.
|
inlineoverridevirtual |
Create a new instance of this class.
This function is used by the SparseSpace class to create new RelaxedDofUpdater instances of the appropriate type.
Reimplemented from Kratos::DofUpdater< TSparseSpace >.
|
virtual |
Turn back information as a string.
Reimplemented from Kratos::DofUpdater< TSparseSpace >.
|
virtual |
Turn back information as a string.
Reimplemented from Kratos::DofUpdater< TSparseSpace >.
|
overridevirtual |
Turn back information as a string.
Reimplemented from Kratos::DofUpdater< TSparseSpace >.
|
virtual |
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 from Kratos::DofUpdater< TSparseSpace >.
|
virtual |
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 from Kratos::DofUpdater< TSparseSpace >.
|
overridevirtual |
Initialize the RelaxedDofUpdater in preparation for a subsequent UpdateDofs call.
Note that the base RelaxedDofUpdater does not have internal data, so this does nothing.
[in] | rDofSet | The list of degrees of freedom. |
[in] | rDx | The update vector. |
Reimplemented from Kratos::DofUpdater< TSparseSpace >.
Kratos::RelaxedDofUpdater< TSparseSpace >::KRATOS_CLASS_POINTER_DEFINITION | ( | RelaxedDofUpdater< TSparseSpace > | ) |
Pointer definition of RelaxedDofUpdater.
|
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 >.
|
virtual |
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 >.
|
virtual |
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 >.
|
overridevirtual |
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. |
[in] | RelaxationFactor | Relaxation factor This method will check if Initialize() was called before and call it if necessary. |
Reimplemented from Kratos::DofUpdater< TSparseSpace >.