C++ mpi module for stochmagnet_main Package
SMOMPI_NoMasterMacroCellsMagnetizationField.h
1 #ifndef SMOMPI_NoMasterMacroCellsMagnetizationField_H
2 #define SMOMPI_NoMasterMacroCellsMagnetizationField_H
3 
4 //base classes
5 #include "SM_MacroCellsMagnetizationField.h"
6 
7 
19 
20 private :
21 
24 
25 
26 
27 protected:
28  // CONSTRUCTORS
32 
33  }
34 
35  // DESTRUCTORS
39  }
40 
41 
42 public :
43 
44  //Instance building
45  //=================
46 
47 
51  inline static CORE_UniquePointer<SelfClass> New() {
52  return CORE_UniquePointer<SelfClass>(new SelfClass(),
54  }
55 
56 
60  virtual CORE_UniquePointer<SM_MacroCellsMagnetizationField> 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  return mem;
91  }
92 
93 public:
94 
103  virtual void computeField(const SM_Material& material,
104  const SM_MacroCellsNetwork& network,
105  const SM_RealField& S,
106  SM_RealField& M) final {
107 
108  SuperClass::computeField(material,network,S,M);
109  }
110 
111 
112 public:
113 
114 
115 };
116 
117 
118 #endif
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class describes an MPI implementation of the magnetization field based on no master core.
Definition: SMOMPI_NoMasterMacroCellsMagnetizationField.h:18
SMOMPI_NoMasterMacroCellsMagnetizationField(void)
create a network class
Definition: SMOMPI_NoMasterMacroCellsMagnetizationField.h:31
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SMOMPI_NoMasterMacroCellsMagnetizationField.h:88
static CORE_UniquePointer< SelfClass > New()
build a new instance of the operator
Definition: SMOMPI_NoMasterMacroCellsMagnetizationField.h:51
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SMOMPI_NoMasterMacroCellsMagnetizationField.h:76
virtual CORE_UniquePointer< SM_MacroCellsMagnetizationField > newInstance() const override
create a New instance of this
Definition: SMOMPI_NoMasterMacroCellsMagnetizationField.h:60
virtual void computeField(const SM_Material &material, const SM_MacroCellsNetwork &network, const SM_RealField &S, SM_RealField &M) final
compute the magnetization field from S
Definition: SMOMPI_NoMasterMacroCellsMagnetizationField.h:103
virtual ~SMOMPI_NoMasterMacroCellsMagnetizationField(void)
destroy
Definition: SMOMPI_NoMasterMacroCellsMagnetizationField.h:38
This class is describes a Magnetization field.
Definition: SM_MacroCellsMagnetizationField.h:23
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_MacroCellsMagnetizationField.h:101
void computeField(const tIndex &stepIndex, const SM_Material &material, const SM_MacroCellsNetwork &network, const SM_RealField &S)
compute the magnetization field from S
Definition: SM_MacroCellsMagnetizationField.h:173
This class is describes a macro cell network.
Definition: SM_MacroCellsNetwork.h:25
This class describes a materials defined by state attributes:
Definition: SM_Material.h:61