13 #if !defined(KRATOS_INTEGRATION_POINT_TO_NODE_TRANSFORMATION_UTILITY_H_INCLUDED)
14 #define KRATOS_INTEGRATION_POINT_TO_NODE_TRANSFORMATION_UTILITY_H_INCLUDED
50 template<
unsigned int TDim,
unsigned int TNumNodes = TDim + 1>
61 template<
class TVariableType>
73 itNode->FastGetSolutionStepValue(rVariable) = rVariable.
Zero();
74 itNode->FastGetSolutionStepValue(NODAL_AREA) = 0.0;
83 std::vector<TVariableType> ValuesOnIntPoint;
88 itElem->CalculateOnIntegrationPoints(rVariable,ValuesOnIntPoint,r_process_info);
90 const double Weight = rGeom.
Volume() / (
double) TNumNodes;
91 for (
unsigned int iNode = 0; iNode < rGeom.
size(); iNode++)
93 rGeom[iNode].SetLock();
94 rGeom[iNode].FastGetSolutionStepValue(rVariable) += Weight * ValuesOnIntPoint[0];
95 rGeom[iNode].FastGetSolutionStepValue(NODAL_AREA) += Weight;
96 rGeom[iNode].UnSetLock();
112 const double NodalArea = itNode->FastGetSolutionStepValue(NODAL_AREA);
113 itNode->FastGetSolutionStepValue(rVariable) /= NodalArea;
virtual bool AssembleCurrentData(Variable< int > const &ThisVariable)
Definition: communicator.cpp:502
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
virtual double Volume() const
This method calculate and return volume of this geometry.
Definition: geometry.h:1358
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Communicator & GetCommunicator()
Definition: model_part.h:1821
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
MeshType::NodeIterator NodeIterator
Definition: model_part.h:134
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
MeshType::ElementIterator ElementIterator
Definition: model_part.h:174
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
static void PartitionedIterators(TVector &rVector, typename TVector::iterator &rBegin, typename TVector::iterator &rEnd)
Generate a partition for an std::vector-like array, providing iterators to the begin and end position...
Definition: openmp_utils.h:179
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
const TDataType & Zero() const
This method returns the zero value of the variable type.
Definition: variable.h:346
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
TABLE_NUMBER_ANGULAR_VELOCITY TABLE_NUMBER_MOMENT I33 BEAM_INERTIA_ROT_UNIT_LENGHT_Y KRATOS_DEFINE_APPLICATION_VARIABLE(DEM_APPLICATION, double, BEAM_INERTIA_ROT_UNIT_LENGHT_Z) typedef std double
Definition: DEM_application_variables.h:182