C++ mpi module for stochmagnet_main Package
SM_MacroCellsContinuousDemagnetizedOperator.h
1 #ifndef SM_MacroCellsContinuousDemagnetizedOperator_H
2 #define SM_MacroCellsContinuousDemagnetizedOperator_H
3 
4 //base classes
5 #include "SM_MacroCellsDemagnetizedOperator.h"
6 #include "SM_LinearSliceOperator.h"
7 
21 
22 
23 public:
24 
25 private :
26 
27  //type class
30 
31  //single attributes
32  //-----------------
33 
34 
35 
36  //multiple attributes
37  //------------------
38 
39  //single associations
40  //-------------------
41 
42 
43 
44  //multiple associations
45  //---------------------
46 
47 
48 
49 protected:
50  // CONSTRUCTORS
54  }
55 
56  // DESTRUCTORS
60  }
61 
62 public :
63 
64  //Instance building
65  //=================
66 
67 
81  virtual tMemSize getMemorySize() const {
82  return sizeof(*this)+this->getContentsMemorySize();
83  }
84 
93  virtual tMemSize getContentsMemorySize() const {
94  tMemSize mem=SuperClass::getContentsMemorySize();
95  return mem;
96  }
97 public:
98 
99  //New Instance
100 
104  inline static CORE_UniquePointer<SelfClass> New(const CORE_OptionsList& arguments) {
105  return CORE_UniquePointer<SelfClass>(new SelfClass(arguments),
107  }
111  inline static CORE_UniquePointer<SelfClass> New() {
112  CORE_OptionsList arguments;
113  return New(arguments);
114  }
115 
116 
117 
121  virtual CORE_UniquePointer<SM_SliceOperator> NewInstance() const override {
122  CORE_UniquePointer<SelfClass> op=New();
123  op->setMacroCellsNetwork(getMacroCellsNetwork().newInstance());
124  op->setMacroCellsMagnetizationField(getMacroCellsMagnetizationField().newInstance());
125  op->setMacroCellsDemagnetizedField(getMacroCellsDemagnetizedField().newInstance());
126  return std::move(op);
127  }
128 
129 
130 
131 public:
132 
133  //discretize the operator
134  //======================
135 
136 
137 public:
138  //Fields computation
139  //==================
140 
143  virtual tString toString() const final {
144  std::stringstream ret;
145  ret<<SuperClass::toString()<<"\n";
146  return ret.str();
147  }
148 };
149 
150 
151 #endif
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class is an list of options.
Definition: CORE_OptionsList.h:36
This class is describes a linear operator interface in a slice of particles of a network.
Definition: SM_LinearSliceOperator.h:17
This class describes a demagnetized operator on macro cells network.
Definition: SM_MacroCellsContinuousDemagnetizedOperator.h:20
static CORE_UniquePointer< SelfClass > New()
build a new instance of the operator
Definition: SM_MacroCellsContinuousDemagnetizedOperator.h:111
static CORE_UniquePointer< SelfClass > New(const CORE_OptionsList &arguments)
build a new instance of the operator
Definition: SM_MacroCellsContinuousDemagnetizedOperator.h:104
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_MacroCellsContinuousDemagnetizedOperator.h:93
virtual ~SM_MacroCellsContinuousDemagnetizedOperator(void)
destroy
Definition: SM_MacroCellsContinuousDemagnetizedOperator.h:59
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_MacroCellsContinuousDemagnetizedOperator.h:81
SM_MacroCellsContinuousDemagnetizedOperator(const CORE_OptionsList &arguments)
create a network class
Definition: SM_MacroCellsContinuousDemagnetizedOperator.h:53
virtual CORE_UniquePointer< SM_SliceOperator > NewInstance() const override
create a New instance of this
Definition: SM_MacroCellsContinuousDemagnetizedOperator.h:121
virtual tString toString() const final
return string representaton of the operator
Definition: SM_MacroCellsContinuousDemagnetizedOperator.h:143
This class is describes a demagnetized operator.
Definition: SM_MacroCellsDemagnetizedOperator.h:46
SM_MacroCellsMagnetizationField & getMacroCellsMagnetizationField()
get the macro cells Magnetization field
Definition: SM_MacroCellsDemagnetizedOperator.h:155
SM_MacroCellsDemagnetizedField & getMacroCellsDemagnetizedField()
get the macro cells demagnetized field
Definition: SM_MacroCellsDemagnetizedOperator.h:172
SM_MacroCellsNetwork & getMacroCellsNetwork()
get the macro cell network
Definition: SM_MacroCellsDemagnetizedOperator.h:138
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_MacroCellsDemagnetizedOperator.h:117
virtual tString toString() const override
return string representaton of the operator
Definition: SM_MacroCellsDemagnetizedOperator.h:276