KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
The Commmunicator class manages communication for distributed ModelPart instances. More...
#include <communicator.h>
Public Member Functions | |
Life Cycle | |
Communicator () | |
Default constructor. More... | |
Communicator (const DataCommunicator &rDataCommunicator) | |
Constructor using a custom DataCommunicator. More... | |
Communicator (Communicator const &rOther) | |
Copy constructor. More... | |
virtual | ~Communicator ()=default |
Destructor. More... | |
virtual Communicator::Pointer | Create (const DataCommunicator &rDataCommunicator) const |
Communicator::Pointer | Create () const |
Operators | |
Communicator & | operator= (Communicator const &rOther)=delete |
Assignment operator. More... | |
Access | |
virtual bool | IsDistributed () const |
virtual int | MyPID () const |
virtual int | TotalProcesses () const |
SizeType | GlobalNumberOfNodes () const |
SizeType | GlobalNumberOfElements () const |
SizeType | GlobalNumberOfConditions () const |
SizeType | GlobalNumberOfMasterSlaveConstraints () const |
SizeType | GetNumberOfColors () const |
void | SetNumberOfColors (SizeType NewNumberOfColors) |
void | AddColors (SizeType NumberOfAddedColors) |
NeighbourIndicesContainerType & | NeighbourIndices () |
NeighbourIndicesContainerType const & | NeighbourIndices () const |
void | SetLocalMesh (MeshType::Pointer pGivenMesh) |
Set the local mesh pointer to the given mesh. More... | |
MeshType::Pointer | pLocalMesh () |
Returns pointer to the mesh storing all local entities. More... | |
MeshType::Pointer | pGhostMesh () |
Returns pointer to the mesh storing all ghost entities. More... | |
MeshType::Pointer | pInterfaceMesh () |
Returns pointer to the mesh storing all interface entities. More... | |
const MeshType::Pointer | pLocalMesh () const |
Returns a constant pointer to the mesh storing all local entities. More... | |
const MeshType::Pointer | pGhostMesh () const |
Returns a constant pointer to the mesh storing all ghost entities. More... | |
const MeshType::Pointer | pInterfaceMesh () const |
Returns a constant pointer to the mesh storing all interface entities. More... | |
MeshType::Pointer | pLocalMesh (IndexType ThisIndex) |
MeshType::Pointer | pGhostMesh (IndexType ThisIndex) |
MeshType::Pointer | pInterfaceMesh (IndexType ThisIndex) |
const MeshType::Pointer | pLocalMesh (IndexType ThisIndex) const |
const MeshType::Pointer | pGhostMesh (IndexType ThisIndex) const |
const MeshType::Pointer | pInterfaceMesh (IndexType ThisIndex) const |
MeshType & | LocalMesh () |
Returns the reference to the mesh storing all local entities. More... | |
MeshType & | GhostMesh () |
Returns the reference to the mesh storing all ghost entities. More... | |
MeshType & | InterfaceMesh () |
Returns the reference to the mesh storing all interface entities. More... | |
MeshType const & | LocalMesh () const |
Returns a constant reference to the mesh storing all local entities. More... | |
MeshType const & | GhostMesh () const |
Returns a constant reference to the mesh storing all ghost entities. More... | |
MeshType const & | InterfaceMesh () const |
Returns a constant reference to the mesh storing all interface entities. More... | |
MeshType & | LocalMesh (IndexType ThisIndex) |
MeshType & | GhostMesh (IndexType ThisIndex) |
MeshType & | InterfaceMesh (IndexType ThisIndex) |
MeshType const & | LocalMesh (IndexType ThisIndex) const |
MeshType const & | GhostMesh (IndexType ThisIndex) const |
MeshType const & | InterfaceMesh (IndexType ThisIndex) const |
MeshesContainerType & | LocalMeshes () |
MeshesContainerType & | GhostMeshes () |
MeshesContainerType & | InterfaceMeshes () |
MeshesContainerType const & | LocalMeshes () const |
MeshesContainerType const & | GhostMeshes () const |
MeshesContainerType const & | InterfaceMeshes () const |
virtual const DataCommunicator & | GetDataCommunicator () const |
Operations | |
virtual bool | SynchronizeNodalSolutionStepsData () |
virtual bool | SynchronizeDofs () |
virtual bool | SynchronizeVariable (Variable< int > const &rThisVariable) |
virtual bool | SynchronizeVariable (Variable< double > const &rThisVariable) |
virtual bool | SynchronizeVariable (Variable< bool > const &rThisVariable) |
virtual bool | SynchronizeVariable (Variable< array_1d< double, 3 > > const &rThisVariable) |
virtual bool | SynchronizeVariable (Variable< array_1d< double, 4 > > const &rThisVariable) |
virtual bool | SynchronizeVariable (Variable< array_1d< double, 6 > > const &rThisVariable) |
virtual bool | SynchronizeVariable (Variable< array_1d< double, 9 > > const &rThisVariable) |
virtual bool | SynchronizeVariable (Variable< Vector > const &rThisVariable) |
virtual bool | SynchronizeVariable (Variable< Matrix > const &rThisVariable) |
virtual bool | SynchronizeVariable (Variable< Quaternion< double >> const &rThisVariable) |
virtual bool | SynchronizeNonHistoricalVariable (Variable< int > const &rThisVariable) |
virtual bool | SynchronizeNonHistoricalVariable (Variable< double > const &rThisVariable) |
virtual bool | SynchronizeNonHistoricalVariable (Variable< bool > const &rThisVariable) |
virtual bool | SynchronizeNonHistoricalVariable (Variable< array_1d< double, 3 > > const &rThisVariable) |
virtual bool | SynchronizeNonHistoricalVariable (Variable< array_1d< double, 4 > > const &rThisVariable) |
virtual bool | SynchronizeNonHistoricalVariable (Variable< array_1d< double, 6 > > const &rThisVariable) |
virtual bool | SynchronizeNonHistoricalVariable (Variable< array_1d< double, 9 > > const &rThisVariable) |
virtual bool | SynchronizeNonHistoricalVariable (Variable< Vector > const &rThisVariable) |
virtual bool | SynchronizeNonHistoricalVariable (Variable< Matrix > const &rThisVariable) |
virtual bool | SynchronizeNonHistoricalVariable (Variable< Quaternion< double >> const &rThisVariable) |
virtual bool | SynchronizeCurrentDataToMax (Variable< double > const &ThisVariable) |
Synchronize variable in nodal solution step data to the maximum value across all processes. More... | |
virtual bool | SynchronizeNonHistoricalDataToMax (Variable< double > const &ThisVariable) |
Synchronize variable in nodal data to the maximum value across all processes. More... | |
virtual bool | SynchronizeCurrentDataToAbsMax (Variable< double > const &ThisVariable) |
Synchronize variable in nodal solution step data to the absolute maximum value across all processes. More... | |
virtual bool | SynchronizeNonHistoricalDataToAbsMax (Variable< double > const &ThisVariable) |
Synchronize variable in nodal data to the absolute maximum value across all processes. More... | |
virtual bool | SynchronizeCurrentDataToMin (Variable< double > const &ThisVariable) |
Synchronize variable in nodal solution step data to the minimum value across all processes. More... | |
virtual bool | SynchronizeNonHistoricalDataToMin (Variable< double > const &ThisVariable) |
Synchronize variable in nodal data to the minimum value across all processes. More... | |
virtual bool | SynchronizeCurrentDataToAbsMin (Variable< double > const &ThisVariable) |
Synchronize variable in nodal solution step data to the absolute minimum value across all processes. More... | |
virtual bool | SynchronizeNonHistoricalDataToAbsMin (Variable< double > const &ThisVariable) |
Synchronize variable in nodal data to the absolute minimum value across all processes. More... | |
virtual bool | SynchronizeElementalFlags () |
virtual bool | AssembleCurrentData (Variable< int > const &ThisVariable) |
virtual bool | AssembleCurrentData (Variable< double > const &ThisVariable) |
virtual bool | AssembleCurrentData (Variable< array_1d< double, 3 > > const &ThisVariable) |
virtual bool | AssembleCurrentData (Variable< Vector > const &ThisVariable) |
virtual bool | AssembleCurrentData (Variable< Matrix > const &ThisVariable) |
virtual bool | AssembleNonHistoricalData (Variable< int > const &ThisVariable) |
virtual bool | AssembleNonHistoricalData (Variable< double > const &ThisVariable) |
virtual bool | AssembleNonHistoricalData (Variable< array_1d< double, 3 > > const &ThisVariable) |
virtual bool | AssembleNonHistoricalData (Variable< DenseVector< array_1d< double, 3 > > > const &ThisVariable) |
virtual bool | AssembleNonHistoricalData (Variable< Vector > const &ThisVariable) |
virtual bool | AssembleNonHistoricalData (Variable< Matrix > const &ThisVariable) |
virtual bool | SynchronizeElementalNonHistoricalVariable (Variable< int > const &ThisVariable) |
virtual bool | SynchronizeElementalNonHistoricalVariable (Variable< double > const &ThisVariable) |
virtual bool | SynchronizeElementalNonHistoricalVariable (Variable< array_1d< double, 3 > > const &ThisVariable) |
virtual bool | SynchronizeElementalNonHistoricalVariable (Variable< DenseVector< array_1d< double, 3 > > > const &ThisVariable) |
virtual bool | SynchronizeElementalNonHistoricalVariable (Variable< DenseVector< int > > const &ThisVariable) |
virtual bool | SynchronizeElementalNonHistoricalVariable (Variable< Vector > const &ThisVariable) |
virtual bool | SynchronizeElementalNonHistoricalVariable (Variable< Matrix > const &ThisVariable) |
virtual bool | TransferObjects (std::vector< NodesContainerType > &SendObjects, std::vector< NodesContainerType > &RecvObjects) |
virtual bool | TransferObjects (std::vector< ElementsContainerType > &SendObjects, std::vector< ElementsContainerType > &RecvObjects) |
virtual bool | TransferObjects (std::vector< ConditionsContainerType > &SendObjects, std::vector< ConditionsContainerType > &RecvObjects) |
virtual bool | TransferObjects (std::vector< NodesContainerType > &SendObjects, std::vector< NodesContainerType > &RecvObjects, Kratos::Serializer &particleSerializer) |
virtual bool | TransferObjects (std::vector< ElementsContainerType > &SendObjects, std::vector< ElementsContainerType > &RecvObjects, Kratos::Serializer &particleSerializer) |
virtual bool | TransferObjects (std::vector< ConditionsContainerType > &SendObjects, std::vector< ConditionsContainerType > &RecvObjects, Kratos::Serializer &particleSerializer) |
virtual bool | SynchronizeOrNodalFlags (const Flags &TheFlags) |
virtual bool | SynchronizeAndNodalFlags (const Flags &TheFlags) |
virtual bool | SynchronizeNodalFlags () |
void | Clear () |
Inquiry | |
virtual std::string | Info () const |
Turn back information as a string. More... | |
virtual void | PrintInfo (std::ostream &rOStream) const |
Print information about this object. More... | |
virtual void | PrintData (std::ostream &rOStream, std::string const &rPrefixString="") const |
Print object's data. More... | |
Protected Attributes | |
Protected member Variables | |
SizeType | mNumberOfColors |
NeighbourIndicesContainerType | mNeighbourIndices |
MeshType::Pointer | mpLocalMesh |
MeshType::Pointer | mpGhostMesh |
MeshType::Pointer | mpInterfaceMesh |
MeshesContainerType | mLocalMeshes |
MeshesContainerType | mGhostMeshes |
MeshesContainerType | mInterfaceMeshes |
const DataCommunicator & | mrDataCommunicator |
The Commmunicator class manages communication for distributed ModelPart instances.
The base Communicator class only holds the required data (local and remote mesh interfaces) for communication. The actual communication is implemented in the derived MPICommunicator.
Const iterator over the Conditions. This iterator is an indirect iterator over Conditions::Pointer which turn back a reference to Condition by * operator and not a pointer for more convenient usage.
Iterator over the Conditions. This iterator is an indirect iterator over Conditions::Pointer which turn back a reference to Condition by * operator and not a pointer for more convenient usage.
Condintions container. A vector set of Conditions with their Id's as key.
Const iterator over the Elements. This iterator is an indirect iterator over Elements::Pointer which turn back a reference to Element by * operator and not a pointer for more convenient usage.
Iterator over the Elements. This iterator is an indirect iterator over Elements::Pointer which turn back a reference to Element by * operator and not a pointer for more convenient usage.
Element container. A vector set of Elements with their Id's as key.
Iterator over the properties. This iterator is an indirect iterator over Properties::Pointer which turn back a reference to properties by * operator and not a pointer for more convenient usage.
typedef unsigned int Kratos::Communicator::IndexType |
Const iterator over the nodes. This iterator is an indirect iterator over Node::Pointer which turn back a reference to node by * operator and not a pointer for more convenient usage.
Iterator over the nodes. This iterator is an indirect iterator over Node::Pointer which turn back a reference to node by * operator and not a pointer for more convenient usage.
Nodes container. Which is a vector set of nodes with their Id's as key.
typedef Node Kratos::Communicator::NodeType |
Const iterator over the Properties. This iterator is an indirect iterator over Properties::Pointer which turn back a reference to Properties by * operator and not a pointer for more convenient usage.
Properties container. Which is a vector set of Properties with their Id's as key.
Iterator over the properties. This iterator is an indirect iterator over Properties::Pointer which turn back a reference to properties by * operator and not a pointer for more convenient usage.
Iterator over the Properties. This iterator is an indirect iterator over Node::Pointer which turn back a reference to node by * operator and not a pointer for more convenient usage.
typedef unsigned int Kratos::Communicator::SizeType |
Kratos::Communicator::Communicator | ( | ) |
Default constructor.
Kratos::Communicator::Communicator | ( | const DataCommunicator & | rDataCommunicator | ) |
Constructor using a custom DataCommunicator.
This constructor is intended for use from derived classes, since the base Communicator class will often not use the communicator at all.
rDataCommunicator | Reference to a DataCommunicator. |
Kratos::Communicator::Communicator | ( | Communicator const & | rOther | ) |
Copy constructor.
|
virtualdefault |
Destructor.
void Kratos::Communicator::AddColors | ( | SizeType | NumberOfAddedColors | ) |
|
virtual |
Reimplemented in Kratos::MPICommunicator.
Reimplemented in Kratos::MPICommunicator.
Reimplemented in Kratos::MPICommunicator.
Reimplemented in Kratos::MPICommunicator.
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
void Kratos::Communicator::Clear | ( | ) |
Communicator::Pointer Kratos::Communicator::Create | ( | ) | const |
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Communicator::SizeType Kratos::Communicator::GetNumberOfColors | ( | ) | const |
Communicator::MeshType & Kratos::Communicator::GhostMesh | ( | ) |
Returns the reference to the mesh storing all ghost entities.
Communicator::MeshType const & Kratos::Communicator::GhostMesh | ( | ) | const |
Returns a constant reference to the mesh storing all ghost entities.
Communicator::MeshType & Kratos::Communicator::GhostMesh | ( | IndexType | ThisIndex | ) |
Communicator::MeshType const & Kratos::Communicator::GhostMesh | ( | IndexType | ThisIndex | ) | const |
Communicator::MeshesContainerType & Kratos::Communicator::GhostMeshes | ( | ) |
Communicator::MeshesContainerType const & Kratos::Communicator::GhostMeshes | ( | ) | const |
Communicator::SizeType Kratos::Communicator::GlobalNumberOfConditions | ( | ) | const |
Communicator::SizeType Kratos::Communicator::GlobalNumberOfElements | ( | ) | const |
Communicator::SizeType Kratos::Communicator::GlobalNumberOfMasterSlaveConstraints | ( | ) | const |
Communicator::SizeType Kratos::Communicator::GlobalNumberOfNodes | ( | ) | const |
|
virtual |
Turn back information as a string.
Reimplemented in Kratos::MPICommunicator.
Communicator::MeshType & Kratos::Communicator::InterfaceMesh | ( | ) |
Returns the reference to the mesh storing all interface entities.
Communicator::MeshType const & Kratos::Communicator::InterfaceMesh | ( | ) | const |
Returns a constant reference to the mesh storing all interface entities.
Communicator::MeshType & Kratos::Communicator::InterfaceMesh | ( | IndexType | ThisIndex | ) |
Communicator::MeshType const & Kratos::Communicator::InterfaceMesh | ( | IndexType | ThisIndex | ) | const |
Communicator::MeshesContainerType & Kratos::Communicator::InterfaceMeshes | ( | ) |
Communicator::MeshesContainerType const & Kratos::Communicator::InterfaceMeshes | ( | ) | const |
|
virtual |
Reimplemented in Kratos::MPICommunicator.
Kratos::Communicator::KRATOS_CLASS_POINTER_DEFINITION | ( | Communicator | ) |
Pointer definition of Communicator.
Communicator::MeshType & Kratos::Communicator::LocalMesh | ( | ) |
Returns the reference to the mesh storing all local entities.
Communicator::MeshType const & Kratos::Communicator::LocalMesh | ( | ) | const |
Returns a constant reference to the mesh storing all local entities.
Communicator::MeshType & Kratos::Communicator::LocalMesh | ( | IndexType | ThisIndex | ) |
Communicator::MeshType const & Kratos::Communicator::LocalMesh | ( | IndexType | ThisIndex | ) | const |
Communicator::MeshesContainerType & Kratos::Communicator::LocalMeshes | ( | ) |
Communicator::MeshesContainerType const & Kratos::Communicator::LocalMeshes | ( | ) | const |
|
virtual |
Communicator::NeighbourIndicesContainerType & Kratos::Communicator::NeighbourIndices | ( | ) |
Communicator::NeighbourIndicesContainerType const & Kratos::Communicator::NeighbourIndices | ( | ) | const |
|
delete |
Assignment operator.
Communicator::MeshType::Pointer Kratos::Communicator::pGhostMesh | ( | ) |
Returns pointer to the mesh storing all ghost entities.
const Communicator::MeshType::Pointer Kratos::Communicator::pGhostMesh | ( | ) | const |
Returns a constant pointer to the mesh storing all ghost entities.
Communicator::MeshType::Pointer Kratos::Communicator::pGhostMesh | ( | IndexType | ThisIndex | ) |
const Communicator::MeshType::Pointer Kratos::Communicator::pGhostMesh | ( | IndexType | ThisIndex | ) | const |
Communicator::MeshType::Pointer Kratos::Communicator::pInterfaceMesh | ( | ) |
Returns pointer to the mesh storing all interface entities.
const Communicator::MeshType::Pointer Kratos::Communicator::pInterfaceMesh | ( | ) | const |
Returns a constant pointer to the mesh storing all interface entities.
Communicator::MeshType::Pointer Kratos::Communicator::pInterfaceMesh | ( | IndexType | ThisIndex | ) |
const Communicator::MeshType::Pointer Kratos::Communicator::pInterfaceMesh | ( | IndexType | ThisIndex | ) | const |
Communicator::MeshType::Pointer Kratos::Communicator::pLocalMesh | ( | ) |
Returns pointer to the mesh storing all local entities.
const Communicator::MeshType::Pointer Kratos::Communicator::pLocalMesh | ( | ) | const |
Returns a constant pointer to the mesh storing all local entities.
Communicator::MeshType::Pointer Kratos::Communicator::pLocalMesh | ( | IndexType | ThisIndex | ) |
const Communicator::MeshType::Pointer Kratos::Communicator::pLocalMesh | ( | IndexType | ThisIndex | ) | const |
|
virtual |
Print object's data.
|
virtual |
Print information about this object.
void Kratos::Communicator::SetLocalMesh | ( | MeshType::Pointer | pGivenMesh | ) |
Set the local mesh pointer to the given mesh.
void Kratos::Communicator::SetNumberOfColors | ( | SizeType | NewNumberOfColors | ) |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Synchronize variable in nodal solution step data to the absolute maximum value across all processes.
ThisVariable | The variable to be synchronized. |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Synchronize variable in nodal solution step data to the absolute minimum value across all processes.
ThisVariable | The variable to be synchronized. |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Synchronize variable in nodal solution step data to the maximum value across all processes.
ThisVariable | The variable to be synchronized. |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Synchronize variable in nodal solution step data to the minimum value across all processes.
ThisVariable | The variable to be synchronized. |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Synchronize variable in nodal data to the absolute maximum value across all processes.
ThisVariable | The variable to be synchronized. |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Synchronize variable in nodal data to the absolute minimum value across all processes.
ThisVariable | The variable to be synchronized. |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Synchronize variable in nodal data to the maximum value across all processes.
ThisVariable | The variable to be synchronized. |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Synchronize variable in nodal data to the minimum value across all processes.
ThisVariable | The variable to be synchronized. |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
Reimplemented in Kratos::MPICommunicator.
Reimplemented in Kratos::MPICommunicator.
Reimplemented in Kratos::MPICommunicator.
Reimplemented in Kratos::MPICommunicator.
|
virtual |
Reimplemented in Kratos::MPICommunicator.
Reimplemented in Kratos::MPICommunicator.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |