C++ mpi module for stochmagnet_main Package
SM_Network.h
1 #ifndef SM_Network_H
2 #define SM_Network_H
3 
4 //define a real field
5 #include"SM_Field.h"
6 
7 //define the std::array object
8 #include <array>
9 
10 //super class header
11 #include "SM_Object.h"
12 
13 //constant header
14 #include "SM_Constants.h"
15 
16 
66 class SM_Network : public SM_Object {
67 
68  //attributes
69 private :
70 
71  //network part
72  int mIndex;
73  int mIndicesNumber;
74  int mRootIndex;
75  tString mIndexPrefix;
76  //file version for reading file portability
77  tInteger mFileVersion;
78  //number of particles of the network
79  tInteger mParticlesNumber;
80 
81  //number of halo particles needed by the network
82  tInteger mHaloParticlesNumber;
83 
84  //coordinates of all points of size nParticlesNumber+mHaloParticlesNumber
85  SM_RealField mX;
86 
87  //list of the neighbors particles indices in increasing ordered for each particle of size nNeighboringParticles
88  //mNeighboringParticlesList[q] in {0,nParticlesNumber+nHaloParticlesNumber[
89  std::valarray<tIndex> mNeighboringParticlesList;
90 
91  //mNeighboringParticlesNumberOffset[p] offset within mNeighboringParticlesList to get the first neighboring particle of the p particle of size mParticlesNumber+1
92  std::valarray<tIndex> mNeighboringParticlesNumberOffset;
93 
94 
95  //connection data of size nNeighboringParticles
96  std::valarray<tReal> mConnectionValues;
97 
98  //periodicity of the network
99  std::array<tBoolean,SM_Constants::DIM> mPeriodicity;
100 
101  //bounding box of the network
102  std::array<tReal,SM_Constants::DIM> mBoundingBoxMinPoint;
103  std::array<tReal,SM_Constants::DIM> mBoundingBoxSize;
104 
105 
106 protected:
107 
108 
109 
110  // CONSTRUCTORS
113  SM_Network(void) {
114  mIndex=-1;
115  mRootIndex=0;
116  mIndicesNumber=1;
117  mIndexPrefix="";
118 
119  //points of netowrk
120  mX.setElementsNumber(1);
121 
122  //first neighbor index
123  mNeighboringParticlesNumberOffset={0,0};
124 
125 
126  //bounding box
127  for(auto& Pk:mBoundingBoxMinPoint)Pk=0;
128  for(auto& Pk:mBoundingBoxSize) Pk=0;
129 
130  mParticlesNumber=0;
131  mHaloParticlesNumber=0;
132 
133  //no periodicity
134  mPeriodicity={false,false,false};
135  for(auto& Ik:mPeriodicity) Ik=0;
136  //file version
137  mFileVersion=1;
138 
139  }
140  // DESTRUCTORS
143  virtual ~SM_Network(void) {
144  }
145 
146 public :
147 
148  //Instance building
149  //=================
150 
151 
152 
153 
154  //MEMORY
155 
169  virtual tMemSize getMemorySize() const {
170  return sizeof(*this)+getContentsMemorySize();
171  }
172 
181  virtual tMemSize getContentsMemorySize() const {
182  tMemSize mem=SM_Object::getContentsMemorySize();
183  mem+=mX.getContentsMemorySize();
184  mem+=mNeighboringParticlesNumberOffset.size()*sizeof(tIndex);
185  mem+=mNeighboringParticlesList.size()*sizeof(tIndex);
186  mem+=mBoundingBoxMinPoint.size()*sizeof(tReal);
187  mem+=mBoundingBoxSize.size()*sizeof(tReal);
188  mem+=mConnectionValues.size()*sizeof(tReal);
189  mem+=mPeriodicity.size()*sizeof(tBoolean);
190  return mem;
191  }
192 
193  //SET & GET methods
194 
198  virtual void copy(const SM_Network& network) {
199  mX.copy(network.getParticlesCoordinates());
200  mNeighboringParticlesNumberOffset=network.getNeighboringParticlesNumberOffset();
201  mNeighboringParticlesList=network.getNeighboringParticlesList();
202  mConnectionValues=network.getConnectionValues();
203  }
204 
208  //virtual CORE_UniquePointer<SM_Network> newInstance() const=0;
209 
210 public:
211 
214  inline const int& getIndex() const {
215  return mIndex;
216  }
219  inline const int& getRootIndex() const {
220  return mRootIndex;
221  }
224  inline const int& getIndicesNumber() const {
225  return mIndicesNumber;
226  }
229  inline const tString& getIndexPrefix() const {
230  return mIndexPrefix;
231  }
232 
239  inline void setIndex(const int& index,const int& rootIndex,const int& indicesNumber) {
240  setIndex(index,rootIndex,indicesNumber,"_c");
241  }
249  inline void setIndex(const int& index,const int& rootIndex,const int& indicesNumber,const tString& prefix) {
250  mIndex=index;
251  mRootIndex=rootIndex;
252  mIndicesNumber=indicesNumber;
253  int nDigits=(int) (log(indicesNumber)+1.);
254  mIndexPrefix=prefix+functions_numeric::toString(index,nDigits)+"p"+functions_numeric::toString(indicesNumber,nDigits);
255  }
256 
257 
258 
259  //periodicity
260  //============
261 
265  inline void setPeriodicity(const std::initializer_list<tBoolean>&& period) {
266  tBoolean *iPeriod=mPeriodicity.data();
267  const tBoolean *ePeriod=iPeriod;ePeriod+=SM_Constants::DIM;
268  auto iter=period.begin();
269  while ((iPeriod!=ePeriod) && (iter!=period.end())) {
270  (*iPeriod)=(*iter);
271  iter++;
272  iPeriod++;
273  }
274  while (iPeriod!=ePeriod) {
275  (*iPeriod)=false;
276  iPeriod++;
277  }
278  }
279 
283  inline void setPeriodicity(const std::array<tBoolean,SM_Constants::DIM>& period) {
284  mPeriodicity=period;
285  }
286 
290  inline void setPeriodicity(const std::vector<tBoolean>& period) {
291  tBoolean *iPeriod=mPeriodicity.data();
292  const tBoolean *ePeriod=iPeriod;ePeriod+=SM_Constants::DIM;
293  auto iter=period.begin();
294  while ((iPeriod!=ePeriod) && (iter!=period.end())) {
295  (*iPeriod)=(*iter);
296  iter++;
297  iPeriod++;
298  }
299  while (iPeriod!=ePeriod) {
300  (*iPeriod)=false;
301  iPeriod++;
302  }
303  }
304 
308  inline const std::array<tBoolean,SM_Constants::DIM>& getPeriodicity() const {
309  return mPeriodicity;
310  }
311 
312 
313  //particles coodinates
314  //====================
318  inline void setParticlesNumber(const tInteger& nParticles) {
319  setSize(nParticles,0);
320  }
325  inline void setSize(const tInteger& nParticles,
326  const tInteger& nHaloParticles) {
327  mParticlesNumber=nParticles;
328  mHaloParticlesNumber=nHaloParticles;
329 
330  //number of particles
331  mX.setElementsNumber(nParticles+nHaloParticles);
332 
333  //index of neighbors
334  mNeighboringParticlesNumberOffset.resize(nParticles+1);
335 
336  //set the index of neighbors to 0
337  memset(&mNeighboringParticlesNumberOffset[0],0,sizeof(tIndex)*mNeighboringParticlesNumberOffset.size());
338 
339  //particles weights
340  // if (!mIsParticlesSpatialWeightUniform) {
341  // mParticlesSpatialWeight.resize(nParticles);
342 
343  // }
344 
345  }
349  inline const tInteger& getParticlesNumber() const {
350  return mParticlesNumber;
351  }
355  inline const tInteger& getHaloParticlesNumber() const {
356  return mHaloParticlesNumber;
357  }
358 
359 
363  inline void setParticlesCoordinates(std::initializer_list<tReal>&& coords) {
364  mX=coords;
365  }
369  inline void setParticlesCoordinates(const std::initializer_list<tReal>& coords) {
370  mX=coords;
371  }
375  inline void setParticlesCoordinates(const SM_RealField& coords) {
376  mX=coords;
377  }
378 
382  inline const SM_RealField& getParticlesCoordinates() const {
383  return mX;
384  }
385 
390  return mX;
391  }
392 
393  //neighboring particles
394  //=====================
395 
399  inline const std::valarray<tIndex>& getNeighboringParticlesList() const {
400  return mNeighboringParticlesList;
401  }
402 
406  inline std::valarray<tIndex>& getNeighboringParticlesList() {
407  return mNeighboringParticlesList;
408  }
409 
413  inline tIndex getNeighboringParticlesNumber() const {
414  return mNeighboringParticlesList.size();
415  }
416 
417 
421  inline tIndex getConnectionsNumber() const {
422  return mNeighboringParticlesList.size();
423  }
424 
428  inline const std::valarray<tIndex>& getNeighboringParticlesNumberOffset() const {
429  return mNeighboringParticlesNumberOffset;
430  }
434  inline std::valarray<tIndex>& getNeighboringParticlesNumberOffset() {
435  return mNeighboringParticlesNumberOffset;
436  }
437 
441  inline const tIndex* getNeighboringParticlesList(const tIndex& i) const {
442  ASSERT_IN(i<mNeighboringParticlesNumberOffset.size()-1);
443  return &mNeighboringParticlesList[mNeighboringParticlesNumberOffset[i]];
444  }
449  inline tIndex getNeighboringParticlesNumber(const tIndex& i) const {
450  ASSERT_IN(i<mNeighboringParticlesNumberOffset.size()-1);
451  return mNeighboringParticlesNumberOffset[i+1]- mNeighboringParticlesNumberOffset[i];
452  }
457  inline void setNeighboringParticlesList(std::valarray<tUCInt>&& neighborsNumber,
458  std::valarray<tIndex>&& neighborsList) {
459  //mNeighboringParticlesNumberOffset[p]=0;
460  //mNeighboringParticlesNumberOffset[p+1]=mNeighboringParticlesNumberOffset[p]+mNeighborsNumber[p]
461  //mFirsNeighborIndices.size()=nParticles+1
462  //mFirstNeighbordArrayIndex[i] : is the index of the first neighbor particle within the list mNeighborsParticlesIndices for the particle i
463  //mFirstNeighbordArrayIndex[L]: is the number of neighbors
464 
465  mNeighboringParticlesNumberOffset.resize(neighborsNumber.size()+1);
466  tIndex *iIndex=&mNeighboringParticlesNumberOffset[0];
467  tIndex *iNextIndex=iIndex;iNextIndex++;
468  const tIndex *eIndex=iIndex;eIndex+=mNeighboringParticlesNumberOffset.size();
469  (*iIndex)=0;
470  for(const auto& n:neighborsNumber) {
471  (*iNextIndex)=(*iIndex)+n;
472  iIndex=iNextIndex;
473  iNextIndex++;
474  }
475 
476  mNeighboringParticlesList=neighborsList;
477  }
478 
483  inline void setNeighboringParticlesList(const std::valarray<tUCInt>& neighborsNumber,
484  const std::vector<tIndex>& neighborsList) {
485  //set neighbors indices
486  //mFirstNeighborIndices[p]=0;
487  //mFirstNeighborIndices[p+1]=mFirstNeighborIndices[p]+mNeighborsNumber[p]
488  //mFirsNeighborIndices.size()=nParticles+1
489  mNeighboringParticlesNumberOffset.resize(neighborsNumber.size()+1);
490 
491  //itertaor on index of the first neighbor of current particule
492  tIndex *iIndex=&mNeighboringParticlesNumberOffset[0];
493  //iterator on index of the first neighbor of next particle
494  tIndex *iNextIndex=iIndex;iNextIndex++;
495  //end iterator on first neighbor arrays of size mParticlesNumber+1
496  const tIndex *eIndex=iIndex;eIndex+=mNeighboringParticlesNumberOffset.size();
497  (*iIndex)=0;
498  for(const auto& n:neighborsNumber) {//loop on number of neighbors per particles
499  (*iNextIndex)=(*iIndex)+n;
500  //next perticle iterator
501  iIndex=iNextIndex;
502  iNextIndex++;
503  }
504 
505 
506  //copy vector neighborsIndices into array mNeighboringParticlesList
507  auto Ni=neighborsList.cbegin();
508  mNeighboringParticlesList.resize(neighborsList.size());
509  std::for_each(std::begin(mNeighboringParticlesList),std::end(mNeighboringParticlesList),[&Ni](tIndex& e){e=(*Ni);Ni++;} );
510 
511  }
512 
516  inline tIndex computeAloneParticlesNumber() const {
517  tIndex nAloneParticles=0;
518  //mNeighboringParticlesNumberOffset[p]=0;
519  //neighorsNumber=mNeighboringParticlesNumberOffset[p+1]-mNeighboringParticlesNumberOffset[p]
520  //mFirsNeighborIndices.size()=nParticles+1
521  //begin iterator on mNeighboringParticlesNumberOffset
522  const tIndex *iIndex=&mNeighboringParticlesNumberOffset[0];
523  const tIndex *iNextIndex=iIndex;iNextIndex++;
524  //end iterator on mNeighboringParticlesNumberOffset
525  const tIndex *eIndex=iIndex;eIndex+=mNeighboringParticlesNumberOffset.size();
526  while (iNextIndex!=eIndex) {
527  //increment of 1 if the number of neighbors = 0
528  nAloneParticles+=((*iNextIndex)==(*iIndex));
529  //next particles
530  iIndex=iNextIndex;
531  iNextIndex++;
532 
533  }
534  return nAloneParticles;
535  }
536 
537 
538  //connection values
539  //=================
540 
544  inline tBoolean hasConnectionValues() const {
545  return (mConnectionValues.size()>1);
546  }
547 
551  inline tIndex getConnectionValuesNumber() const {
552  return mConnectionValues.size();
553  }
554 
558  inline const std::valarray<tReal>& getConnectionValues() const {
559  return mConnectionValues;
560  }
561 
565  inline std::valarray<tReal>& getConnectionValues() {
566  return mConnectionValues;
567  }
568 public:
569 
576  inline tReal& getConnectionValue(const tIndex& i,const tIndex& j,tBoolean& isFound) {
577  ASSERT_IN(i<mNeighboringParticlesNumberOffset.size()-1);
578  ASSERT_IN(j<mNeighboringParticlesNumberOffset.size()-1);
579  tIndex index=mNeighboringParticlesNumberOffset[i];
580  index+=functions_numeric::quickSearch(j,mNeighboringParticlesNumberOffset[i+1]-index,
581  &mNeighboringParticlesList[index],
582  isFound);
583  return mConnectionValues[index];
584 
585  }
592  inline const tReal& getConnectionValue(const tIndex& i,const tIndex& j,tBoolean& isFound) const {
593  ASSERT_IN(i<mNeighboringParticlesNumberOffset.size()-1);
594  ASSERT_IN(j<mNeighboringParticlesNumberOffset.size()-1);
595  tIndex index=mNeighboringParticlesNumberOffset[i];
596  index+=functions_numeric::quickSearch(j,mNeighboringParticlesNumberOffset[i+1]-index,
597  &mNeighboringParticlesList[index],
598  isFound);
599  return mConnectionValues[index];
600 
601  }
602 
607  inline const tReal* getConnectionValues(const tIndex& i) const {
608  ASSERT_IN(i<mNeighboringParticlesNumberOffset.size()-1);
609  return &mConnectionValues[mNeighboringParticlesNumberOffset[i]*(mConnectionValues.size()>1)];
610 
611  }
616  inline tReal* getConnectionValues(const tIndex& i) {
617  ASSERT_IN(i<mNeighboringParticlesNumberOffset.size()-1);
618  return &mConnectionValues[mNeighboringParticlesNumberOffset[i]*(mConnectionValues.size()>1)];
619 
620  }
621 
622 
623  //bounding box of the particles
624  //==============================
625 
629  inline const std::array<tReal,SM_Constants::DIM>& getBoundingBoxMinPoint() const {
630  return mBoundingBoxMinPoint;
631  }
635  inline const std::array<tReal,SM_Constants::DIM>& getBoundingBoxSize() const {
636  return mBoundingBoxSize;
637  }
638 
639 
644  virtual void computeBoundingBox(std::array<tReal,SM_Constants::DIM>& bbMinPoint,
645  std::array<tReal,SM_Constants::DIM>& bbSize) const =0;
646 
647 
648  //update state methods
649  //=====================
653  virtual void updateState() {
654  computeBoundingBox(mBoundingBoxMinPoint,mBoundingBoxSize);
655  }
656 
663  virtual void updateConnectionValues(const tReal& noiseRate,
665  const tReal& J,
666  const std::function<void(const tReal&,const tReal& ,const tReal&,tReal& )>& F)=0;
667 
668  protected:
677  void updateConnectionValuesSlice(const tIndex& startIndex,
678  const tIndex& endIndex,
679  const tReal& noiseRate,
681  const tReal& J,
682  const std::function<void(const tReal&,const tReal& ,const tReal&,tReal& )>& F);
683 
684 public:
685 
686  //IO methods
687  //===========
711  tBoolean saveToFile(const tString& fileName) const;
712 
717  tBoolean loadFromFile(const tString& fileName);
718 
719 protected:
720 
724  virtual void saveStatesToFile(std::ofstream& file) const;
725 
731  virtual void loadStatesFromFile(std::ifstream& file,
732  tInteger& version,
733  tDimension& d);
734 
735 
736 
737 private:
738  void saveParticlesToFile(std::ofstream& file) const;
739  tBoolean loadParticleDataFromFile(std::ifstream& file,
740  const tDimension& d);
741  tBoolean loadParticlesFromFile(std::ifstream& file,
742  const tDimension& d,
743  const tIndex& nParticles,
744  const tIndex& nHaloParticles,
745  const tIndex& nNeighboringParticles);
746 
747 public:
748 
752  virtual tString toString() const override;
753 };
754 
755 #endif
virtual tMemSize getContentsMemorySize() const override
return the memory size of the included associations
Definition: CORE_Field.h:102
void copy(const tIndex &n, const Q *vs)
initialize the field to the values of pointer of size n
Definition: CORE_Field.h:447
void setElementsNumber(const tInteger &n)
set the number of element of the container
Definition: CORE_Field.h:121
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:278
static constexpr tDimension DIM
space dimension
Definition: SM_Constants.h:80
This class is describes a network composed by.
Definition: SM_Network.h:66
const std::array< tReal, SM_Constants::DIM > & getBoundingBoxMinPoint() const
get the min point of the boudning box
Definition: SM_Network.h:629
void setPeriodicity(const std::array< tBoolean, SM_Constants::DIM > &period)
set periodicity
Definition: SM_Network.h:283
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_Network.h:169
tIndex getNeighboringParticlesNumber(const tIndex &i) const
get the number of neighboring particles for the particle i for writing
Definition: SM_Network.h:449
const std::array< tReal, SM_Constants::DIM > & getBoundingBoxSize() const
get the size of the boudning box
Definition: SM_Network.h:635
virtual void updateConnectionValues(const tReal &noiseRate, SM_StochasticFunctionsInterface &randomF, const tReal &J, const std::function< void(const tReal &, const tReal &, const tReal &, tReal &)> &F)=0
compute the connection values of the particles in [startInddex,endIndex[
tIndex getConnectionValuesNumber() const
get the number of connection values
Definition: SM_Network.h:551
tBoolean hasConnectionValues() const
has connection values
Definition: SM_Network.h:544
const std::valarray< tIndex > & getNeighboringParticlesList() const
get the neighbors indices
Definition: SM_Network.h:399
tIndex getConnectionsNumber() const
get the number of connections
Definition: SM_Network.h:421
tIndex computeAloneParticlesNumber() const
return the particles number without any connection
Definition: SM_Network.h:516
tReal * getConnectionValues(const tIndex &i)
get the connections values of the particle i for writing
Definition: SM_Network.h:616
virtual void saveStatesToFile(std::ofstream &file) const
save the state of the network
Definition: SM_Network.cpp:97
const tReal * getConnectionValues(const tIndex &i) const
get the connections values of the particle i for reading
Definition: SM_Network.h:607
const int & getIndicesNumber() const
get the number of network parts
Definition: SM_Network.h:224
void updateConnectionValuesSlice(const tIndex &startIndex, const tIndex &endIndex, const tReal &noiseRate, SM_StochasticFunctionsInterface &randomF, const tReal &J, const std::function< void(const tReal &, const tReal &, const tReal &, tReal &)> &F)
compute the connection values of the particles in [startInddex,endIndex[
Definition: SM_Network.cpp:10
tReal & getConnectionValue(const tIndex &i, const tIndex &j, tBoolean &isFound)
get the value of the connection between particle i and j fro writing
Definition: SM_Network.h:576
void setNeighboringParticlesList(std::valarray< tUCInt > &&neighborsNumber, std::valarray< tIndex > &&neighborsList)
set the neighbors list and offset for list
Definition: SM_Network.h:457
const std::valarray< tReal > & getConnectionValues() const
get the connection values for reading
Definition: SM_Network.h:558
void setPeriodicity(const std::vector< tBoolean > &period)
set periodicity
Definition: SM_Network.h:290
const tInteger & getHaloParticlesNumber() const
return the halo particles number
Definition: SM_Network.h:355
const int & getIndex() const
create new instance of the network
Definition: SM_Network.h:214
const std::array< tBoolean, SM_Constants::DIM > & getPeriodicity() const
get periodicity per direction
Definition: SM_Network.h:308
std::valarray< tIndex > & getNeighboringParticlesNumberOffset()
get the index of the array mNeighboringParticlesList of the first neighbor of the particle p
Definition: SM_Network.h:434
void setParticlesCoordinates(std::initializer_list< tReal > &&coords)
void set particles 3D-coordinates
Definition: SM_Network.h:363
void setParticlesCoordinates(const std::initializer_list< tReal > &coords)
void set particles 3D-coordinates
Definition: SM_Network.h:369
const tString & getIndexPrefix() const
index of the root network for network defined with many parts for mpi version
Definition: SM_Network.h:229
const tIndex * getNeighboringParticlesList(const tIndex &i) const
get the index of neighboring particles list for the particle i for reading
Definition: SM_Network.h:441
const tInteger & getParticlesNumber() const
return the particles number
Definition: SM_Network.h:349
const SM_RealField & getParticlesCoordinates() const
void get particles coordinates
Definition: SM_Network.h:382
const std::valarray< tIndex > & getNeighboringParticlesNumberOffset() const
get the index of the array mNeighboringParticlesList of the first neighbor of the particle p
Definition: SM_Network.h:428
std::valarray< tReal > & getConnectionValues()
get the connection values for writing
Definition: SM_Network.h:565
virtual void updateState()
update the state of the network It computes the bounding box
Definition: SM_Network.h:653
void setSize(const tInteger &nParticles, const tInteger &nHaloParticles)
set the size of the network
Definition: SM_Network.h:325
std::valarray< tIndex > & getNeighboringParticlesList()
get the neighbors indices
Definition: SM_Network.h:406
tBoolean saveToFile(const tString &fileName) const
save the network into file
Definition: SM_Network.cpp:76
const tReal & getConnectionValue(const tIndex &i, const tIndex &j, tBoolean &isFound) const
get the value of the connection between particle i and j for reading
Definition: SM_Network.h:592
void setNeighboringParticlesList(const std::valarray< tUCInt > &neighborsNumber, const std::vector< tIndex > &neighborsList)
set the neighboring particles list and its offset
Definition: SM_Network.h:483
void setIndex(const int &index, const int &rootIndex, const int &indicesNumber, const tString &prefix)
set the index of the network
Definition: SM_Network.h:249
void setParticlesCoordinates(const SM_RealField &coords)
void set particles coordinates
Definition: SM_Network.h:375
tIndex getNeighboringParticlesNumber() const
get the number of connections
Definition: SM_Network.h:413
SM_Network(void)
create a network class
Definition: SM_Network.h:113
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_Network.h:181
virtual void copy(const SM_Network &network)
copy the network
Definition: SM_Network.h:198
virtual tString toString() const override
turn the class into a string representation
Definition: SM_Network.cpp:496
virtual void computeBoundingBox(std::array< tReal, SM_Constants::DIM > &bbMinPoint, std::array< tReal, SM_Constants::DIM > &bbSize) const =0
get the min point and size of the bunding box
virtual ~SM_Network(void)
destroy
Definition: SM_Network.h:143
void setPeriodicity(const std::initializer_list< tBoolean > &&period)
set periodicity
Definition: SM_Network.h:265
void setIndex(const int &index, const int &rootIndex, const int &indicesNumber)
set the index of the network
Definition: SM_Network.h:239
SM_RealField & getParticlesCoordinates()
void get particles coordinates
Definition: SM_Network.h:389
tBoolean loadFromFile(const tString &fileName)
load the network from file
Definition: SM_Network.cpp:188
const int & getRootIndex() const
index of the root network for network defined with many parts for mpi version
Definition: SM_Network.h:219
virtual void loadStatesFromFile(std::ifstream &file, tInteger &version, tDimension &d)
load the state of the network
Definition: SM_Network.cpp:220
void setParticlesNumber(const tInteger &nParticles)
set the particles number
Definition: SM_Network.h:318
This class is a base class for Stoch Microm package.
Definition: SM_Object.h:36
This class describes a stochastic functions based on same random number generator which implement ran...
Definition: SM_StochasticFunctionsInterface.h:18