C++ mpi module for stochmagnet_main Package
SMOMPI_AllMasterMacroCellsNetwork.h
1 #ifndef SMOMPI_AllMasterMacroCellsNetwork_H
2 #define SMOMPI_AllMasterMacroCellsNetwork_H
3 
4 //base classes
5 #include "SM_MacroCellsNetwork.h"
6 
7 //MPI header
8 #include "MPI_Run.h"
9 #include "MPI_WorldToWorldMessage.h"
10 
20 
21 
22 public:
23 private :
24 
25  //type class
28 
29 
30 protected:
31  // CONSTRUCTORS
35 
36  }
37 
38  // DESTRUCTORS
42  }
43 
44 
45 public :
46 
47  //Instance building
48  //=================
49 
53  inline static CORE_UniquePointer<SelfClass> New() {
54  return CORE_UniquePointer<SelfClass>(new SelfClass(),SelfClass::Delete());
55  }
56 
60  virtual CORE_UniquePointer<SM_MacroCellsNetwork> newInstance() const override {
61  return New();
62  }
76  virtual tMemSize getMemorySize() const {
77  return sizeof(*this)+this->getContentsMemorySize();
78  }
79 
88  virtual tMemSize getContentsMemorySize() const {
89  tMemSize mem=SuperClass::getContentsMemorySize();
90 
91 
92  return mem;
93  }
94 public:
95 
96 
97 public:
98 
99 
100 
101 
102 
103  //Macro cells methods
104  //======================
105 public:
106 
107 
108 
109  //discretize the network
110  //======================
111 public:
112 
113 public:
118  virtual void computeMacroCells(const SM_Material& material,
119  const SM_Network& network) override;
120 
125  virtual void computeMacroCellsMassCenter(const SM_Material& material,
126  const SM_Network& network) override;
127 
128 protected:
135  virtual void computeBoundingBoxMacroCells(const SM_Material& material,
136  const SM_Network& network,
137  const std::array<tReal,SM_Constants::DIM>& P,
138  const std::array<tReal,SM_Constants::DIM>& Q) override;
139  // String representation
140  // =======================
141 public:
142 
143 
146  virtual tString toString() const override {
147  std::stringstream ret;
148  ret<<SuperClass::toString()<<"\n";
149  return ret.str();
150  }
151 
152 
153 };
154 
155 
156 #endif
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class describes a macro cells network for all core considered as master.
Definition: SMOMPI_AllMasterMacroCellsNetwork.h:19
virtual tString toString() const override
return string representaton of the operator
Definition: SMOMPI_AllMasterMacroCellsNetwork.h:146
virtual void computeMacroCellsMassCenter(const SM_Material &material, const SM_Network &network) override
compute the macro cells of the network
Definition: SMOMPI_AllMasterMacroCellsNetwork.cpp:72
static CORE_UniquePointer< SelfClass > New()
return a new unique instnace of class This
Definition: SMOMPI_AllMasterMacroCellsNetwork.h:53
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SMOMPI_AllMasterMacroCellsNetwork.h:76
virtual CORE_UniquePointer< SM_MacroCellsNetwork > newInstance() const override
create a New instance of this
Definition: SMOMPI_AllMasterMacroCellsNetwork.h:60
virtual void computeMacroCells(const SM_Material &material, const SM_Network &network) override
compute the macro cells of the network
Definition: SMOMPI_AllMasterMacroCellsNetwork.cpp:5
virtual void computeBoundingBoxMacroCells(const SM_Material &material, const SM_Network &network, const std::array< tReal, SM_Constants::DIM > &P, const std::array< tReal, SM_Constants::DIM > &Q) override
compute the macro cells of the network
Definition: SMOMPI_AllMasterMacroCellsNetwork.cpp:29
virtual ~SMOMPI_AllMasterMacroCellsNetwork(void)
destroy
Definition: SMOMPI_AllMasterMacroCellsNetwork.h:41
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SMOMPI_AllMasterMacroCellsNetwork.h:88
SMOMPI_AllMasterMacroCellsNetwork(void)
create a network class
Definition: SMOMPI_AllMasterMacroCellsNetwork.h:34
This class is describes a macro cell network.
Definition: SM_MacroCellsNetwork.h:25
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_MacroCellsNetwork.h:117
virtual tString toString() const override
return string representaton of the operator
Definition: SM_MacroCellsNetwork.h:440
This class describes a materials defined by state attributes:
Definition: SM_Material.h:61
This class is describes a network composed by.
Definition: SM_Network.h:66