#include <gather_modelpart_utility.h>
|
void | GatherOnMaster () |
| This function gathers the model part on the master rank. More...
|
|
template<class TDataType > |
void | GatherOnMaster (const Variable< TDataType > &rVariable) |
| The function gathers the model part from the master rank to the other ranks. More...
|
|
template<class TDataType > |
void | ScatterFromMaster (const Variable< TDataType > &rVariable) |
| The function scatters the model part from the master rank to the other ranks. More...
|
|
static void | GatherEntitiesFromOtherPartitions (ModelPart &rModelPart, const std::map< int, std::vector< std::size_t >> &rNodesToBring, const std::map< int, std::vector< std::size_t >> &rElementsToBring, const std::map< int, std::vector< std::size_t >> &rConditionsToBring, const bool CallExecuteAfterBringingEntities=true, const int EchoLevel=0) |
| Function to gather entities from other partitions. More...
|
|
static void | GatherNodesFromOtherPartitions (ModelPart &rModelPart, const std::map< int, std::vector< std::size_t >> &rNodesToBring, const bool CallExecuteAfterBringingEntities=true, const int EchoLevel=0) |
| Function to gather nodes from other partitions. More...
|
|
static void | GatherElementsFromOtherPartitions (ModelPart &rModelPart, const std::map< int, std::vector< std::size_t >> &rElementsToBring, const bool CallExecuteAfterBringingEntities=true, const int EchoLevel=0) |
| Function to gather elements from other partitions. More...
|
|
static void | GatherConditionsFromOtherPartitions (ModelPart &rModelPart, const std::map< int, std::vector< std::size_t >> &rConditionsToBring, const bool CallExecuteAfterBringingEntities=true, const int EchoLevel=0) |
| Function to gather conditions from other partitions. More...
|
|
◆ ConditionsContainerType
Conditions container definition.
◆ ElementsContainerType
Elements container definition.
◆ NodesContainerType
Nodes container definition.
◆ GatherModelPartUtility() [1/2]
Kratos::GatherModelPartUtility::GatherModelPartUtility |
( |
const int |
GatherRank, |
|
|
ModelPart & |
rOriginModelPart, |
|
|
ModelPart & |
rDestinationModelPart |
|
) |
| |
|
inline |
Default constructor.
This function is designed to obtain data from "origin_model_part.GetMesh(mesh_id)", copy it to a new model part and make rank "gather_rank" to have a copy of it. Transferred nodes will be treated as ghost on the gather_rank
- Parameters
-
GatherRank | MPI rank to which the model part is gathered |
rOriginModelPart | Model part on which the origin mesh is contained |
rDestinationModelPart | Model part to which we gather the data |
◆ GatherModelPartUtility() [2/2]
GatherModelPartUtility::GatherModelPartUtility |
( |
const int |
GatherRank, |
|
|
ModelPart & |
rOriginModelPart, |
|
|
const int |
MeshId, |
|
|
ModelPart & |
rDestinationModelPart |
|
) |
| |
Default constructor.
This function is designed to obtain data from "origin_model_part.GetMesh(mesh_id)", copy it to a new model part and make rank "gather_rank" to have a copy of it. Transferred nodes will be treated as ghost on the gather_rank
- Parameters
-
GatherRank | MPI rank to which the model part is gathered |
rOriginModelPart | Model part on which the origin mesh is contained |
MeshId | Id of the mesh which contains the data |
rDestinationModelPart | Model part to which we gather the data |
◆ GatherConditionsFromOtherPartitions()
void GatherModelPartUtility::GatherConditionsFromOtherPartitions |
( |
ModelPart & |
rModelPart, |
|
|
const std::map< int, std::vector< std::size_t >> & |
rConditionsToBring, |
|
|
const bool |
CallExecuteAfterBringingEntities = true , |
|
|
const int |
EchoLevel = 0 |
|
) |
| |
|
static |
Function to gather conditions from other partitions.
This function is intended to gather conditions from other partitions. The map indicates the partitions to gather and the vector the conditions to gather from each partition. In the current serial case it does nothing.
- Parameters
-
rModelPart | Model part to gather entities from other partitions |
rConditionsToBring | Conditions to gather from other partitions. It must be an ordered map to ensure the order of the ranks. This is a synchronous MPI implementation, and order matters until asynchronous is implemented. The map represents the following. The key (int) the rank where to bring the conditions, and the vector of indexes, the ids of the conditions to bring |
CallExecuteAfterBringingEntities | Call Execute after gathering conditions |
EchoLevel | The verbosity level |
◆ GatherElementsFromOtherPartitions()
void GatherModelPartUtility::GatherElementsFromOtherPartitions |
( |
ModelPart & |
rModelPart, |
|
|
const std::map< int, std::vector< std::size_t >> & |
rElementsToBring, |
|
|
const bool |
CallExecuteAfterBringingEntities = true , |
|
|
const int |
EchoLevel = 0 |
|
) |
| |
|
static |
Function to gather elements from other partitions.
This function is intended to gather elements from other partitions. The map indicates the partitions to gather and the vector the elements to gather from each partition. In the current serial case it does nothing.
- Parameters
-
rModelPart | Model part to gather elements from other partitions |
rElementsToBring | Elements to gather from other partitions. It must be an ordered map to ensure the order of the ranks. This is a synchronous MPI implementation, and order matters until asynchronous is implemented. The map represents the following. The key (int) the rank where to bring the elements, and the vector of indexes, the ids of the elements to bring |
CallExecuteAfterBringingEntities | Call Execute after gathering elements |
EchoLevel | The verbosity level |
◆ GatherEntitiesFromOtherPartitions()
void GatherModelPartUtility::GatherEntitiesFromOtherPartitions |
( |
ModelPart & |
rModelPart, |
|
|
const std::map< int, std::vector< std::size_t >> & |
rNodesToBring, |
|
|
const std::map< int, std::vector< std::size_t >> & |
rElementsToBring, |
|
|
const std::map< int, std::vector< std::size_t >> & |
rConditionsToBring, |
|
|
const bool |
CallExecuteAfterBringingEntities = true , |
|
|
const int |
EchoLevel = 0 |
|
) |
| |
|
static |
Function to gather entities from other partitions.
This function is intended to gather entities from other partitions. The map indicates the partitions to gather and the vector the entities to gather from each partition. In the current serial case it does nothing. The map represents the following. The key (int) the rank where to bring the entities, and the vector of indexes, the ids of the entities to bring
- Parameters
-
rModelPart | Model part to gather entities from other partitions |
rNodesToBring | Nodes to gather from other partitions. It must be an ordered map to ensure the order of the ranks. This is a synchronous MPI implementation, and order matters until asynchronous is implemented. |
rElementsToBring | Elements to gather from other partitions. It must be an ordered map to ensure the order of the ranks. This is a synchronous MPI implementation, and order matters until asynchronous is implemented. |
rConditionsToBring | Conditions to gather from other partitions. It must be an ordered map to ensure the order of the ranks. This is a synchronous MPI implementation, and order matters until asynchronous is implemented. |
CallExecuteAfterBringingEntities | Call Execute after gathering entities |
EchoLevel | The verbosity level |
◆ GatherNodesFromOtherPartitions()
void GatherModelPartUtility::GatherNodesFromOtherPartitions |
( |
ModelPart & |
rModelPart, |
|
|
const std::map< int, std::vector< std::size_t >> & |
rNodesToBring, |
|
|
const bool |
CallExecuteAfterBringingEntities = true , |
|
|
const int |
EchoLevel = 0 |
|
) |
| |
|
static |
Function to gather nodes from other partitions.
This function is intended to gather nodes from other partitions. The map indicates the partitions to gather and the vector the nodes to gather from each partition. In the current serial case it does nothing.
- Parameters
-
rModelPart | Model part to gather nodes from other partitions |
rNodesToBring | Nodes to gather from other partitions. It must be an ordered map to ensure the order of the ranks. This is a synchronous MPI implementation, and order matters until asynchronous is implemented. The map represents the following. The key (int) the rank where to bring the nodes, and the vector of indexes, the ids of the nodes to bring |
CallExecuteAfterBringingEntities | Call Execute after gathering nodes |
EchoLevel | The verbosity level |
◆ GatherOnMaster() [1/2]
void GatherModelPartUtility::GatherOnMaster |
( |
| ) |
|
This function gathers the model part on the master rank.
◆ GatherOnMaster() [2/2]
template<class TDataType >
void GatherModelPartUtility::GatherOnMaster |
( |
const Variable< TDataType > & |
rVariable | ) |
|
The function gathers the model part from the master rank to the other ranks.
- Parameters
-
rVariable | The variable to be gathered |
◆ Info()
std::string GatherModelPartUtility::Info |
( |
| ) |
const |
Turn back information as a string.
◆ KRATOS_CLASS_POINTER_DEFINITION()
◆ PrintData()
void GatherModelPartUtility::PrintData |
( |
std::ostream & |
rOStream | ) |
const |
◆ PrintInfo()
void GatherModelPartUtility::PrintInfo |
( |
std::ostream & |
rOStream | ) |
const |
Print information about this object.
◆ ScatterFromMaster()
template<class TDataType >
template void GatherModelPartUtility::ScatterFromMaster |
( |
const Variable< TDataType > & |
rVariable | ) |
|
The function scatters the model part from the master rank to the other ranks.
- Parameters
-
rVariable | The variable to be scattered |
The documentation for this class was generated from the following files: