11 #ifndef MESH_CONTROLLER_UTILITIES_H
12 #define MESH_CONTROLLER_UTILITIES_H
82 : mrModelPart( modelPart )
104 for(
auto & node_i: mrModelPart.
Nodes())
105 noalias(node_i.Coordinates()) += node_i.FastGetSolutionStepValue(rInputVariable);
111 for(
auto & node_i: mrModelPart.
Nodes())
112 noalias(node_i.Coordinates()) -= node_i.FastGetSolutionStepValue(rInputVariable);
118 for(
auto & node_i: mrModelPart.
Nodes())
119 noalias(node_i.FastGetSolutionStepValue(MESH_CHANGE)) += node_i.FastGetSolutionStepValue(rInputVariable);
125 for(
auto & node_i: mrModelPart.
Nodes())
126 noalias(node_i.Coordinates()) = node_i.GetInitialPosition();
132 for(
auto & node_i: mrModelPart.
Nodes())
133 noalias(node_i.GetInitialPosition()) = node_i.Coordinates();
148 for(
auto & node_i: mrModelPart.
Nodes())
149 noalias(node_i.FastGetSolutionStepValue(rVariable)) = node_i.Coordinates();
156 for(
auto & node_i: mrModelPart.
Nodes()){
157 noalias(node_i.FastGetSolutionStepValue(rDistanceVariable)) =
158 node_i.FastGetSolutionStepValue(rInputVariable) - node_i.Coordinates();
166 for (
auto & node_i : mrModelPart.
Nodes())
167 noalias(node_i.FastGetSolutionStepValue(rSecondVariable)) += node_i.FastGetSolutionStepValue(rFirstVariable);
187 virtual std::string
Info()
const
189 return "MeshControllerUtilities";
195 rOStream <<
"MeshControllerUtilities";
Short class definition.
Definition: mesh_controller_utilities.h:68
void RevertMeshUpdateAccordingInputVariable(const Variable< array_1d< double, 3 >> &rInputVariable)
Definition: mesh_controller_utilities.h:109
void SetMeshToReferenceMesh()
Definition: mesh_controller_utilities.h:123
KRATOS_CLASS_POINTER_DEFINITION(MeshControllerUtilities)
Pointer definition of MeshControllerUtilities.
void AddFirstVariableToSecondVariable(const Variable< array_1d< double, 3 >> &rFirstVariable, const Variable< array_1d< double, 3 >> &rSecondVariable)
Definition: mesh_controller_utilities.h:163
void UpdateMeshAccordingInputVariable(const Variable< array_1d< double, 3 >> &rInputVariable)
Definition: mesh_controller_utilities.h:102
void SetDeformationVariablesToZero()
Definition: mesh_controller_utilities.h:137
virtual ~MeshControllerUtilities()
Destructor.
Definition: mesh_controller_utilities.h:87
void WriteCoordinatesToVariable(const Variable< array_1d< double, 3 >> &rVariable)
Definition: mesh_controller_utilities.h:146
virtual std::string Info() const
Turn back information as a string.
Definition: mesh_controller_utilities.h:187
MeshControllerUtilities(ModelPart &modelPart)
Default constructor.
Definition: mesh_controller_utilities.h:81
void SubtractCoordinatesFromVariable(const Variable< array_1d< double, 3 >> &rInputVariable, const Variable< array_1d< double, 3 >> &rDistanceVariable)
Definition: mesh_controller_utilities.h:153
void LogMeshChangeAccordingInputVariable(Variable< array_1d< double, 3 >> &rInputVariable)
Definition: mesh_controller_utilities.h:116
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: mesh_controller_utilities.h:193
void SetReferenceMeshToMesh()
Definition: mesh_controller_utilities.h:130
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: mesh_controller_utilities.h:199
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
VariablesList & GetNodalSolutionStepVariablesList()
Definition: model_part.h:549
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
This class implements a set of auxiliar, already parallelized, methods to perform some common tasks r...
Definition: variable_utils.h:63
void SetHistoricalVariableToZero(const Variable< TType > &rVariable, NodesContainerType &rNodes)
Sets the nodal value of any variable to zero.
Definition: variable_utils.h:757
bool Has(const VariableData &rThisVariable) const
Definition: variables_list.h:372
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484