10 #if !defined(KRATOS_SET_ACTIVE_FLAG_PROCESS_H_INCLUDED)
11 #define KRATOS_SET_ACTIVE_FLAG_PROCESS_H_INCLUDED
83 bool unactivePeakElements,
84 bool unactiveSliverElements,
116 if ((itElem)->
IsNot(ACTIVE))
118 unsigned int numNodes = itElem->GetGeometry().size();
119 for (
unsigned int i = 0;
i < numNodes;
i++)
121 if (itElem->GetGeometry()[
i].Is(RIGID) && itElem->GetGeometry()[
i].IsNot(SOLID) && itElem->GetGeometry()[
i].Is(FREE_SURFACE))
124 bool doNotSetNullPressure =
false;
127 if ((ne)->
Is(ACTIVE))
129 doNotSetNullPressure =
true;
133 if (doNotSetNullPressure ==
false)
134 itElem->GetGeometry()[
i].FastGetSolutionStepValue(PRESSURE) = 0;
137 unsigned int elementRigidNodes = 0;
138 for (
unsigned int i = 0;
i < numNodes;
i++)
140 if (itElem->GetGeometry()[
i].Is(RIGID) && itElem->GetGeometry()[
i].IsNot(SOLID))
146 if (elementRigidNodes == numNodes)
152 (itElem)->
Set(ACTIVE,
true);
175 std::string
Info()
const override
177 return "SetActiveFlagProcess";
183 rOStream <<
"SetActiveFlagProcess";
206 unsigned int numNodes = wallElementNodes.
size();
207 double currentPressureForIsolatedWall = 0;
208 double previousPressureForIsolatedWall = 0;
209 unsigned int isolatedWallID = 0;
210 bool foundedIsolatedWall =
false;
211 for (
unsigned int i = 0;
i < numNodes;
i++)
214 bool localIsolatedWallNode =
true;
215 for (
unsigned int j = 0;
j < rN.
size();
j++)
219 localIsolatedWallNode =
false;
223 if (localIsolatedWallNode ==
true)
226 foundedIsolatedWall =
true;
230 if (wallElementNodes[
i].FastGetSolutionStepValue(PRESSURE, 0) < currentPressureForIsolatedWall)
232 currentPressureForIsolatedWall = wallElementNodes[
i].FastGetSolutionStepValue(PRESSURE, 0);
234 if (wallElementNodes[
i].FastGetSolutionStepValue(PRESSURE, 1) < previousPressureForIsolatedWall)
236 previousPressureForIsolatedWall = wallElementNodes[
i].FastGetSolutionStepValue(PRESSURE, 1);
240 if (foundedIsolatedWall ==
true)
242 wallElementNodes[isolatedWallID].FastGetSolutionStepValue(PRESSURE, 0) = currentPressureForIsolatedWall;
243 wallElementNodes[isolatedWallID].FastGetSolutionStepValue(PRESSURE, 1) = previousPressureForIsolatedWall;
319 rOStream << std::endl;
void Set(const Flags ThisFlag)
Definition: flags.cpp:33
bool Is(Flags const &rOther) const
Definition: flags.h:274
bool IsNot(Flags const &rOther) const
Definition: flags.h:291
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
PointerVector< TPointType > PointsArrayType
Definition: geometry.h:118
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: geometry.h:627
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: global_pointers_vector.h:79
iterator begin()
Definition: global_pointers_vector.h:221
size_type size() const
Definition: global_pointers_vector.h:307
iterator end()
Definition: global_pointers_vector.h:229
The base class for processes passed to the solution scheme.
Definition: mesher_process.hpp:37
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: mesher_process.hpp:157
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::ElementsContainerType ElementsContainerType
Element container. A vector set of Elements with their Id's as key.
Definition: model_part.h:168
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
MeshType::ElementIterator ElementIterator
Definition: model_part.h:174
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
Short class definition.
Definition: set_active_flag_process.hpp:69
void SetPressureToIsolatedWallNodes(Geometry< Node > &wallElementNodes)
Definition: set_active_flag_process.hpp:203
bool mUnactiveSliverElements
Definition: set_active_flag_process.hpp:198
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: set_active_flag_process.hpp:181
void Execute() override
Execute method is used to execute the MesherProcess algorithms.
Definition: set_active_flag_process.hpp:107
int mEchoLevel
Definition: set_active_flag_process.hpp:196
void operator()()
Definition: set_active_flag_process.hpp:98
SetActiveFlagProcess(ModelPart &rModelPart, bool unactivePeakElements, bool unactiveSliverElements, int EchoLevel)
Default constructor.
Definition: set_active_flag_process.hpp:82
std::string Info() const override
Turn back information as a string.
Definition: set_active_flag_process.hpp:175
bool mUnactivePeakElements
Definition: set_active_flag_process.hpp:197
virtual ~SetActiveFlagProcess()
Destructor.
Definition: set_active_flag_process.hpp:94
ModelPart & mrModelPart
Definition: set_active_flag_process.hpp:194
KRATOS_CLASS_POINTER_DEFINITION(SetActiveFlagProcess)
Pointer definition of SetActiveFlagProcess.
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
GlobalPointersVector< Element > ElementWeakPtrVectorType
Definition: build_model_part_boundary_process.hpp:60
static int EchoLevel
Definition: co_sim_EMPIRE_API.h:42
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
ModelPart::NodesContainerType NodesContainerType
Definition: find_conditions_neighbours_process.h:44
GlobalPointersVector< Node > NodeWeakPtrVectorType
Definition: build_model_part_boundary_process.hpp:59
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
ModelPart::ElementsContainerType ElementsContainerType
Definition: clear_contact_conditions_mesher_process.hpp:43
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
GeometryType::PointsArrayType PointsArrayType
Definition: settle_model_structure_process.hpp:48
int j
Definition: quadrature.py:648
integer i
Definition: TensorModule.f:17