C++ mpi module for stochmagnet_main Package
SM_StochasticJs.h
1 #ifndef SM_StochasticJs_H
2 #define SM_StochasticJs_H
3 
4 //inherited class header
5 #include "SM_StochasticOutput.h"
6 
7 //beam class header
8 #include "SM_LandauLifschitzBeam.h"
9 
10 //suystem class header
11 #include "SM_System.h"
12 
13 //runner header
14 #include "CORE_Run.h"
15 
16 //string utility header
17 #include "core_string.h"
18 #include "core_numeric.h"
19 
20 
21 
34 class SM_StochasticJs : public SM_StochasticOutput<SM_StochasticJs> {
35 
36  // ATTRIBUTES
37 
38 public:
39 
40 
41 
42 private:
43 
44  //class types definition
45  typedef SM_StochasticJs Self;
47 
48  tBoolean mIsLLBeam;
49 
50  tString mCTPackedFileName;
51  tString mCTFileName;
52 
53  tIndex mStepIndex;
54  tReal mE;//esperance
55 
56 
57  //S at equilibrium
58  SM_RealField mSeq;
59  std::array<tReal,SM_Constants::DIM> mBarS;//mean of S over the particles
60  tReal mNormS;
61 
62  tUCInt mStochasticIndex;
63  tUCInt mMeanSIndex;
64  tUCInt mMeanJIndex;
65  tUCInt mNSamplesIndex;
66  tUCInt mNSimsIndex;
67 
68  tUCInt mESRawIndex;
69  tUCInt mEJRawIndex;
70  tUCInt mNRawIndex;
71 
72 
73  tString mJFunctionName;
74  std::function<void(const tReal&,const tReal& ,const tReal&,tReal& )> mJFunction;
75 
76  std::ofstream *mJsFile;
77 
78 public:
79  // METHODS
80 
81  // CONSTRUCTORS
82 
86 
88  "<stochastic noise>",
89  "<Mean of |S|>",
90  "<mean of J>",
91  "<samples number>",
92  "<number of simulations>",
93  });
94 
95  mStochasticIndex=0;
96  mMeanSIndex=1;
97  mMeanJIndex=2;
98  mNSamplesIndex=3;
99  mNSimsIndex=4;
100 
101  mESRawIndex=0;
102  mEJRawIndex=1;
103  mNRawIndex=2;
104  std::valarray<tReal>& outputs=getOutputValues();
105  outputs.resize(5);
106 
107  memset(&outputs[0],0,outputs.size()*sizeof(tReal));
108 
109  setJFunction("increase");
110 
111  mJsFile=null;
112  }
113 
114 
115 
116  // DESTRUCTORS
117 public:
118 
121  virtual ~SM_StochasticJs(void) {
122  }
123 
124 
125 
126 public:
127  //MEMORY
128 
142  virtual tMemSize getMemorySize() const {
143  return sizeof(*this)+getContentsMemorySize();
144  }
145 
154  virtual tMemSize getContentsMemorySize() const {
155  tMemSize mem=SuperClass::getContentsMemorySize();
156  mem+=mCTFileName.length()*sizeof(tChar);
157  mem+=mCTPackedFileName.length()*sizeof(tChar);
158  mem+=mBarS.size()*sizeof(tReal);
159  mem+=mSeq.getContentsMemorySize();
160  mem+=mJFunctionName.length()*sizeof(tChar);
161  mem+=mCTPackedFileName.length()*sizeof(tChar);
162  mem+=mCTFileName.length()*sizeof(tChar);
163  mem+=(mJsFile==null)?0:sizeof(*mJsFile);
164  return mem;
165  }
166 
170  inline static CORE_UniquePointer<Self> New() {
171  return CORE_UniquePointer<Self>(new Self(),
173  }
177  inline static CORE_UniquePointer<Self> New(const Self& c) {
178  CORE_UniquePointer<Self> p=New();
179  p->copy(c);
180  return p;
181  }
182 
183  //SET & GET Methods
184  //=================
188  virtual void copy(const SM_StochasticOutputComponent& c) override {
189  SuperClass::copy(c);
190  }
191 
192 
199  inline void setJFunction(const tString& FName) {
200  mJFunctionName=FName;
201  switch(FName[0]) {
202 
203  case 'd'://decrease
204  mJFunction=([](const tReal& J,const tReal& eps,const tReal& normal,tReal& v) {
205  //v=J/(1+|eps.N|)
206  v=normal;
207  v*=eps;
208  v=fabs(v);
209  v++;
210  v=1./v;
211  v*=J;
212  });
213  break;
214  case 'c'://cubic-decrease
215  mJFunction=([](const tReal& J,const tReal& eps,const tReal& normal,tReal& v) {
216  //v=J/(1+|eps.N|)^3
217  v=normal;
218  v*=eps;
219  v=fabs(v);
220  v++;
221  v=v*v*v;
222  v=1./v;
223  v*=J;
224  });
225  break;
226  case 'i'://increase
227  default:
228  mJFunction=([](const tReal& J,const tReal& eps,const tReal& normal,tReal& v) {
229  //v=std::max(0,J*(1+eps.N))
230  v=normal;
231  v*=eps;
232  v++;
233  v*=J;
234  v=std::max((tReal)0,v);
235  });
236  break;
237  }
238 
239 
240  }
244  inline const std::function<void(const tReal&,const tReal& ,const tReal&,tReal& )>& getJFunction() const {
245  return mJFunction;
246  }
247 
251  inline void setEquilibriumState(const SM_RealField& Seq) {
252  mSeq=Seq;
253  }
256  inline const SM_RealField& getEquilibriumState() const {
257  return mSeq;
258  }
262  return mSeq;
263  }
264 
268  virtual void adimensionize(const SM_Material& material) override {
269  }
270 
275  inline void printHeader(std::ofstream& file,const SM_Beam& beam) {
276  //header is the data
277  //get the system
278  file<<"# Stochastic J Curie Temperature with "<<getPackedSimulationsIndex()<<"/"<<getPackedSimulationsNumber()<<" packed simulations of size "<<beam.getBeamSize()<<" simulations generated by soft:"<<CORE_Run::GetSoftName()<<" Version:"<<CORE_Run::GetVersion()<<"\n";
279 
280  //print beam output
281  tString str="beam:"+beam.toString();
282  core_string::replaceAll("\n","\n#",str);
283  file<<"#"<<str<<"\n";
284 
285  //print strochastic output
286  str="StochasticOutput:"+toString();
287  core_string::replaceAll("\n","\n#",str);
288  file<<"#"<<str<<"\n";
289 
290  //Tc=J*\epsilon * z / 3.kB
291  tReal Tc=beam.getSystem().getMaterial().getExchangeEnergyFactor();
294  Tc/=(3.0*SM_Constants::K_B);
295 
296  file<<"# T: temperature N : simulations number\n";
297  file<<"# for all simulation s in [0,N[:\n";
298  //file<<"# \t for all step t in [t_{eq},T[, bar S_k(eps,s,t)=frac{1}{P} sum_{p=0}^{p=P-1} <S^s_k(eps,t,p),S^0_k(0,t_{eq},p)>\n";
299  file<<"# \t for all step t in [t_{eq},T[, bar S_k(s,t)=frac{1}{P} sum_{p=0}^{p=P-1} S^s_k(t,p) \n";
300  file<<"# \t E_s=frac{1}{T} sum_{t=0}^{t=T-1} |bar S_k(eps,s,t)|\n";
301  file<<"# E=frac{1}{N} sum_{s=0}^{s=N-1} E_s\n";
302  file<<"\n";
303  file<<"# Curie Temperature: "<<Tc<<"\n";
304  file<<"#";
305  for(const auto& d:getOutputDescription()) file<<d<<"\t";
306  file<<"\n";
307  }
308 
309 
310 
311  //implemented templated methods
312  //=============================
313 
323  inline tBoolean open(const SM_Beam& beam) {
324  tString routineName="SM_StochasticJs::open()";
325  CORE_Profiler::StartCallRoutine(routineName);
326 
327  //set step index to an unreachable step value (infinity)
328  mStepIndex=core_numeric::getInfinity<tIndex>();
329 
330 
331  if (getIndex()==0) {
332  std::valarray<tReal>& outputs=getOutputValues();
333 
334  //temperature
335  outputs[mStochasticIndex]=beam.getSystem().getStochasticNoise();
336 
337  //open the core & global CT Files for writting
338  //--------------------------------------------
339  tString prefix=this->getPrefix();
340 
341  if ((prefix.length()>0)&&(getIndex()==0)) {
342  //save the stochastic output for simulations in file
343  mCTFileName=CORE_IO::GetAbsolutePath(this->getOutputPath()+"/"+prefix);
344  mCTPackedFileName=mCTFileName;
345  if (getPackedSimulationsNumber()>1) {
346  mCTPackedFileName+="-"+std::to_string(getPackedSimulationsIndex())+"p";
347  }
348  mCTPackedFileName+=".ct";
349  mCTFileName+=".ct";
350  } else {
351  //prefix is null : no saving
352  mCTFileName="";
353  mCTPackedFileName="";
354  }
355  //std::cout<<"JCT file name:"<< mCTFileName<<" index:"<<getIndex()<<" prefix:"<<prefix<<"\n";
356  if (mCTPackedFileName.length()>0) {
358 
359  std::ofstream file(mCTPackedFileName.c_str(),std::ios::out);
360  if (file) {
361  printHeader(file,beam);
362 
363  } else {
364  std::cout<<"Fatal Error : "<<mCTPackedFileName<<" can not be opened \n";
365  return false;
366  }
367  }
368  }
369 
370  mJsFile=new std::ofstream(CORE_IO::GetAbsolutePath(this->getOutputPath()+"/"+prefix+".j0s").c_str(),
371  std::ios::out);
372  (*mJsFile)<<"#simulation epsilon time <J for the particle 0>\n";
373 
374 
375 
376 
377  //iinit the stochastic computings
378  //---------------------------------
379  //number of raws values number is null
380  tIndex &nRaws=getPackedRawValuesNumber();
381  nRaws=0;
382 
383  //set the size of the distribution
384  std::valarray<tReal>& rawValues=getPackedRawValues();
385 
386  rawValues.resize(3);//E(|S|),E(J),nSimulations per pack
387 
388  //initialize to 0
389  memset(&rawValues[0],0,rawValues.size()*sizeof(tReal));
390 
391  //init the class state
392  //----------------------
393 
394  }
395 
396  CORE_Profiler::EndCallRoutine(routineName);
397  return true;
398  }
399 
400 
401 
402 
408  inline tBoolean open(const tIndex& s,const SM_System& system) {
409 
410  tString routineName="SM_StochasticJs::open(s,system)";
411  CORE_Profiler::StartCallRoutine(routineName);
412 
413  tBoolean ok=true;
414 
415  //initialize the step index
416  mStepIndex=core_numeric::getInfinity<tIndex>();
417 
418 
419 
420  CORE_Profiler::EndCallRoutine(routineName);
421 
422  return ok;
423  }
424 
430  inline tBoolean store(const SM_System& system) {
431  tString routineName="SM_StochasticJs::store()";
432  CORE_Profiler::StartCallRoutine(routineName);
433 
434 
435  //compute the esperance at time t
436  if ((getIndex()==0) || (getRootIndex()==-1)) {
437  computeEsperanceContribution(system.getStepIndex(),system);
438  }
439  if (getIndex()==0) {
440  //print J for the connections of the particles 0
441  tIndex i,n=system.getNetwork().getNeighboringParticlesNumber(0);
442  const SM_LandauLifschitzSystem* lls=dynamic_cast<const SM_LandauLifschitzSystem*>(&system);
443 
444  if (mJsFile!=null) {
445  (*mJsFile)<<lls->getStochasticNoise()<<"\t"<<lls->getTime()<<"\t";
446  for (i=0;i<n;i++) {
447  (*mJsFile)<<lls->getNetwork().getConnectionValues()[i]<<"\t";
448  }
449  (*mJsFile)<<"\n";
450  }
451  }
452 
453  CORE_Profiler::EndCallRoutine(routineName);
454  return true;
455  }
456 
457 
458 
468  inline tBoolean close(const tIndex& s,const SM_System& system,const tBoolean& hasSucceeded) {
469  tBoolean ok=true;
470  tString routineName="SM_StochasticJs::close(s,system,hasSucceeded)";
471  CORE_Profiler::StartCallRoutine(routineName);
472  if (hasSucceeded) {
473  if ((getIndex()==0) || (getRootIndex()==-1)) {
474  //compute the esperance at last time
475  computeEsperanceContribution(system.getStepIndex(),system);
476  }
477  }
478 
479  CORE_Profiler::EndCallRoutine(routineName);
480  return ok;
481  }
482 
490  inline tBoolean close(const SM_Beam& beam) {
491  tString routineName="SM_StochasticJs::close(beam)";
492  CORE_Profiler::StartCallRoutine(routineName);
493 
494  if (getIndex()==0) {
495  //number of simulation of the beam
496  getPackedRawValues()[mNRawIndex]=beam.getBeamSize();
497 
499  registerStochasticOutput(getPackedRawValuesNumber(),getPackedRawValues());
500  if (mCTPackedFileName.length()>0) {
501  //\f$ E(\varepsilon)= \displaystyle \sqrt { \sum_{k=0}^{k=d-1} E_k(\bar mu_k(\varepsilon,T))^2
502  std::ofstream file(mCTPackedFileName.c_str(),std::ios::app);
503  //file<<"# raw values number:"<<getPackedRawValuesNumber()<<"\n";
504  //file<<"# raw values:";
505  //for(const auto& v:getPackedRawValues()) file<<"\t"<<v;
506  //file<<"\n";
507  flushStochasticOutput(file);
508  file.close();
509  }
510  }
511  if (mJsFile!=null) {
512  mJsFile->close();
513  mJsFile=null;
514  }
515  }
516  CORE_Profiler::EndCallRoutine(routineName);
517  return true;
518 
519  }
520 
521 
531  virtual void closePackedSimulations(const SM_Beam& beam,
532  const tIndex& rawValuesNumber,
533  const std::valarray<tReal>& rawValues) override {
534  tString routineName="SM_StochasticJs::closePackedSimulations(beam,nRaws,raws)";
535  CORE_Profiler::StartCallRoutine(routineName);
536 
537  if (getIndex()==0) {
538  registerStochasticOutput(getPackedRawValuesNumber(),getPackedRawValues());
539  if (mCTFileName.length()>0) {
540  std::ofstream file(mCTFileName,std::ios::out);
541  if (file) {
542  //file<<"#Closed Packed Simulations\n";
543  //file<<"# raw values number:" <<rawValuesNumber<<"\n";
544  //file<<"# raw values:";
545  //for(const auto& v:rawValues) file<<"\t"<<v;
546  //file<<"\n";
547  printHeader(file,beam);
548  flushStochasticOutput(file);
549  file.close();
550  }
551  }
552  }
553 
554  CORE_Profiler::EndCallRoutine(routineName);
555  }
556 
559  virtual tString toString() const override {
560  std::stringstream ret;
561  ret<<SuperClass::toString();
562  ret<<"\t JFunctionName:"<<mJFunctionName<<"\n";
563  return ret.str();
564  }
565 
566 
567 private:
568 
569  inline void computeEsperanceContribution(const tIndex& stepIndex,const SM_System& system) {
570 
571 
572  if (mStepIndex!=stepIndex) {
573  mStepIndex=stepIndex;
574  tReal sumJij=0;
575  tIndex nConnections=0;
576 
577  if ((getIndex()==0) || (getRootIndex()==-1)) {
578 
579  //compute barS=1/P \sum S(p)
580  //for OMP/MPIC version: barS=1/P sum(P) for p of the whole domain
581  //for MPI version : barS=1/P sum(P) for p of the whole domain
583 
584  //compute mean J
585  const std::valarray<tReal>& Js=system.getNetwork().getConnectionValues();
586  sumJij=0;
587  for(const auto& Jij:Js) sumJij+=Jij;
588  nConnections=Js.size();
589  system.sumOverNetworks(0,nConnections,1,&sumJij);
590  }
591 
592  if (getIndex()==0) {
593  //compute norm of the mean of S
594  mNormS=0;
595  for(const auto& Sk:mBarS) {
596  mNormS+=Sk*Sk;
597  }
598  mNormS=sqrt(mNormS);
599  //std::cout<<"|bar S|="<<mNormS<<"\n";
600 
601  //esperance contribution
602  std::valarray<tReal> &Es=getPackedRawValues();
603  //Es[0]+=mE;
604  Es[mESRawIndex]+=mNormS;
605 
606 
607  //mean of J
608  sumJij/=nConnections;
609  Es[mEJRawIndex]+=sumJij;
610 
611  //the s-th simulation has succeeded : mEs[k]+=\bar \mu_s[k]
613  //std::cout<<"stepIndex:"<<mStepIndex<<" nRawValues:"<<getPackedRawValuesNumber()<<"\n";
614  }
615  }
616  }
617 
618  inline void registerStochasticOutput(const tIndex& rawValuesNumber,
619  const std::valarray<tReal>& rawValues) {
620  std::valarray<tReal>& outputs=getOutputValues();
621  outputs[mMeanSIndex]=rawValues[mESRawIndex]/rawValuesNumber;//mean of |S|
622  outputs[mMeanJIndex]=rawValues[mEJRawIndex]/rawValuesNumber;//mean of |S|
623  outputs[mNSamplesIndex]=rawValuesNumber;
624  outputs[mNSimsIndex]=rawValues[mNRawIndex];//sum of simulations of packed simulations
625  }
626 
627 
628  inline void flushStochasticOutput(std::ofstream& file) {
629  std::valarray<tReal>& outputs=getOutputValues();
630  for(const auto v:outputs) {
631  file<<v<<"\t";
632  }
633  file<<"\n";
634  }
635 
636 
637 
638 
639 };
640 
641 #endif
virtual tMemSize getContentsMemorySize() const override
return the memory size of the included associations
Definition: CORE_Field.h:102
static tString GetAbsolutePath(const tString &path)
get the absolute path of the path
Definition: CORE_IO.h:365
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
static void EndCallRoutine(const tString &routineName)
end calling routine
Definition: CORE_Profiler.h:91
static void StartCallRoutine(const tString &routineName)
start calling routine
Definition: CORE_Profiler.h:61
static const tString & GetSoftName()
get soft name
Definition: CORE_Run.h:115
static const tString & GetVersion()
get the version
Definition: CORE_Run.h:129
This class defines a general stochastic beam of trajectories of system.
Definition: SM_Beam.h:61
const SM_System & getSystem() const
get the system
Definition: SM_Beam.h:264
virtual tString toString() const override
turn the class into a string representation
Definition: SM_Beam.h:315
const tIndex & getBeamSize() const
get the beam size
Definition: SM_Beam.h:166
static constexpr tReal K_B
Boltzmann constants : .
Definition: SM_Constants.h:44
const tUCInt & getCoordinationNumber() const
get the coodination number
Definition: SM_CrystalStructure.h:169
This class is a simulation of one trajectory class for Stoch Magnet package.
Definition: SM_LandauLifschitzSystem.h:59
const tReal & getTime() const
get the time
Definition: SM_LandauLifschitzSystem.h:214
This class describes a materials defined by state attributes:
Definition: SM_Material.h:61
const tReal & getExchangeEnergyFactor() const
get the exchange energy
Definition: SM_Material.h:316
const tReal & getSpinWaveMFCorrection() const
get the spin wave MF correction
Definition: SM_Material.h:340
const SM_CrystalStructure & getCrystalStructure() const
get the crystal structure
Definition: SM_Material.h:198
const std::valarray< tReal > & getConnectionValues() const
get the connection values for reading
Definition: SM_Network.h:558
tIndex getNeighboringParticlesNumber() const
get the number of connections
Definition: SM_Network.h:413
This class stores stochastic Curie temperature esperance for a dimension D.
Definition: SM_StochasticJs.h:34
tBoolean store(const SM_System &system)
store the stochastic data during the evolution method of the system
Definition: SM_StochasticJs.h:430
virtual void adimensionize(const SM_Material &material) override
adimensionize the output compoent with material characteristic
Definition: SM_StochasticJs.h:268
static CORE_UniquePointer< Self > New()
build a new instance of a stochastic data
Definition: SM_StochasticJs.h:170
SM_StochasticJs(void)
create
Definition: SM_StochasticJs.h:85
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_StochasticJs.h:154
SM_RealField & getEquilibriumState()
get the directions of spin at equilibrium
Definition: SM_StochasticJs.h:261
const SM_RealField & getEquilibriumState() const
get the directions of spin at equilibrium
Definition: SM_StochasticJs.h:256
tBoolean close(const SM_Beam &beam)
close stochastic data at the end of one packed simulations
Definition: SM_StochasticJs.h:490
void setJFunction(const tString &FName)
set J Function
Definition: SM_StochasticJs.h:199
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_StochasticJs.h:142
void setEquilibriumState(const SM_RealField &Seq)
set the directions of spin at equilibrium
Definition: SM_StochasticJs.h:251
void printHeader(std::ofstream &file, const SM_Beam &beam)
print he file header
Definition: SM_StochasticJs.h:275
static CORE_UniquePointer< Self > New(const Self &c)
build a new instance of a stochastic data
Definition: SM_StochasticJs.h:177
virtual tString toString() const override
return the string representation of the class
Definition: SM_StochasticJs.h:559
virtual void closePackedSimulations(const SM_Beam &beam, const tIndex &rawValuesNumber, const std::valarray< tReal > &rawValues) override
close stochastic data at the end of all packed simulations
Definition: SM_StochasticJs.h:531
const std::function< void(const tReal &, const tReal &,const tReal &, tReal &)> & getJFunction() const
get J function
Definition: SM_StochasticJs.h:244
tBoolean close(const tIndex &s, const SM_System &system, const tBoolean &hasSucceeded)
close the stochastic data for the simulation at index s
Definition: SM_StochasticJs.h:468
virtual ~SM_StochasticJs(void)
destroy
Definition: SM_StochasticJs.h:121
virtual void copy(const SM_StochasticOutputComponent &c) override
copy the stochastic data
Definition: SM_StochasticJs.h:188
tBoolean open(const tIndex &s, const SM_System &system)
open the stochastic data for simulation at index s
Definition: SM_StochasticJs.h:408
tBoolean open(const SM_Beam &beam)
open the stochastic data at the begininf of simulations
Definition: SM_StochasticJs.h:323
This class stores stochastic outpus computed for each trajectory of a simulation of trajectories of a...
Definition: SM_StochasticOutputComponent.h:36
const int & getRootIndex() const
get the root index of the output component
Definition: SM_StochasticOutputComponent.h:222
std::valarray< tReal > & getPackedRawValues()
get the packed raw values
Definition: SM_StochasticOutputComponent.h:301
void setOutputDescription(const std::vector< tString > &v)
et the output description
Definition: SM_StochasticOutputComponent.h:323
const tString & getPrefix() const
return the prefix
Definition: SM_StochasticOutputComponent.h:190
const tInteger & getPackedSimulationsIndex() const
get packed simulations index
Definition: SM_StochasticOutputComponent.h:257
const std::vector< tString > & getOutputDescription() const
get the string representation of the output values
Definition: SM_StochasticOutputComponent.h:316
virtual tString toString() const override
return the string representation of the class
Definition: SM_StochasticOutputComponent.h:398
const tIndex & getPackedRawValuesNumber() const
get the packed raw values number
Definition: SM_StochasticOutputComponent.h:286
const tBoolean & hasLogPerPackedSimulations() const
return true if the stochastic output has log per pack of simulations
Definition: SM_StochasticOutputComponent.h:274
const tInteger & getPackedSimulationsNumber() const
get packed simulations number
Definition: SM_StochasticOutputComponent.h:269
const std::valarray< tReal > & getOutputValues() const
get the output values of the stochastic output for reading
Definition: SM_StochasticOutputComponent.h:330
const int & getIndex() const
get the index of the output component
Definition: SM_StochasticOutputComponent.h:217
const tString & getOutputPath() const
return the output path
Definition: SM_StochasticOutputComponent.h:178
this class implements the virtual methods of its base class SM_StochasticOutputComponent with templat...
Definition: SM_StochasticOutput.h:24
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_StochasticOutput.h:84
virtual void copy(const SM_StochasticOutputComponent &c)
copy
Definition: SM_StochasticOutput.h:94
This class is a one simulation of a beam for Stoch Magnet package.
Definition: SM_System.h:53
const SM_Network & getNetwork() const
get the network
Definition: SM_System.h:170
void computeMagneticMomentDirectionsMeanOverNetworks(const int &rootNetwork, std::array< tReal, SM_Constants::DIM > &meanS) const
compute the mean over the domain of magneticmoment directions
Definition: SM_System.h:477
const SM_Material & getMaterial() const
get the material of the network
Definition: SM_System.h:193
virtual void sumOverNetworks(const int &rootNetwork, tIndex &n, const tIndex &nValues, tReal *values) const
sum the values of all network
Definition: SM_System.h:457
const tReal & getStochasticNoise() const
get the stochastic noise without dimension
Definition: SM_System.h:385
const tIndex & getStepIndex() const
get the step index
Definition: SM_System.h:415