17 #if !defined(KRATOS_COMMUNICATOR_H_INCLUDED )
18 #define KRATOS_COMMUNICATOR_H_INCLUDED
60 class DataCommunicator;
190 Communicator::Pointer
Create()
const;
203 virtual bool IsDistributed()
const;
205 virtual int MyPID()
const;
207 virtual int TotalProcesses()
const;
209 SizeType GlobalNumberOfNodes()
const;
211 SizeType GlobalNumberOfElements()
const;
213 SizeType GlobalNumberOfConditions()
const;
215 SizeType GlobalNumberOfMasterSlaveConstraints()
const;
219 void SetNumberOfColors(
SizeType NewNumberOfColors);
221 void AddColors(
SizeType NumberOfAddedColors);
228 void SetLocalMesh(MeshType::Pointer pGivenMesh);
231 MeshType::Pointer pLocalMesh();
234 MeshType::Pointer pGhostMesh();
237 MeshType::Pointer pInterfaceMesh();
240 const MeshType::Pointer pLocalMesh()
const;
243 const MeshType::Pointer pGhostMesh()
const;
246 const MeshType::Pointer pInterfaceMesh()
const;
248 MeshType::Pointer pLocalMesh(
IndexType ThisIndex);
250 MeshType::Pointer pGhostMesh(
IndexType ThisIndex);
252 MeshType::Pointer pInterfaceMesh(
IndexType ThisIndex);
254 const MeshType::Pointer pLocalMesh(
IndexType ThisIndex)
const;
256 const MeshType::Pointer pGhostMesh(
IndexType ThisIndex)
const;
258 const MeshType::Pointer pInterfaceMesh(
IndexType ThisIndex)
const;
276 MeshType const& InterfaceMesh()
const;
308 virtual bool SynchronizeNodalSolutionStepsData();
310 virtual bool SynchronizeDofs();
312 virtual bool SynchronizeVariable(
Variable<int> const& rThisVariable);
316 virtual bool SynchronizeVariable(
Variable<bool> const& rThisVariable);
332 virtual bool SynchronizeNonHistoricalVariable(
Variable<int> const& rThisVariable);
334 virtual bool SynchronizeNonHistoricalVariable(
Variable<double> const& rThisVariable);
336 virtual bool SynchronizeNonHistoricalVariable(
Variable<bool> const& rThisVariable);
346 virtual bool SynchronizeNonHistoricalVariable(
Variable<Vector> const& rThisVariable);
348 virtual bool SynchronizeNonHistoricalVariable(
Variable<Matrix> const& rThisVariable);
356 virtual bool SynchronizeCurrentDataToMax(
Variable<double> const& ThisVariable);
362 virtual bool SynchronizeNonHistoricalDataToMax(
Variable<double> const& ThisVariable);
368 virtual bool SynchronizeCurrentDataToAbsMax(
Variable<double> const& ThisVariable);
374 virtual bool SynchronizeNonHistoricalDataToAbsMax(
Variable<double> const& ThisVariable);
380 virtual bool SynchronizeCurrentDataToMin(
Variable<double> const& ThisVariable);
386 virtual bool SynchronizeNonHistoricalDataToMin(
Variable<double> const& ThisVariable);
392 virtual bool SynchronizeCurrentDataToAbsMin(
Variable<double> const& ThisVariable);
398 virtual bool SynchronizeNonHistoricalDataToAbsMin(
Variable<double> const& ThisVariable);
400 virtual bool SynchronizeElementalFlags();
402 virtual bool AssembleCurrentData(
Variable<int> const& ThisVariable);
412 virtual bool AssembleNonHistoricalData(
Variable<int> const& ThisVariable);
414 virtual bool AssembleNonHistoricalData(
Variable<double> const& ThisVariable);
420 virtual bool AssembleNonHistoricalData(
Variable<Vector> const& ThisVariable);
422 virtual bool AssembleNonHistoricalData(
Variable<Matrix> const& ThisVariable);
424 virtual bool SynchronizeElementalNonHistoricalVariable(
Variable<int> const& ThisVariable);
426 virtual bool SynchronizeElementalNonHistoricalVariable(
Variable<double> const& ThisVariable);
434 virtual bool SynchronizeElementalNonHistoricalVariable(
Variable<Vector> const& ThisVariable);
436 virtual bool SynchronizeElementalNonHistoricalVariable(
Variable<Matrix> const& ThisVariable);
438 virtual bool TransferObjects(std::vector<NodesContainerType>& SendObjects, std::vector<NodesContainerType>& RecvObjects);
440 virtual bool TransferObjects(std::vector<ElementsContainerType>& SendObjects, std::vector<ElementsContainerType>& RecvObjects);
442 virtual bool TransferObjects(std::vector<ConditionsContainerType>& SendObjects, std::vector<ConditionsContainerType>& RecvObjects);
444 virtual bool TransferObjects(std::vector<NodesContainerType>& SendObjects, std::vector<NodesContainerType>& RecvObjects,
Kratos::Serializer& particleSerializer);
446 virtual bool TransferObjects(std::vector<ElementsContainerType>& SendObjects, std::vector<ElementsContainerType>& RecvObjects,
Kratos::Serializer& particleSerializer);
448 virtual bool TransferObjects(std::vector<ConditionsContainerType>& SendObjects, std::vector<ConditionsContainerType>& RecvObjects,
Kratos::Serializer& particleSerializer);
450 virtual bool SynchronizeOrNodalFlags(
const Flags& TheFlags);
452 virtual bool SynchronizeAndNodalFlags(
const Flags& TheFlags);
454 virtual bool SynchronizeNodalFlags();
463 virtual std::string
Info()
const;
466 virtual void PrintInfo(std::ostream& rOStream)
const;
469 virtual void PrintData(std::ostream& rOStream, std::string
const& rPrefixString=
"")
const;
604 rOStream << std::endl;
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
The Commmunicator class manages communication for distributed ModelPart instances.
Definition: communicator.h:67
PointerVector< MeshType > MeshesContainerType
Definition: communicator.h:96
MeshesContainerType mInterfaceMeshes
Definition: communicator.h:510
MeshType::PropertiesConstantIterator PropertiesConstantIterator
Definition: communicator.h:131
MeshType::ElementsContainerType ElementsContainerType
Element container. A vector set of Elements with their Id's as key.
Definition: communicator.h:139
KRATOS_CLASS_POINTER_DEFINITION(Communicator)
Pointer definition of Communicator.
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: communicator.cpp:657
MeshType::Pointer mpInterfaceMesh
Definition: communicator.h:501
Mesh< NodeType, PropertiesType, ElementType, ConditionType > MeshType
Definition: communicator.h:94
MeshType::ConditionConstantIterator ConditionConstantIterator
Definition: communicator.h:166
MeshesContainerType mLocalMeshes
Definition: communicator.h:504
SizeType mNumberOfColors
Definition: communicator.h:490
Communicator & operator=(Communicator const &rOther)=delete
Assignment operator.
const DataCommunicator & mrDataCommunicator
Definition: communicator.h:513
MeshType::NodeConstantIterator NodeConstantIterator
Definition: communicator.h:111
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: communicator.h:99
Condition ConditionType
Definition: communicator.h:90
MeshType::Pointer mpGhostMesh
Definition: communicator.h:498
MeshesContainerType mGhostMeshes
Definition: communicator.h:507
Element ElementType
Definition: communicator.h:88
MeshType::PropertiesContainerType PropertiesContainerType
Properties container. Which is a vector set of Properties with their Id's as key.
Definition: communicator.h:119
Node NodeType
Definition: communicator.h:84
MeshType::ElementIterator ElementIterator
Definition: communicator.h:145
MeshType::ElementConstantIterator ElementConstantIterator
Definition: communicator.h:151
Properties PropertiesType
Definition: communicator.h:86
NeighbourIndicesContainerType mNeighbourIndices
Definition: communicator.h:492
DenseVector< int > NeighbourIndicesContainerType
Definition: communicator.h:92
virtual ~Communicator()=default
Destructor.
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: communicator.h:154
MeshType::PropertiesIterator PropertiesIterator
Definition: communicator.h:125
MeshType::ConditionIterator ConditionIterator
Definition: communicator.h:160
unsigned int IndexType
Definition: communicator.h:80
virtual void PrintData(std::ostream &rOStream, std::string const &rPrefixString="") const
Print object's data.
Definition: communicator.cpp:662
MeshType::NodeIterator NodeIterator
Definition: communicator.h:105
unsigned int SizeType
Definition: communicator.h:82
MeshType::Pointer mpLocalMesh
Definition: communicator.h:495
Base class for all Conditions.
Definition: condition.h:59
Serial (do-nothing) version of a wrapper class for MPI communication.
Definition: data_communicator.h:318
Base class for all Elements.
Definition: element.h:60
Definition: amatrix_interface.h:41
typename NodesContainerType::const_iterator NodeConstantIterator
Const iterator for nodes in the container. Provides direct references to nodes.
Definition: mesh.h:117
typename PropertiesContainerType::iterator PropertiesIterator
Iterator for properties in the container. Provides direct references to properties.
Definition: mesh.h:123
typename ConditionsContainerType::iterator ConditionIterator
Iterator for conditions in the container. Provides direct references to conditions.
Definition: mesh.h:153
typename NodesContainerType::iterator NodeIterator
Iterator for nodes in the container. Provides direct references to nodes.
Definition: mesh.h:114
typename ConditionsContainerType::const_iterator ConditionConstantIterator
Const iterator for conditions in the container. Provides direct references to conditions.
Definition: mesh.h:156
typename ElementsContainerType::const_iterator ElementConstantIterator
Const iterator for elements in the container. Provides direct references to elements.
Definition: mesh.h:141
typename ElementsContainerType::iterator ElementIterator
Iterator for elements in the container. Provides direct references to elements.
Definition: mesh.h:138
typename PropertiesContainerType::const_iterator PropertiesConstantIterator
Const iterator for properties in the container. Provides direct references to properties.
Definition: mesh.h:126
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
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
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