14 #if !defined(KRATOS_FIND_CONDITIONS_NEIGHBOURS_PROCESS_H_INCLUDED )
15 #define KRATOS_FIND_CONDITIONS_NEIGHBOURS_PROCESS_H_INCLUDED
84 mavg_conds = avg_conds;
118 (in->GetValue(NEIGHBOUR_CONDITIONS)).reserve(mavg_conds);
124 (ic->GetValue(NEIGHBOUR_CONDITIONS)).reserve(3);
133 for(
unsigned int i = 0;
i < pGeom.
size();
i++)
136 (pGeom[
i].
GetValue(NEIGHBOUR_CONDITIONS)).push_back( Condition::WeakPointer( *(ic.base()) ) );
150 (ic->GetValue(NEIGHBOUR_CONDITIONS)).resize(3);
156 neighb_faces(0) = CheckForNeighbourFaces(geom[1].Id(), geom[2].Id(), geom[1].
GetValue(NEIGHBOUR_CONDITIONS), ic->Id());
157 neighb_faces(1) = CheckForNeighbourFaces(geom[2].Id(), geom[0].Id(), geom[2].
GetValue(NEIGHBOUR_CONDITIONS), ic->Id());
158 neighb_faces(2) = CheckForNeighbourFaces(geom[0].Id(), geom[1].Id(), geom[0].
GetValue(NEIGHBOUR_CONDITIONS), ic->Id());
196 std::string
Info()
const override
198 return "FindConditionsNeighboursProcess";
204 rOStream <<
"FindConditionsNeighboursProcess";
266 unsigned int mavg_conds;
277 template<
class TDataType >
void AddUniqueWeakPointer
282 while (
i != endit && (
i)->Id() != (candidate.lock())->Id())
288 v.push_back(candidate);
293 Condition::WeakPointer CheckForNeighbourFaces (
unsigned int Id_1,
unsigned int Id_2, GlobalPointersVector< Condition >& neighbour_face,
unsigned int face)
299 Geometry<Node >& neigh_face_geometry = (
i)->GetGeometry();
300 for(
unsigned int node_i = 0 ; node_i < neigh_face_geometry.size(); node_i++)
302 if (neigh_face_geometry[node_i].Id() == Id_2)
311 return Condition::WeakPointer();
363 rOStream << std::endl;
Short class definition.
Definition: find_conditions_neighbours_process.h:65
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: find_conditions_neighbours_process.h:208
void operator()()
Definition: find_conditions_neighbours_process.h:99
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: find_conditions_neighbours_process.h:202
~FindConditionsNeighboursProcess() override
Destructor.
Definition: find_conditions_neighbours_process.h:90
void ClearNeighbours()
Definition: find_conditions_neighbours_process.h:164
KRATOS_CLASS_POINTER_DEFINITION(FindConditionsNeighboursProcess)
Pointer definition of FindConditionsNeighboursProcess.
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: find_conditions_neighbours_process.h:109
FindConditionsNeighboursProcess(ModelPart &model_part, int TDim, unsigned int avg_conds=10)
Definition: find_conditions_neighbours_process.h:81
std::string Info() const override
Turn back information as a string.
Definition: find_conditions_neighbours_process.h:196
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: geometry.h:627
This class is a vector which stores global pointers.
Definition: global_pointers_vector.h:61
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: global_pointers_vector.h:79
iterator erase(iterator pos)
Definition: global_pointers_vector.h:351
iterator begin()
Definition: global_pointers_vector.h:221
iterator end()
Definition: global_pointers_vector.h:229
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
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
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
iterator begin()
Returns an iterator pointing to the beginning of the container.
Definition: pointer_vector_set.h:278
iterator end()
Returns an iterator pointing to the end of the container.
Definition: pointer_vector_set.h:314
The base class for all processes in Kratos.
Definition: process.h:49
Parameters GetValue(Parameters &rParameters, const std::string &rEntry)
Definition: add_kratos_parameters_to_python.cpp:53
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
ModelPart::NodesContainerType NodesContainerType
Definition: find_conditions_neighbours_process.h:44
ModelPart::ConditionsContainerType ConditionsContainerType
Definition: find_conditions_neighbours_process.h:45
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
model_part
Definition: face_heat.py:14
v
Definition: generate_convection_diffusion_explicit_element.py:114
integer i
Definition: TensorModule.f:17