C++ mpi module for stochmagnet_main Package
EXPR_EmptyNode.h
1 #ifndef EXPR_EmptyNode_H
2 #define EXPR_EmptyNode_H
3 
4 #include "EXPR_ElementaryGeometryNode.h"
5 
6 
7 //numerics functions headers
8 #include "core_numeric.h"
9 
18 
19 private:
20  //attributes
21 
22 
23 
24 
25 private:
26  //associations
27 protected:
28  //builders
29 
33  setName("EMPTY");
34  }
35 
36  //deleters
39  virtual ~EXPR_EmptyNode() {
40  }
41 
42 public:
43  //MEMORY
44  //======
52  virtual tMemSize getMemorySize() const override {
53  return sizeof(*this)+getContentsMemorySize();
54  }
55 
64  virtual tMemSize getContentsMemorySize() const override {
66  return mem;
67  }
68 
69 
73  virtual CORE_UniquePointer<EXPR_ElementaryGeometryNode> newInstance() const {
74  return New();
75  }
79  static inline CORE_UniquePointer<EXPR_EmptyNode> New() {
80  CORE_UniquePointer<EXPR_EmptyNode> p(new EXPR_EmptyNode(),
82  return p;
83  }
84 
89  virtual void setArguments(const std::vector<tString>& args) override {
90 
91  }
96  virtual tBoolean isInsideCanonicalGeometry(const std::array<tReal,3>& p) const override {
97  return false;
98  }
99 
106  virtual void computeCanonicalBoundingBox(std::array<tReal,3>& minPoint,
107  std::array<tReal,3>& maxPoint) const override {
108  for (auto& Pk:minPoint) Pk=core_numeric::getInfinity<tReal>();
109  for (auto& Pk:maxPoint) Pk=core_numeric::getInfinity<tReal>();
110 
111  }
115  virtual void adimensionize(const tReal& L) override {
116  }
117 public:
121  virtual tString toString() const override{
122  return "V";
123  }
124 };
125 
126 
127 
128 
129 
130 #endif
131 
132 
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class describes an elementary geometry.
Definition: EXPR_ElementaryGeometryNode.h:20
void setName(const tString &name)
set name
Definition: EXPR_ElementaryGeometryNode.h:89
virtual tMemSize getContentsMemorySize() const override
return nthe memory size of the included associations
Definition: EXPR_ElementaryGeometryNode.h:71
This class describes an empty node.
Definition: EXPR_EmptyNode.h:17
virtual tMemSize getContentsMemorySize() const override
return nthe memory size of the included associations
Definition: EXPR_EmptyNode.h:64
virtual ~EXPR_EmptyNode()
delete the class
Definition: EXPR_EmptyNode.h:39
virtual void computeCanonicalBoundingBox(std::array< tReal, 3 > &minPoint, std::array< tReal, 3 > &maxPoint) const override
compute the bounding box of the node
Definition: EXPR_EmptyNode.h:106
virtual tBoolean isInsideCanonicalGeometry(const std::array< tReal, 3 > &p) const override
return true if the point is in the node
Definition: EXPR_EmptyNode.h:96
virtual tMemSize getMemorySize() const override
return the memory size of the class
Definition: EXPR_EmptyNode.h:52
virtual void setArguments(const std::vector< tString > &args) override
set the argument to define the geometry
Definition: EXPR_EmptyNode.h:89
static CORE_UniquePointer< EXPR_EmptyNode > New()
crete the new instance of this
Definition: EXPR_EmptyNode.h:79
virtual void adimensionize(const tReal &L) override
adimensionize the primary geometry
Definition: EXPR_EmptyNode.h:115
virtual CORE_UniquePointer< EXPR_ElementaryGeometryNode > newInstance() const
create a new instance of this
Definition: EXPR_EmptyNode.h:73
EXPR_EmptyNode()
create the class
Definition: EXPR_EmptyNode.h:32
virtual tString toString() const override
return the string representation of this
Definition: EXPR_EmptyNode.h:121