3 #if !defined(KRATOS_ADD_FIXED_VELOCITY_CONDITION_UTILITY_INCLUDED )
4 #define KRATOS_ADD_FIXED_VELOCITY_CONDITION_UTILITY_INCLUDED
16 #include "utilities/geometry_utilities.h"
54 unsigned int condition_number=1;
57 ModelPart::ConditionsContainerType::iterator lastcondition = (mr_model_part.
ConditionsEnd()-1);
58 condition_number += lastcondition->Id();
63 for(ModelPart::NodesContainerType::iterator inode = mr_model_part.
NodesBegin();
64 inode!=mr_model_part.
NodesEnd(); inode++)
66 if ((inode->IsFixed(VELOCITY_X)) || (inode->IsFixed(VELOCITY_Y)) || (inode->IsFixed(VELOCITY_Z)) )
71 Condition::Pointer p_condition = rReferenceCondition.
Create(condition_number, geometry, properties);
72 mr_model_part.
Conditions().push_back(p_condition);
76 std::cout <<
"Finished adding conditions on fixed velocity boundaries" << condition_number << std::endl;
117 unsigned int condition_number=1;
120 ModelPart::ConditionsContainerType::iterator lastcondition = (mr_model_part.
ConditionsEnd()-1);
121 condition_number += lastcondition->Id();
126 for(ModelPart::NodesContainerType::iterator inode = mr_model_part.
NodesBegin();
127 inode!=mr_model_part.
NodesEnd(); inode++)
129 if ((inode->IsFixed(VELOCITY_X)) || (inode->IsFixed(VELOCITY_Y)) || (inode->IsFixed(VELOCITY_Z)) )
134 Condition::Pointer p_condition = rReferenceCondition.
Create(condition_number, geometry, properties);
135 mr_model_part.
Conditions().push_back(p_condition);
139 std::cout <<
"Finished adding conditions on fixed velocity boundaries" << condition_number << std::endl;
181 unsigned int condition_number=1;
184 ModelPart::ConditionsContainerType::iterator lastcondition = (mr_model_part.
ConditionsEnd()-1);
185 condition_number += lastcondition->Id();
190 for(ModelPart::NodesContainerType::iterator inode = mr_model_part.
NodesBegin();
191 inode!=mr_model_part.
NodesEnd(); inode++)
193 if (inode->IsFixed(PRESSURE) && ( (inode->IsFixed(VELOCITY_X))==
false || (inode->IsFixed(VELOCITY_Y)) ) )
198 Condition::Pointer p_condition = rReferenceCondition.
Create(condition_number, geometry, properties);
199 mr_model_part.
Conditions().push_back(p_condition);
203 std::cout <<
"Finished adding conditions on fixed pressure boundaries" << condition_number << std::endl;
244 unsigned int condition_number=1;
247 ModelPart::ConditionsContainerType::iterator lastcondition = (mr_model_part.
ConditionsEnd()-1);
248 condition_number += lastcondition->Id();
253 for(ModelPart::NodesContainerType::iterator inode = mr_model_part.
NodesBegin();
254 inode!=mr_model_part.
NodesEnd(); inode++)
256 if (inode->IsFixed(PRESSURE) && ( (inode->IsFixed(VELOCITY_X))==
false || (inode->IsFixed(VELOCITY_Y)) || (inode->IsFixed(VELOCITY_Z)) ) )
261 Condition::Pointer p_condition = rReferenceCondition.
Create(condition_number, geometry, properties);
262 mr_model_part.
Conditions().push_back(p_condition);
266 std::cout <<
"Finished adding conditions on fixed pressure boundaries" << condition_number << std::endl;
305 unsigned int condition_number=1;
308 ModelPart::ConditionsContainerType::iterator lastcondition = (mr_model_part.
ConditionsEnd()-1);
309 condition_number += lastcondition->Id();
314 for(ModelPart::NodesContainerType::iterator inode = mr_model_part.
NodesBegin();
315 inode!=mr_model_part.
NodesEnd(); inode++)
317 if ((inode->IsFixed(WATER_VELOCITY_X)) || (inode->IsFixed(WATER_VELOCITY_Y)) || (inode->IsFixed(WATER_VELOCITY_Z)) )
322 Condition::Pointer p_condition = rReferenceCondition.
Create(condition_number, geometry, properties);
323 mr_model_part.
Conditions().push_back(p_condition);
327 std::cout <<
"Finished adding conditions on fixed water velocity boundaries" << condition_number << std::endl;
Definition: add_fixed_velocity_condition.h:159
~AddFixedPressureCondition2D()
Definition: add_fixed_velocity_condition.h:173
KRATOS_CLASS_POINTER_DEFINITION(AddFixedPressureCondition2D)
AddFixedPressureCondition2D(ModelPart &model_part)
Definition: add_fixed_velocity_condition.h:164
void AddThem()
Definition: add_fixed_velocity_condition.h:177
Definition: add_fixed_velocity_condition.h:222
KRATOS_CLASS_POINTER_DEFINITION(AddFixedPressureCondition3D)
AddFixedPressureCondition3D(ModelPart &model_part)
Definition: add_fixed_velocity_condition.h:227
~AddFixedPressureCondition3D()
Definition: add_fixed_velocity_condition.h:236
void AddThem()
Definition: add_fixed_velocity_condition.h:240
Definition: add_fixed_velocity_condition.h:32
~AddFixedVelocityCondition2D()
Definition: add_fixed_velocity_condition.h:46
void AddThem()
Definition: add_fixed_velocity_condition.h:50
KRATOS_CLASS_POINTER_DEFINITION(AddFixedVelocityCondition2D)
AddFixedVelocityCondition2D(ModelPart &model_part)
Definition: add_fixed_velocity_condition.h:37
Definition: add_fixed_velocity_condition.h:95
KRATOS_CLASS_POINTER_DEFINITION(AddFixedVelocityCondition3D)
~AddFixedVelocityCondition3D()
Definition: add_fixed_velocity_condition.h:109
void AddThem()
Definition: add_fixed_velocity_condition.h:113
AddFixedVelocityCondition3D(ModelPart &model_part)
Definition: add_fixed_velocity_condition.h:100
Definition: add_fixed_velocity_condition.h:283
AddWaterFixedVelocityCondition2D(ModelPart &model_part)
Definition: add_fixed_velocity_condition.h:288
void AddThem()
Definition: add_fixed_velocity_condition.h:301
KRATOS_CLASS_POINTER_DEFINITION(AddWaterFixedVelocityCondition2D)
~AddWaterFixedVelocityCondition2D()
Definition: add_fixed_velocity_condition.h:297
Base class for all Conditions.
Definition: condition.h:59
virtual Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const
It creates a new condition pointer.
Definition: condition.h:205
static const TComponentType & Get(const std::string &rName)
Retrieves a component with the specified name.
Definition: kratos_components.h:114
PropertiesType::Pointer pGetProperties(IndexType PropertiesId)
Definition: mesh.h:394
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
NodeIterator NodesEnd(IndexType ThisIndex=0)
Definition: model_part.h:497
MeshType & GetMesh(IndexType ThisIndex=0)
Definition: model_part.h:1791
ConditionIterator ConditionsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1371
Definition: point_2d.h:53
Definition: point_3d.h:53
#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
model_part
Definition: face_heat.py:14