C++ mpi module for stochmagnet_main Package
SMOMPI_DomainGridBuilder.h
1 #ifndef SMOMPI_DomainGridBuilder_H
2 #define SMOMPI_DomainGridBuilder_H
3 
4 //super class header
5 #include "SM_DomainGridBuilder.h"
6 
7 
17 
18  //attributes
19 private :
20 
23 
24 
25 
26 protected:
27 
28  // CONSTRUCTORS
32 
33 
34  }
35 
36  // DESTRUCTORS
39  virtual ~SMOMPI_DomainGridBuilder(void) {
40  }
41 
42 public :
43 
44  //Instance building
45  //=================
46 
47 
52  static inline CORE_UniquePointer<SelfClass> New() {
53  CORE_UniquePointer<SelfClass> p(new SelfClass(),SelfClass::Delete());
54  return p;
55  }
56 
57  //MEMORY
58 
72  virtual tMemSize getMemorySize() const {
73  return sizeof(*this)+getContentsMemorySize();
74  }
75 
84  virtual tMemSize getContentsMemorySize() const {
85  tMemSize mem=SuperClass::getContentsMemorySize();
86 
87  return mem;
88  }
89 
90 
91 
92  //MASK builder for grid
93  //----------------------
94 
95 protected:
105  virtual void buildMask(const std::array<tInteger,SM_Constants::DIM>& Ns,
106  const std::array<tReal,SM_Constants::DIM>& Hs,
107  const std::array<tReal,SM_Constants::DIM>& X0,
108  const EXPR_RootNode& geo,
109  std::valarray<tMask>& mask) const final;
110 
111 
112 
113 
114 
115 };
116 
117 #endif
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class describes the root of the tree.
Definition: EXPR_RootNode.h:16
This class builds a domain mask. It implements the MPI/OMP version of the virtual abstract method SMO...
Definition: SMOMPI_DomainGridBuilder.h:16
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SMOMPI_DomainGridBuilder.h:84
virtual void buildMask(const std::array< tInteger, SM_Constants::DIM > &Ns, const std::array< tReal, SM_Constants::DIM > &Hs, const std::array< tReal, SM_Constants::DIM > &X0, const EXPR_RootNode &geo, std::valarray< tMask > &mask) const final
build the mask for the bounding box with the geo function
Definition: SMOMPI_DomainGridBuilder.cpp:21
virtual ~SMOMPI_DomainGridBuilder(void)
destroy
Definition: SMOMPI_DomainGridBuilder.h:39
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SMOMPI_DomainGridBuilder.h:72
static CORE_UniquePointer< SelfClass > New()
create a new unique instance of This class
Definition: SMOMPI_DomainGridBuilder.h:52
SMOMPI_DomainGridBuilder(void)
create a network class
Definition: SMOMPI_DomainGridBuilder.h:31
This class build a grid of structure.
Definition: SM_DomainGridBuilder.h:18
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_DomainGridBuilder.h:79