16 #if !defined(KRATOS_ACTIVATION_UTILITIES )
17 #define KRATOS_ACTIVATION_UTILITIES
105 const double reference_value,
106 bool active_if_lower_than_reference)
114 #pragma omp parallel for
115 for(
int i=0; i<static_cast<int>(rmodel_part.
Elements().size());
i++)
120 it->Set(ACTIVE,
false);
122 for(
unsigned int k=0;
k<geom.
size();
k++)
124 if( geom[
k].FastGetSolutionStepValue(rVariable) < reference_value)
126 it->Set(ACTIVE,
true);
132 #pragma omp parallel for
133 for(
int i=0; i<static_cast<int>(rmodel_part.
Conditions().size());
i++)
138 it->Set(ACTIVE,
false);
139 for(
unsigned int k=0;
k<geom.
size();
k++)
141 if( geom[
k].FastGetSolutionStepValue(rVariable) < reference_value)
143 it->Set(ACTIVE,
true);
150 if( active_if_lower_than_reference ==
false)
152 #pragma omp parallel for
153 for(
int i=0; i<static_cast<int>(rmodel_part.
Elements().size());
i++)
159 #pragma omp parallel for
160 for(
int i=0; i<static_cast<int>(rmodel_part.
Conditions().size());
i++)
Tool to evaluate the normals on nodes based on the normals of a set of surface conditions.
Definition: activation_utilities.h:61
void ActivateElementsAndConditions(ModelPart &rmodel_part, const Variable< double > &rVariable, const double reference_value, bool active_if_lower_than_reference)
Definition: activation_utilities.h:103
ModelPart::NodesContainerType NodesArrayType
Definition: activation_utilities.h:65
ModelPart::ConditionsContainerType ConditionsArrayType
Definition: activation_utilities.h:66
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ElementIterator ElementsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1169
ConditionIterator ConditionsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1361
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: pointer_vector_set.h:95
#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
int k
Definition: quadrature.py:595
integer i
Definition: TensorModule.f:17