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.
List of all members
Kratos::ParallelFillCommunicator Class Reference

This function recomputes the communication plan for MPI. More...

#include <parallel_fill_communicator.h>

Inheritance diagram for Kratos::ParallelFillCommunicator:
Collaboration diagram for Kratos::ParallelFillCommunicator:

Public Member Functions

Type Definitions
 KRATOS_CLASS_POINTER_DEFINITION (ParallelFillCommunicator)
 Pointer definition of ParallelFillCommunicator. More...
 
Life Cycle
 ParallelFillCommunicator (ModelPart &rModelPart)
 Constructor (deprecated) More...
 
 ParallelFillCommunicator (ModelPart &rModelPart, const DataCommunicator &rDataCommunicator)
 Constructor. More...
 
virtual ~ParallelFillCommunicator ()=default
 Destructor. More...
 
Operations
void Execute () override
 Execute the communicator fill. More...
 
void PrintModelPartDebugInfo (const ModelPart &rModelPart) override
 Function to print mesh information of the provided model part. More...
 
Input and output
std::string Info () const override
 Turn back information as a string. More...
 
void PrintInfo (std::ostream &rOStream) const override
 Print information about this object. More...
 
void PrintData (std::ostream &rOStream) const override
 Print object's data. More...
 
- Public Member Functions inherited from Kratos::FillCommunicator
 KRATOS_CLASS_POINTER_DEFINITION (FillCommunicator)
 Pointer definition of FillCommunicator. More...
 
 FillCommunicator (ModelPart &rModelPart)
 Constructor (deprecated) More...
 
 FillCommunicator (ModelPart &rModelPart, const DataCommunicator &rDataCommunicator)
 Constructor. More...
 
 FillCommunicator (FillCommunicator const &rOther)=delete
 Copy constructor. More...
 
virtual ~FillCommunicator ()=default
 Destructor. More...
 
FillCommunicatoroperator= (FillCommunicator const &rOther)=delete
 Assignment operator. More...
 
void PrintDebugInfo ()
 Function to print DETAILED mesh information WARNING: to be used for debugging only as many information are plotted. More...
 
void SetEchoLevel (const FillCommunicatorEchoLevel EchoLevel)
 Set the echo level. More...
 
FillCommunicatorEchoLevel GetEchoLevel () const
 Get the echo level. More...
 

Protected Member Functions

Protected Operations
void ComputeCommunicationPlan (ModelPart &rModelPart)
 This function computes the communication plan. More...
 
void InitializeParallelCommunicationMeshes (ModelPart &rModelPart, const std::vector< int > &rColors, const int MyRank)
 Initialize the communicator's ghost, local and interface meshes for all communication pairs (colors). More...
 
void GenerateMeshes (const int NeighbourPID, const int MyPID, const unsigned int Color, ModelPart &rModelPart)
 Generate the ghost, local and interface meshes for processes of a communication pair (color). More...
 
- Protected Member Functions inherited from Kratos::FillCommunicator
ModelPartGetBaseModelPart ()
 Get the base model part. More...
 

Additional Inherited Members

- Public Types inherited from Kratos::FillCommunicator
enum class  FillCommunicatorEchoLevel { NO_PRINTING = 0 , INFO = 1 , DEBUG_INFO = 2 }
 
- Protected Attributes inherited from Kratos::FillCommunicator
const DataCommunicatormrDataComm
 
FillCommunicatorEchoLevel mEchoLevel = FillCommunicatorEchoLevel::NO_PRINTING
 Data communicator reference. More...
 

Detailed Description

This function recomputes the communication plan for MPI.

The objective of this class is to read the mesh owned by each node in a distributed context and to fill the communication plan (coloring) so to allow the communication to be performed correctly It fills the Ghost and Local lists and performs the coloring, then it updates the MPI communicator

Author
Riccardo Rossi

Constructor & Destructor Documentation

◆ ParallelFillCommunicator() [1/2]

Kratos::ParallelFillCommunicator::ParallelFillCommunicator ( ModelPart rModelPart)

Constructor (deprecated)

Parameters
rModelPartThe model part to recompute the communication plan for MPI

◆ ParallelFillCommunicator() [2/2]

Kratos::ParallelFillCommunicator::ParallelFillCommunicator ( ModelPart rModelPart,
const DataCommunicator rDataCommunicator 
)

Constructor.

Parameters
rModelPartThe model part to recompute the communication plan for MPI
rDataCommunicatorThe communicator to recompute the communication plan for MPI

◆ ~ParallelFillCommunicator()

virtual Kratos::ParallelFillCommunicator::~ParallelFillCommunicator ( )
virtualdefault

Destructor.

Member Function Documentation

◆ ComputeCommunicationPlan()

void Kratos::ParallelFillCommunicator::ComputeCommunicationPlan ( ModelPart rModelPart)
protected

This function computes the communication plan.

Parameters
rModelPartThe model part to compute the communication plan

@TODO for large problems, this should use a compressed matrix.

◆ Execute()

void Kratos::ParallelFillCommunicator::Execute ( )
overridevirtual

Execute the communicator fill.

This method is intended to perform the communicator filling

Reimplemented from Kratos::FillCommunicator.

◆ GenerateMeshes()

void Kratos::ParallelFillCommunicator::GenerateMeshes ( const int  NeighbourPID,
const int  MyPID,
const unsigned int  Color,
ModelPart rModelPart 
)
protected

Generate the ghost, local and interface meshes for processes of a communication pair (color).

◆ Info()

std::string Kratos::ParallelFillCommunicator::Info ( ) const
overridevirtual

Turn back information as a string.

Reimplemented from Kratos::FillCommunicator.

◆ InitializeParallelCommunicationMeshes()

void Kratos::ParallelFillCommunicator::InitializeParallelCommunicationMeshes ( ModelPart rModelPart,
const std::vector< int > &  rColors,
const int  MyRank 
)
protected

Initialize the communicator's ghost, local and interface meshes for all communication pairs (colors).

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::ParallelFillCommunicator::KRATOS_CLASS_POINTER_DEFINITION ( ParallelFillCommunicator  )

Pointer definition of ParallelFillCommunicator.

◆ PrintData()

void Kratos::ParallelFillCommunicator::PrintData ( std::ostream &  rOStream) const
overridevirtual

Print object's data.

Reimplemented from Kratos::FillCommunicator.

◆ PrintInfo()

void Kratos::ParallelFillCommunicator::PrintInfo ( std::ostream &  rOStream) const
overridevirtual

Print information about this object.

Reimplemented from Kratos::FillCommunicator.

◆ PrintModelPartDebugInfo()

void Kratos::ParallelFillCommunicator::PrintModelPartDebugInfo ( const ModelPart rModelPart)
overridevirtual

Function to print mesh information of the provided model part.

This function is intended to check and print some mesh information

Parameters
rModelPartReference to the model part to be checked

Reimplemented from Kratos::FillCommunicator.


The documentation for this class was generated from the following files: