14 #if !defined(KRATOS_FIND_NODAL_NEIGHBOURS_FOR_ENTITIES_PROCESS_H_INCLUDED)
15 #define KRATOS_FIND_NODAL_NEIGHBOURS_FOR_ENTITIES_PROCESS_H_INCLUDED
20 #include <unordered_map>
39 template <
class TContainerType>
60 : mrModelPart(rModelPart),
61 mrDataCommunicator(rModelPart.GetCommunicator().GetDataCommunicator()),
62 mrOutputVariable(rOutputVariable)
95 void Execute()
override;
97 void ClearNeighbours();
103 rNodes, this->mrDataCommunicator, this->mrOutputVariable);
106 static std::unordered_map<int, std::vector<int>> GetNodalNeighbourIdsMap(
116 std::string
Info()
const override
118 return "FindNodalNeighboursForEntitiesProcess";
124 rOStream <<
"FindNodalNeighboursForEntitiesProcess";
148 void AddHangingNodeIds(
149 std::unordered_map<
int, std::unordered_map<
int, std::vector<int>>>& rNeighbourIds)
const;
152 std::vector<int>& rContainer,
153 const int Item)
const;
155 template <
class TDataType>
156 void AddUniqueGlobalPointer(
162 if (&(*gp) == &(*rCandidate) && gp.GetRank() == rCandidate.
GetRank()) {
180 template <
class TContainerType>
182 std::istream& rIStream,
186 template <
class TContainerType>
188 std::ostream& rOStream,
192 rOStream << std::endl;
Serial (do-nothing) version of a wrapper class for MPI communication.
Definition: data_communicator.h:318
Short class definition.
Definition: find_global_nodal_neighbours_for_entities_process.h:41
FindNodalNeighboursForEntitiesProcess & operator=(FindNodalNeighboursForEntitiesProcess const &rOther)=delete
Assignment operator.
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: find_global_nodal_neighbours_for_entities_process.h:128
std::unordered_map< int, std::vector< int > > GetNeighbourIds(NodesContainerType &rNodes) const
Definition: find_global_nodal_neighbours_for_entities_process.h:99
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: find_global_nodal_neighbours_for_entities_process.h:122
std::string Info() const override
Turn back information as a string.
Definition: find_global_nodal_neighbours_for_entities_process.h:116
FindNodalNeighboursForEntitiesProcess(ModelPart &rModelPart, const Variable< GlobalPointersVector< NodeType >> &rOutputVariable)
Constructor.
Definition: find_global_nodal_neighbours_for_entities_process.h:57
static std::unordered_map< int, std::vector< int > > GetNodalNeighbourIdsMap(NodesContainerType &rNodes, const DataCommunicator &rDataCommunicator, const Variable< GlobalPointersVector< NodeType >> &rNodalGlobalPointerVariable)
Definition: find_global_nodal_neighbours_for_entities_process.cpp:252
KRATOS_CLASS_POINTER_DEFINITION(FindNodalNeighboursForEntitiesProcess)
Pointer definition of FindNodalNeighboursForEntitiesProcess.
~FindNodalNeighboursForEntitiesProcess() override=default
Destructor.
void operator()()
Definition: find_global_nodal_neighbours_for_entities_process.h:86
This class is a wrapper for a pointer to a data that is located in a different rank.
Definition: global_pointer.h:44
This class is a vector which stores global pointers.
Definition: global_pointers_vector.h:61
void push_back(TPointerType x)
Definition: global_pointers_vector.h:322
TContainerType & GetContainer()
Definition: global_pointers_vector.h:419
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Node NodeType
Definition: model_part.h:117
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
This class defines the node.
Definition: node.h:65
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
The base class for all processes in Kratos.
Definition: process.h:49
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
int GetRank() const
Returns the rank of the global pointer.
Definition: global_pointer.h:262
TContainerType & GetContainer(ModelPart::MeshType &rMesh)
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
ModelPart::NodesContainerType NodesContainerType
Definition: find_conditions_neighbours_process.h:44
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
namespace KRATOS_DEPRECATED_MESSAGE("Please use std::filesystem directly") filesystem
Definition: kratos_filesystem.h:33
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
tuple const
Definition: ode_solve.py:403