This class implements a set of auxiliar, already parallelized, methods to perform some common tasks related with the variable values and fixity.
More...
|
template<class TVarType > |
void | CopyModelPartNodalVar (const TVarType &rVariable, const TVarType &rDestinationVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const unsigned int ReadBufferStep, const unsigned int WriteBufferStep) |
| Copies the nodal value of a variable from an origin model part nodes to the nodes in a destination model part. It is assumed that both origin and destination model parts have the same number of nodes. More...
|
|
template<class TVarType > |
void | CopyModelPartNodalVar (const TVarType &rVariable, const TVarType &rDestinationVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const unsigned int BuffStep=0) |
| Copies the nodal value of a variable from an origin model part nodes to the nodes in a destination model part. It is assumed that both origin and destination model parts have the same number of nodes. More...
|
|
template<class TVarType > |
void | CopyModelPartNodalVar (const TVarType &rVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const unsigned int BuffStep=0) |
| Copies the nodal value of a variable from an origin model part nodes to the nodes in a destination model part. It is assumed that both origin and destination model parts have the same number of nodes. More...
|
|
template<class TVarType > |
void | CopyModelPartNodalVarToNonHistoricalVar (const TVarType &rVariable, const TVarType &rDestinationVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const unsigned int BuffStep=0) |
|
template<class TVarType > |
void | CopyModelPartNodalVarToNonHistoricalVar (const TVarType &rVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const unsigned int BuffStep=0) |
|
template<class TDataType > |
void | CopyModelPartFlaggedNodalHistoricalVarToHistoricalVar (const Variable< TDataType > &rOriginVariable, const Variable< TDataType > &rDestinationVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const Flags &rFlag, const bool CheckValue=true, const unsigned int ReadBufferStep=0, const unsigned int WriteBufferStep=0) |
|
template<class TDataType > |
void | CopyModelPartFlaggedNodalHistoricalVarToHistoricalVar (const Variable< TDataType > &rOriginVariable, const Variable< TDataType > &rDestinationVariable, ModelPart &rModelPart, const Flags &rFlag, const bool CheckValue=true, const unsigned int ReadBufferStep=0, const unsigned int WriteBufferStep=0) |
|
template<class TDataType > |
void | CopyModelPartFlaggedNodalHistoricalVarToHistoricalVar (const Variable< TDataType > &rVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const Flags &rFlag, const bool CheckValue=true, const unsigned int ReadBufferStep=0, const unsigned int WriteBufferStep=0) |
|
template<class TDataType > |
void | CopyModelPartFlaggedNodalHistoricalVarToNonHistoricalVar (const Variable< TDataType > &rOriginVariable, const Variable< TDataType > &rDestinationVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const Flags &rFlag, const bool CheckValue=true, const unsigned int ReadBufferStep=0) |
|
template<class TDataType > |
void | CopyModelPartFlaggedNodalHistoricalVarToNonHistoricalVar (const Variable< TDataType > &rOriginVariable, const Variable< TDataType > &rDestinationVariable, ModelPart &rModelPart, const Flags &rFlag, const bool CheckValue=true, const unsigned int ReadBufferStep=0) |
|
template<class TDataType > |
void | CopyModelPartFlaggedNodalHistoricalVarToNonHistoricalVar (const Variable< TDataType > &rVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const Flags &rFlag, const bool CheckValue=true, const unsigned int ReadBufferStep=0) |
|
template<class TDataType > |
void | CopyModelPartFlaggedNodalHistoricalVarToNonHistoricalVar (const Variable< TDataType > &rVariable, ModelPart &rModelPart, const Flags &rFlag, const bool CheckValue=true, const unsigned int ReadBufferStep=0) |
|
template<class TDataType > |
void | CopyModelPartFlaggedNodalNonHistoricalVarToHistoricalVar (const Variable< TDataType > &rOriginVariable, const Variable< TDataType > &rDestinationVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const Flags &rFlag, const bool CheckValue=true, const unsigned int WriteBufferStep=0) |
|
template<class TDataType > |
void | CopyModelPartFlaggedNodalNonHistoricalVarToHistoricalVar (const Variable< TDataType > &rOriginVariable, const Variable< TDataType > &rDestinationVariable, ModelPart &rModelPart, const Flags &rFlag, const bool CheckValue=true, const unsigned int WriteBufferStep=0) |
|
template<class TDataType > |
void | CopyModelPartFlaggedNodalNonHistoricalVarToHistoricalVar (const Variable< TDataType > &rVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const Flags &rFlag, const bool CheckValue=true, const unsigned int WriteBufferStep=0) |
|
template<class TDataType > |
void | CopyModelPartFlaggedNodalNonHistoricalVarToHistoricalVar (const Variable< TDataType > &rVariable, ModelPart &rModelPart, const Flags &rFlag, const bool CheckValue=true, const unsigned int WriteBufferStep=0) |
|
template<class TDataType > |
void | CopyModelPartFlaggedNodalNonHistoricalVarToNonHistoricalVar (const Variable< TDataType > &rOriginVariable, const Variable< TDataType > &rDestinationVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const Flags &rFlag, const bool CheckValue=true) |
|
template<class TDataType > |
void | CopyModelPartFlaggedNodalNonHistoricalVarToNonHistoricalVar (const Variable< TDataType > &rOriginVariable, const Variable< TDataType > &rDestinationVariable, ModelPart &rModelPart, const Flags &rFlag, const bool CheckValue=true) |
|
template<class TDataType > |
void | CopyModelPartFlaggedNodalNonHistoricalVarToNonHistoricalVar (const Variable< TDataType > &rVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const Flags &rFlag, const bool CheckValue=true) |
|
template<class TDataType > |
void | CopyModelPartFlaggedElementVar (const Variable< TDataType > &rOriginVariable, const Variable< TDataType > &rDestinationVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const Flags &rFlag, const bool CheckValue=true) |
|
template<class TDataType > |
void | CopyModelPartFlaggedElementVar (const Variable< TDataType > &rOriginVariable, const Variable< TDataType > &rDestinationVariable, ModelPart &rModelPart, const Flags &rFlag, const bool CheckValue=true) |
|
template<class TDataType > |
void | CopyModelPartFlaggedElementVar (const Variable< TDataType > &rVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const Flags &rFlag, const bool CheckValue=true) |
|
template<class TDataType > |
void | CopyModelPartFlaggedConditionVar (const Variable< TDataType > &rOriginVariable, const Variable< TDataType > &rDestinationVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const Flags &rFlag, const bool CheckValue=true) |
|
template<class TDataType > |
void | CopyModelPartFlaggedConditionVar (const Variable< TDataType > &rOriginVariable, const Variable< TDataType > &rDestinationVariable, ModelPart &rModelPart, const Flags &rFlag, const bool CheckValue=true) |
|
template<class TDataType > |
void | CopyModelPartFlaggedConditionVar (const Variable< TDataType > &rVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, const Flags &rFlag, const bool CheckValue=true) |
|
template<class TVarType > |
void | CopyModelPartElementalVar (const TVarType &rVariable, const ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart) |
| Copies the elemental value of a variable from an origin model part elements to the elements in a destination model part. It is assumed that both origin and destination model parts have the same number of elements. More...
|
|
template<class TDataType , class TVarType = Variable<TDataType>> |
void | SetVariable (const TVarType &rVariable, const TDataType &rValue, NodesContainerType &rNodes, const unsigned int Step=0) |
| Sets the nodal value of a scalar variable. More...
|
|
template<class TDataType , class TVarType = Variable<TDataType>> |
void | SetVariable (const TVarType &rVariable, const TDataType &rValue, NodesContainerType &rNodes, const Flags Flag, const bool CheckValue=true) |
| Sets the nodal value of a scalar variable (considering flag) More...
|
|
template<class TType , class TContainerType > |
void | SetNonHistoricalVariableToZero (const Variable< TType > &rVariable, TContainerType &rContainer) |
| Sets the nodal value of any variable to zero. More...
|
|
template<class TType > |
void | SetHistoricalVariableToZero (const Variable< TType > &rVariable, NodesContainerType &rNodes) |
| Sets the nodal value of any variable to zero. More...
|
|
template<class TType , class TContainerType , class TVarType = Variable< TType >> |
void | SetNonHistoricalVariable (const TVarType &rVariable, const TType &Value, TContainerType &rContainer) |
| Sets the container value of any type of non historical variable. More...
|
|
template<class TType , class TContainerType , class TVarType = Variable< TType >> |
void | SetNonHistoricalVariable (const TVarType &rVariable, const TType &rValue, TContainerType &rContainer, const Flags Flag, const bool Check=true) |
| Sets the container value of any type of non historical variable (considering flag) More...
|
|
template<class TContainerType , class TVarType > |
void | EraseNonHistoricalVariable (const TVarType &rVariable, TContainerType &rContainer) |
| Erases the container non historical variable. More...
|
|
template<class TContainerType > |
void | ClearNonHistoricalData (TContainerType &rContainer) |
| Clears the container data value container. More...
|
|
template<class TDataType , class TContainerType , class TWeightDataType > |
void | WeightedAccumulateVariableOnNodes (ModelPart &rModelPart, const Variable< TDataType > &rVariable, const Variable< TWeightDataType > &rWeightVariable, const bool IsInverseWeightProvided=false) |
| Distributes variable values in TContainerType container to nodes. More...
|
|
template<class TContainerType > |
void | SetFlag (const Flags &rFlag, const bool FlagValue, TContainerType &rContainer) |
| Sets a flag according to a given status over a given container. More...
|
|
template<class TContainerType > |
void | ResetFlag (const Flags &rFlag, TContainerType &rContainer) |
| Flips a flag over a given container. More...
|
|
template<class TContainerType > |
void | FlipFlag (const Flags &rFlag, TContainerType &rContainer) |
| Flips a flag over a given container. More...
|
|
template<class TDataType , class TVariableType = Variable<TDataType>> |
void | SaveVariable (const TVariableType &rOriginVariable, const TVariableType &rSavedVariable, NodesContainerType &rNodesContainer) |
| Takes the value of a non-historical variable and saves it in another variable For a nodal container, this takes the value of a non-historical variable and saves it in another one. More...
|
|
template<class TDataType , class TContainerType , class TVariableType = Variable<TDataType>> |
void | SaveNonHistoricalVariable (const TVariableType &rOriginVariable, const TVariableType &rSavedVariable, TContainerType &rContainer) |
| Takes the value of a non-historical variable and saves it in another historical variable For a non-nodal container, this method takes the value of an origin variable and saves it in a destination one. More...
|
|
template<class TDataType , class TVariableType = Variable<TDataType>> |
void | CopyVariable (const TVariableType &rOriginVariable, const TVariableType &rDestinationVariable, NodesContainerType &rNodesContainer) |
| Takes the value of an historical variable and sets it in another variable This function takes the value of an historical variable and sets in another variable in all the nodes of the provided container. More...
|
|
NodesContainerType | SelectNodeList (const DoubleVarType &Variable, const double Value, const NodesContainerType &rOriginNodes) |
| Returns a list of nodes filtered using the given double variable and value. More...
|
|
template<class TVarType > |
int | CheckVariableExists (const TVarType &rVariable, const NodesContainerType &rNodes) |
| Checks if all the nodes of a node set has the specified variable. More...
|
|
template<class TVarType > |
void | ApplyFixity (const TVarType &rVar, const bool IsFixed, NodesContainerType &rNodes) |
| Fixes or frees a variable for all of the nodes in the list. The dof has to exist. More...
|
|
template<class TVarType > |
void | ApplyFixity (const TVarType &rVariable, const bool IsFixed, NodesContainerType &rNodes, const Flags &rFlag, const bool CheckValue=true) |
| Fixes/Frees dofs based on a flag. More...
|
|
template<class TVarType > |
void | ApplyVector (const TVarType &rVar, const Vector &rData, NodesContainerType &rNodes) |
| Loops along a vector data to set its values to the nodes contained in a node set. More...
|
|
array_1d< double, 3 > | SumNonHistoricalNodeVectorVariable (const ArrayVarType &rVar, const ModelPart &rModelPart) |
| Returns the nodal value summation of a non-historical vector variable. More...
|
|
template<class TVarType > |
double | SumNonHistoricalNodeScalarVariable (const TVarType &rVar, const ModelPart &rModelPart) |
| Returns the nodal value summation of a non-historical scalar variable. More...
|
|
template<class TDataType , class TVarType = Variable<TDataType>> |
TDataType | SumHistoricalVariable (const TVarType &rVariable, const ModelPart &rModelPart, const unsigned int BuffStep=0) |
| This method accumulates and return a variable value For a nodal historical variable, this method accumulates and returns the summation in a model part. More...
|
|
array_1d< double, 3 > | SumConditionVectorVariable (const ArrayVarType &rVar, const ModelPart &rModelPart) |
| Returns the condition value summation of a historical vector variable. More...
|
|
template<class TVarType > |
double | SumConditionScalarVariable (const TVarType &rVar, const ModelPart &rModelPart) |
| Returns the condition value summation of a historical scalar variable. More...
|
|
array_1d< double, 3 > | SumElementVectorVariable (const ArrayVarType &rVar, const ModelPart &rModelPart) |
| Returns the element value summation of a historical vector variable. More...
|
|
template<class TVarType > |
double | SumElementScalarVariable (const TVarType &rVar, const ModelPart &rModelPart) |
| Returns the element value summation of a historical scalar variable. More...
|
|
template<class TVarType > |
void | AddDof (const TVarType &rVar, ModelPart &rModelPart) |
| This function add dofs to the nodes in a model part. It is useful since addition is done in parallel. More...
|
|
template<class TVarType > |
void | AddDofWithReaction (const TVarType &rVar, const TVarType &rReactionVar, ModelPart &rModelPart) |
| This function add dofs to the nodes in a model part. It is useful since addition is done in parallel. More...
|
|
bool | CheckVariableKeys () |
| This method checks the variable keys. More...
|
|
void | UpdateCurrentToInitialConfiguration (const ModelPart::NodesContainerType &rNodes) |
| This method updates the current nodal coordinates back to the initial coordinates. More...
|
|
void | UpdateInitialToCurrentConfiguration (const ModelPart::NodesContainerType &rNodes) |
| This method updates the initial nodal coordinates to the current coordinates. More...
|
|
void | UpdateCurrentPosition (const ModelPart::NodesContainerType &rNodes, const ArrayVarType &rUpdateVariable=DISPLACEMENT, const IndexType BufferPosition=0) |
| This method updates the current coordinates For each node, this method takes the value of the provided variable and updates the current position as the initial position (X0, Y0, Z0) plus such variable value. More...
|
|
template<class TVectorType = Vector> |
TVectorType | GetCurrentPositionsVector (const ModelPart::NodesContainerType &rNodes, const unsigned int Dimension) |
| This function returns the CURRENT coordinates of all the nodes in a consecutive vector. it allows working in 1D,2D or 3D For each node, this method takes the value of the provided variable and updates the current position as the initial position (X0, Y0, Z0) plus such variable value in case Dimension == 1 the vector is in the form (X X X ....) in case Dimension == 2 the vector is in the form (X Y X Y X Y ....) in case Dimension == 3 the vector is in the form (X Y Z X Y Z ....) More...
|
|
template<class TVectorType = Vector> |
TVectorType | GetInitialPositionsVector (const ModelPart::NodesContainerType &rNodes, const unsigned int Dimension) |
| This function returns the INITIAL coordinates of all the nodes in a consecutive vector. it allows working in 1D,2D or 3D For each node, this method takes the value of the provided variable and updates the current position as the initial position (X0, Y0, Z0) plus such variable value in case Dimension == 1 the vector is in the form (X0 X0 X0 ....) in case Dimension == 2 the vector is in the form (X0 Y0 X0 Y0 X0 Y0 ....) in case Dimension == 3 the vector is in the form (X0 Y0 Z0 X0 Y0 Z0 ....) More...
|
|
void | SetCurrentPositionsVector (ModelPart::NodesContainerType &rNodes, const Vector &rPositions) |
| This function represent the "set" counterpart of GetCurrentPositionsVector and allows setting the CURRENT coordinates of all the nodes considering them stored in a consecutive 1D vector. it allows working in 1D,2D or 3D For each node, this method takes the value of the provided variable and updates the current position as the initial position (X, Y, Z) plus such variable value in case Dimension == 1 the expected input vector is in the form (X X X ....) in case Dimension == 2 the expected input vector is in the form (X Y X Y X Y ....) in case Dimension == 3 the expected input vector is in the form (X Y Z X Y Z ....) More...
|
|
void | SetInitialPositionsVector (ModelPart::NodesContainerType &rNodes, const Vector &rPositions) |
| This function represent the "set" counterpart of GetInitialPositionsVector and allows setting the INITIAL coordinates of all the nodes considering them stored in a consecutive 1D vector. it allows working in 1D,2D or 3D For each node, this method takes the value of the provided variable and updates the current position as the initial position (X0, Y0, Z0) plus such variable value in case Dimension == 1 the expected input vector is in the form (X0 X0 X0 ....) in case Dimension == 2 the expected input vector is in the form (X0 Y0 X0 Y0 X0 Y0 ....) in case Dimension == 3 the expected input vector is in the form (X0 Y0 Z0 X0 Y0 Z0 ....) More...
|
|
Vector | GetSolutionStepValuesVector (const ModelPart::NodesContainerType &rNodes, const Variable< array_1d< double, 3 >> &rVar, const unsigned int Step, const unsigned int Dimension=3) |
| This function allows getting the database entries corresponding to rVar contained on all rNodes flattened so that the components of interest appear in the output vector. This version works with VECTOR VARIABLES (of type Variable<array_1d<double,3>>) In case Dimension is 1 one would obtain only the first component, for Dimension 2 the x and y component and for Dimension==3 the 3 components at once. More...
|
|
Vector | GetSolutionStepValuesVector (const ModelPart::NodesContainerType &rNodes, const Variable< double > &rVar, const unsigned int Step) |
| This function allows getting the database entries corresponding to rVar contained on all rNodes flattened so that the components of interest appear in the output vector. This version works with SCALAR VARIABLES (of type Variable<double>) In case Dimension is 1 one would obtain only the first component, for Dimension 2 the x and y component and for Dimension==3 the 3 components at once. More...
|
|
void | SetSolutionStepValuesVector (ModelPart::NodesContainerType &rNodes, const Variable< array_1d< double, 3 >> &rVar, const Vector &rData, const unsigned int Step) |
| This function allows setting the database entries corresponding to rVar contained on all rNodes given a flat array in which all the variable components are present consecutively. This version works with VECTOR VARIABLES (of type Variable<array_1d<double,3>>) More...
|
|
void | SetSolutionStepValuesVector (ModelPart::NodesContainerType &rNodes, const Variable< double > &rVar, const Vector &rData, const unsigned int Step) |
| This function allows setting the database entries corresponding to rVar contained on all rNodes given a flat array in which all the variable components are present consecutively. This version works with SCALAR VARIABLES (of type Variable<double>) More...
|
|
Vector | GetValuesVector (const ModelPart::NodesContainerType &rNodes, const Variable< array_1d< double, 3 >> &rVar, const unsigned int Dimension=3) |
| This function allows getting the database entries corresponding to rVar contained on all rNodes flattened so that the components of interest appear in the output vector. This version works with VECTOR VARIABLES (of type Variable<array_1d<double,3>>) In case Dimension is 1 one would obtain only the first component, for Dimension 2 the x and y component and for Dimension==3 the 3 components at once also note that this version accesses NON HISTORICAL data. More...
|
|
Vector | GetValuesVector (const ModelPart::NodesContainerType &rNodes, const Variable< double > &rVar) |
| This function allows getting the database entries corresponding to rVar contained on all rNodes flattened so that the components of interest appear in the output vector. This version works with SCALAR VARIABLES (of type Variable<double>) In case Dimension is 1 one would obtain only the first component, for Dimension 2 the x and y component and for Dimension==3 the 3 components at once also note that this version accesses NON HISTORICAL data. More...
|
|
void | SetValuesVector (ModelPart::NodesContainerType &rNodes, const Variable< array_1d< double, 3 >> &rVar, const Vector &rData) |
| This function allows setting the database entries corresponding to rVar contained on all rNodes given a flat array in which all the variable components are present consecutively. This version works with VECTOR VARIABLES (of type Variable<array_1d<double,3>>) also note that this version accesses NON HISTORICAL data. More...
|
|
void | SetValuesVector (ModelPart::NodesContainerType &rNodes, const Variable< double > &rVar, const Vector &rData) |
| This function allows setting the database entries corresponding to rVar contained on all rNodes given a flat array in which all the variable components are present consecutively. This version works with SCALAR VARIABLES (of type Variable<double>) also note that this version accesses NON HISTORICAL data. More...
|
|
template<class TContainerType , class... TVariableArgs> |
static void | SetNonHistoricalVariablesToZero (TContainerType &rContainer, const TVariableArgs &... rVariableArgs) |
| Set the Non Historical Variables To Zero This method sets the provided list of variables to zero in the non-historical database. More...
|
|
template<class... TVariableArgs> |
static void | SetHistoricalVariablesToZero (NodesContainerType &rNodes, const TVariableArgs &... rVariableArgs) |
| Set the Historical Variables To Zero This method sets the provided list of variables to zero in the nodal historical database. More...
|
|
static void | AddDofsList (const std::vector< std::string > &rDofsVarNamesList, ModelPart &rModelPart) |
| Add a list of DOFs to the nodes Provided a list with the DOFs variable names, this method adds such variables as DOFs to the nodes of the given model part. Note that the addition is performed at once. More...
|
|
static void | AddDofsWithReactionsList (const std::vector< std::array< std::string, 2 >> &rDofsAndReactionsNamesList, ModelPart &rModelPart) |
| Add a list of DOFs to the nodes Provided a list with the DOFs and reactions variable names, this method adds such variables as DOFs and reaction to the nodes of the given model part. Note that the addition is performed at once. More...
|
|
template<Globals::DataLocation TLocation, class TEntity , class TValue > |
static bool | HasValue (const TEntity &rEntity, const Variable< TValue > &rVariable) |
| Check whether a Node, Element, Condition, ProcessInfo, or ModelPart stores a value for the provided Variable. More...
|
|
template<Globals::DataLocation TLocation, class TEntity , class TValue > |
static std::conditional_t< std::is_arithmetic_v< TValue >, TValue, const TValue & > | GetValue (const TEntity &rEntity, const Variable< TValue > &rVariable) |
| Fetch the value of a variable stored in an entity. More...
|
|
template<Globals::DataLocation TLocation, class TEntity , class TValue > |
static TValue & | GetValue (TEntity &rEntity, const Variable< TValue > &rVariable) |
| Fetch the value of a variable stored in an entity. More...
|
|
template<Globals::DataLocation TLocation, class TEntity , class TValue > |
static void | SetValue (TEntity &rEntity, const Variable< TValue > &rVariable, std::conditional_t< std::is_arithmetic_v< TValue >, TValue, const TValue & > Value) |
| Overwrite the value of a variable stored in an entity. More...
|
|