C++ mpi module for stochmagnet_main Package
SM_DomainGridBuilder.h
1 #ifndef SM_DomainGridBuilder_H
2 #define SM_DomainGridBuilder_H
3 
4 //super class header
5 #include "SM_Object.h"
6 
7 
8 
9 //parser header for domain expression
10 #include "EXPR_Parser.h"
11 
19 
20  //attributes
21 private :
22 
23  typedef SM_Object SuperClass;
25 
26 
27 
28 protected:
29 
30  // CONSTRUCTORS
34 
35 
36  }
37 
38  // DESTRUCTORS
41  virtual ~SM_DomainGridBuilder(void) {
42  }
43 
44 public :
45 
46  //Instance building
47  //=================
48 
49 
50 
51 
52  //MEMORY
53 
67  virtual tMemSize getMemorySize() const {
68  return sizeof(*this)+getContentsMemorySize();
69  }
70 
79  virtual tMemSize getContentsMemorySize() const {
80  tMemSize mem=SuperClass::getContentsMemorySize();
81 
82  return mem;
83  }
84 
85 
86 
87  //MASK builder for grid
88  //----------------------
89 
90 public:
98  tBoolean buildMask(const std::array<tReal,SM_Constants::DIM>& Hs,
99  const tString& domainExpression,
100  std::array<tInteger,SM_Constants::DIM>& Ns,
101  std::array<tReal,SM_Constants::DIM>& bbMinPoint,
102  std::valarray<tMask>& mask);
103 
104 protected:
114  virtual void buildMask(const std::array<tInteger,SM_Constants::DIM>& Ns,
115  const std::array<tReal,SM_Constants::DIM>& Hs,
116  const std::array<tReal,SM_Constants::DIM>& X0,
117  const EXPR_RootNode& geo,
118  std::valarray<tMask>& mask) const=0;
119 
129  void buildMaskSlice(const tIndex& startIndex,
130  const tIndex& endIndex,
131  const std::array<tInteger,SM_Constants::DIM>& Ns,
132  const std::array<tReal,SM_Constants::DIM>& Hs,
133  const std::array<tReal,SM_Constants::DIM>& X0,
134  const EXPR_RootNode& geo,
135  std::valarray<tMask>& mask) const;
136 
137 
138 
139 };
140 
141 #endif
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:278
This class describes the root of the tree.
Definition: EXPR_RootNode.h:16
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
void buildMaskSlice(const tIndex &startIndex, const tIndex &endIndex, 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
build the mask for the bounding box with the geo function
Definition: SM_DomainGridBuilder.cpp:106
virtual ~SM_DomainGridBuilder(void)
destroy
Definition: SM_DomainGridBuilder.h:41
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 =0
build the mask for the bounding box with the geo function
SM_DomainGridBuilder(void)
create a network class
Definition: SM_DomainGridBuilder.h:33
tBoolean buildMask(const std::array< tReal, SM_Constants::DIM > &Hs, const tString &domainExpression, std::array< tInteger, SM_Constants::DIM > &Ns, std::array< tReal, SM_Constants::DIM > &bbMinPoint, std::valarray< tMask > &mask)
build mask
Definition: SM_DomainGridBuilder.cpp:15
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_DomainGridBuilder.h:67
This class is a base class for Stoch Microm package.
Definition: SM_Object.h:36