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.
distributed_model_part_initializer.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Philipp Bucher (https://github.com/philbucher)
11 //
12 
13 
14 #if !defined(KRATOS_DISTRIBUTED_MODEL_PART_INITIALIZER_H_INCLUDED )
15 #define KRATOS_DISTRIBUTED_MODEL_PART_INITIALIZER_H_INCLUDED
16 
17 
18 // System includes
19 
20 
21 // External includes
22 
23 
24 // Project includes
25 #include "includes/define.h"
26 #include "includes/model_part.h"
27 
28 
29 namespace Kratos
30 {
33 
36 
38 
46 {
47 public:
50 
53 
57 
60  ModelPart& rModelPart,
61  const DataCommunicator& rDataComm,
62  int SourceRank)
63  : mrModelPart(rModelPart),
64  mrDataComm(rDataComm),
65  mSourceRank(SourceRank)
66  { }
67 
69  virtual ~DistributedModelPartInitializer() = default;
70 
74 
76 
77  void Execute();
78 
80 
81 private:
84 
85  ModelPart& mrModelPart;
86  const DataCommunicator& mrDataComm;
87  int mSourceRank;
88 
90 
91 }; // Class DistributedModelPartInitializer
92 
94 
96 
97 } // namespace Kratos.
98 
99 #endif // KRATOS_DISTRIBUTED_MODEL_PART_INITIALIZER_H_INCLUDED defined
Serial (do-nothing) version of a wrapper class for MPI communication.
Definition: data_communicator.h:318
Initialize a distributed ModelPart from a serial one.
Definition: distributed_model_part_initializer.h:46
KRATOS_CLASS_POINTER_DEFINITION(DistributedModelPartInitializer)
Pointer definition of DistributedModelPartInitializer.
void CopySubModelPartStructure()
Definition: distributed_model_part_initializer.cpp:66
void Execute()
Definition: distributed_model_part_initializer.cpp:91
DistributedModelPartInitializer(ModelPart &rModelPart, const DataCommunicator &rDataComm, int SourceRank)
Constructor.
Definition: distributed_model_part_initializer.h:59
virtual ~DistributedModelPartInitializer()=default
Destructor.
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21