C++ mpi module for stochmagnet_main Package
SM_BCC2StructuresBuilder.h
1 #ifndef SM_BCC2StructuresBuilder_H
2 #define SM_BCC2StructuresBuilder_H
3 
4 //super class header
5 #include "SM_CrystalStructuresBuilder.h"
6 
14 
15 
16 
17 protected:
18  // CONSTRUCTORS
22  }
23 
24 
25  // DESTRUCTORS
28  virtual ~SM_BCC2StructuresBuilder(void) {
29  }
30 
31 public :
32 
33  //Instance building
34  //=================
35 
39  inline static CORE_UniquePointer<SM_BCC2StructuresBuilder> New() {
40  return CORE_UniquePointer<SM_BCC2StructuresBuilder>(new SM_BCC2StructuresBuilder(),
42  }
43 
44 
45  //MEMORY
46 
60  virtual tMemSize getMemorySize() const {
61  return sizeof(*this)+getContentsMemorySize();
62  }
63 
72  virtual tMemSize getContentsMemorySize() const {
74  return mem;
75  }
76 
77  //SET & GET methods
78 
79 
80 public:
81 
82 
83 
91  virtual void computeParticlesWeight(const std::array<tInteger,SM_Constants::DIM>& Ns,
92  const std::array<tReal,SM_Constants::DIM>& Hs,
93  const std::array<tBoolean,SM_Constants::DIM>& isPeriodic,
94  const std::valarray<tMask>& mask,
95  std::valarray<tReal>& vs) const;
96 
97 
105  virtual void getNetworkSliceMaxSizeOffset(const SM_CrystalStructure& cStructure,
106  const std::array<tInteger,SM_Constants::DIM>& Ns,
107  const std::array<tBoolean,SM_Constants::DIM>& periodicity,
108  std::valarray<tIndex>& sliceParticlesNumberOffset) const override;
109 
110 
126  virtual void buildNetworkSliceSet(const tInteger& slicesNumber,
127  const tInteger& sliceIndex,
128  const std::array<tReal,SM_Constants::DIM>& X0,
129  const std::array<tInteger,SM_Constants::DIM>& Ns,
130  const std::array<tReal,SM_Constants::DIM>& Hs,
131  const std::array<tBoolean,SM_Constants::DIM>& periodicity,
132  const std::valarray<tMask>& mask,
133  tIndex& nParticles,
134  tIndex *particles,
135  tReal *X,
136  tIndex *neighborsNumberPerParticle,
137  tIndex& nNeighboringParticles,
138  tIndex *neighboringParticlesList) const override;
139 
140 
141 
142 
150  virtual tIndex getNetworkGridMaxSize(const SM_CrystalStructure& cStructure,
151  const std::array<tInteger,SM_Constants::DIM>& Ns,
152  const std::array<tBoolean,SM_Constants::DIM>& isPeriodic,
153  const std::array<tInteger,SM_Constants::DIM>& gridSize,
154  const std::array<tInteger,SM_Constants::DIM>& gridIndex) const override;
155 
156 
172  virtual void buildNetworkGridSet(const std::array<tInteger,SM_Constants::DIM>& gridsNumber,
173  const std::array<tInteger,SM_Constants::DIM>& gridIndex,
174  const std::array<tReal,SM_Constants::DIM>& X0,
175  const std::array<tInteger,SM_Constants::DIM>& Ns,
176  const std::array<tReal,SM_Constants::DIM>& Hs,
177  const std::array<tBoolean,SM_Constants::DIM>& periodicity,
178  const std::valarray<tMask>& mask,
179  tIndex& nParticles,
180  tIndex *particles,
181  tReal *X,
182  tIndex *neighborsNumberPerParticle,
183  tIndex& nNeighboringParticles,
184  tIndex *neighboringParticlesList) const override;
185 
186 
187 };
188 
189 #endif
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class generate a grid of bcc structures.
Definition: SM_BCC2StructuresBuilder.h:13
virtual tIndex getNetworkGridMaxSize(const SM_CrystalStructure &cStructure, const std::array< tInteger, SM_Constants::DIM > &Ns, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, const std::array< tInteger, SM_Constants::DIM > &gridSize, const std::array< tInteger, SM_Constants::DIM > &gridIndex) const override
get the max size of the network
Definition: SM_BCC2StructuresBuilder.cpp:328
virtual ~SM_BCC2StructuresBuilder(void)
destroy the instance of the class
Definition: SM_BCC2StructuresBuilder.h:28
SM_BCC2StructuresBuilder(void)
create an instance class
Definition: SM_BCC2StructuresBuilder.h:21
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_BCC2StructuresBuilder.h:72
static CORE_UniquePointer< SM_BCC2StructuresBuilder > New()
build a new instance of a BCC structure
Definition: SM_BCC2StructuresBuilder.h:39
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_BCC2StructuresBuilder.h:60
virtual void buildNetworkSliceSet(const tInteger &slicesNumber, const tInteger &sliceIndex, const std::array< tReal, SM_Constants::DIM > &X0, const std::array< tInteger, SM_Constants::DIM > &Ns, const std::array< tReal, SM_Constants::DIM > &Hs, const std::array< tBoolean, SM_Constants::DIM > &periodicity, const std::valarray< tMask > &mask, tIndex &nParticles, tIndex *particles, tReal *X, tIndex *neighborsNumberPerParticle, tIndex &nNeighboringParticles, tIndex *neighboringParticlesList) const override
build a network based on a decomposed in slice sets
Definition: SM_BCC2StructuresBuilder.cpp:57
virtual void computeParticlesWeight(const std::array< tInteger, SM_Constants::DIM > &Ns, const std::array< tReal, SM_Constants::DIM > &Hs, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, const std::valarray< tMask > &mask, std::valarray< tReal > &vs) const
ocmpute the particles weight
Definition: SM_BCC2StructuresBuilder.cpp:621
virtual void buildNetworkGridSet(const std::array< tInteger, SM_Constants::DIM > &gridsNumber, const std::array< tInteger, SM_Constants::DIM > &gridIndex, const std::array< tReal, SM_Constants::DIM > &X0, const std::array< tInteger, SM_Constants::DIM > &Ns, const std::array< tReal, SM_Constants::DIM > &Hs, const std::array< tBoolean, SM_Constants::DIM > &periodicity, const std::valarray< tMask > &mask, tIndex &nParticles, tIndex *particles, tReal *X, tIndex *neighborsNumberPerParticle, tIndex &nNeighboringParticles, tIndex *neighboringParticlesList) const override
build a network based on a nD paver grid decomposed in grid sets
Definition: SM_BCC2StructuresBuilder.cpp:346
virtual void getNetworkSliceMaxSizeOffset(const SM_CrystalStructure &cStructure, const std::array< tInteger, SM_Constants::DIM > &Ns, const std::array< tBoolean, SM_Constants::DIM > &periodicity, std::valarray< tIndex > &sliceParticlesNumberOffset) const override
get the max size of the network
Definition: SM_BCC2StructuresBuilder.cpp:13
This class decribe a crystal structure.
Definition: SM_CrystalStructure.h:30
This class is an interface class for method for building a grid of crystal structure.
Definition: SM_CrystalStructuresBuilder.h:17
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_CrystalStructuresBuilder.h:72