1 #ifndef SM_CrystalStructuresBuilder_H
2 #define SM_CrystalStructuresBuilder_H
9 #include "SM_CrystalStructure.h"
94 const std::array<tReal,SM_Constants::DIM>& P,
95 const std::map<tIndex,tIndex>& neighboringParticlesOrderedList,
99 tIndex*& iNeighborsNumberPerParticle,
100 tIndex& nNeighboringParticles,
101 tIndex*& iNeighboringParticlesList) {
105 (*iParticles)=indexParticle;
109 for(
const auto Pk:P) {
120 (*iNeighborsNumberPerParticle)=neighboringParticlesOrderedList.size();
122 nNeighboringParticles+=(*iNeighborsNumberPerParticle);
123 iNeighborsNumberPerParticle++;
125 for(
const auto& indexCell:neighboringParticlesOrderedList) {
126 (*iNeighboringParticlesList)=indexCell.second;
127 iNeighboringParticlesList++;
141 const std::array<tInteger,SM_Constants::DIM>& Ns,
142 const std::array<tBoolean,SM_Constants::DIM>& periodicity,
143 std::valarray<tIndex>& sliceParticlesNumberOffset)
const=0;
162 const tInteger& sliceIndex,
163 const std::array<tReal,SM_Constants::DIM>& X0,
164 const std::array<tInteger,SM_Constants::DIM>& Ns,
165 const std::array<tReal,SM_Constants::DIM>& Hs,
166 const std::array<tBoolean,SM_Constants::DIM>& periodicity,
167 const std::valarray<tMask>& mask,
171 tIndex *neighborsNumberPerParticle,
172 tIndex& nNeighboringParticles,
173 tIndex *neighboringParticlesList)
const=0;
186 const std::array<tInteger,SM_Constants::DIM>& Ns,
187 const std::array<tBoolean,SM_Constants::DIM>& isPeriodic,
188 const std::array<tInteger,SM_Constants::DIM>& gridSize,
189 const std::array<tInteger,SM_Constants::DIM>& gridIndex)
const=0;
208 const std::array<tInteger,SM_Constants::DIM>& gridIndex,
209 const std::array<tReal,SM_Constants::DIM>& X0,
210 const std::array<tInteger,SM_Constants::DIM>& Ns,
211 const std::array<tReal,SM_Constants::DIM>& Hs,
212 const std::array<tBoolean,SM_Constants::DIM>& periodicity,
213 const std::valarray<tMask>& mask,
217 tIndex *neighborsNumberPerParticle,
218 tIndex& nNeighboringParticles,
219 tIndex *neighboringParticlesList)
const=0;
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:278
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 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 =0
build a network based on a nD paver grid decomposed in grid sets
static void RegisterParticle(const tIndex &indexParticle, const std::array< tReal, SM_Constants::DIM > &P, const std::map< tIndex, tIndex > &neighboringParticlesOrderedList, tIndex &nParticles, tIndex *&iParticles, tReal *&iX, tIndex *&iNeighborsNumberPerParticle, tIndex &nNeighboringParticles, tIndex *&iNeighboringParticlesList)
register particles in network list data
Definition: SM_CrystalStructuresBuilder.h:93
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 =0
build a network based on a decomposed in slice sets
virtual ~SM_CrystalStructuresBuilder(void)
destroy the instance of the class
Definition: SM_CrystalStructuresBuilder.h:35
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 =0
get the max size of the network
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 =0
get the max size of the network
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_CrystalStructuresBuilder.h:60
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_CrystalStructuresBuilder.h:72
SM_CrystalStructuresBuilder(void)
create an instance class
Definition: SM_CrystalStructuresBuilder.h:27
This class is a base class for Stoch Microm package.
Definition: SM_Object.h:36