8 #ifndef COMPUTE_DEM_FACE_LOAD_UTILITY_H
9 #define COMPUTE_DEM_FACE_LOAD_UTILITY_H
43 #pragma omp parallel for
44 for (
int i=0;
i<(
int)r_structural_skin_model_part.
Nodes().size();
i++) {
45 auto node_it = r_structural_skin_model_part.
NodesBegin() +
i;
57 static bool nodal_area_already_computed =
false;
59 if (!nodal_area_already_computed) {
60 #pragma omp parallel for
61 for (
int i=0;
i<(
int)r_structural_skin_model_part.
Nodes().size();
i++) {
62 auto node_it = r_structural_skin_model_part.
NodesBegin() +
i;
63 double& node_area = node_it->GetSolutionStepValue(DEM_NODAL_AREA);
69 const double one_third = 1.0/3.0;
71 for (
unsigned int i = 0;
i < source_conditions.size();
i++) {
72 ModelPart::ConditionsContainerType::iterator it = r_structural_skin_model_part.
ConditionsBegin() +
i;
74 double condition_area = geometry.
Area();
76 for (
unsigned int i = 0;
i < geometry.
size();
i++) {
77 double& node_area = geometry[
i].FastGetSolutionStepValue(DEM_NODAL_AREA);
78 node_area += one_third * condition_area;
82 nodal_area_already_computed =
true;
85 #pragma omp parallel for
86 for (
int i=0;
i<(
int)r_structural_skin_model_part.
Nodes().size();
i++) {
87 auto node_it = r_structural_skin_model_part.
NodesBegin() +
i;
88 double& nodal_area = node_it->FastGetSolutionStepValue(DEM_NODAL_AREA);
90 if (nodal_area && FEM_delta_time) {
91 node_it->FastGetSolutionStepValue(DEM_SURFACE_LOAD) += node_it->FastGetSolutionStepValue(CONTACT_FORCES) * DEM_delta_time / (nodal_area * FEM_delta_time);
98 virtual std::string
Info()
const {
return "";}
Definition: compute_dem_face_load_utility.h:27
void CalculateDEMFaceLoads(ModelPart &r_structural_skin_model_part, const double DEM_delta_time, const double FEM_delta_time)
Definition: compute_dem_face_load_utility.h:53
void ClearDEMFaceLoads(ModelPart &r_structural_skin_model_part)
Definition: compute_dem_face_load_utility.h:39
virtual void PrintData(std::ostream &rOStream) const
Definition: compute_dem_face_load_utility.h:102
ComputeDEMFaceLoadUtility()
Definition: compute_dem_face_load_utility.h:35
virtual void PrintInfo(std::ostream &rOStream) const
Definition: compute_dem_face_load_utility.h:100
virtual ~ComputeDEMFaceLoadUtility()
Definition: compute_dem_face_load_utility.h:37
ModelPart::NodesContainerType::ContainerType::iterator NodesIteratorType
Definition: compute_dem_face_load_utility.h:31
KRATOS_CLASS_POINTER_DEFINITION(ComputeDEMFaceLoadUtility)
virtual std::string Info() const
Definition: compute_dem_face_load_utility.h:98
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
virtual double Area() const
This method calculate and return area or surface area of this geometry depending to it's dimension.
Definition: geometry.h:1345
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
ConditionIterator ConditionsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1361
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
REACTION_CHECK_STIFFNESS_FACTOR int
Definition: contact_structural_mechanics_application_variables.h:75
integer i
Definition: TensorModule.f:17