C++ main module for stochmagnet Package  1.0
SM_Test.h
Go to the documentation of this file.
1 #ifndef SM_Test_H
2 #define SM_Test_H
3 
4 //base class header
5 #include "CORE_Test.h"
6 
7 //network heder
8 #include "SM_Network.h"
9 #include "SM_System.h"
10 #include "SM_Beam.h"
18 class SM_Test : public CORE_Test {
19 
20  //attributes
21 private :
22 
23 
24 
25 public:
26  // CONSTRUCTORS
29  SM_Test(void);
30 
31  // DESTRUCTORS
34  virtual ~SM_Test(void);
35 
36 
37 
38 public :
39  // CREATE class
40 
41 
42  //SET & GET methods
43 
44 
45 
46 
47 
48  // MAIN Method
49 
50 public:
51 
52 
53 
54 protected:
58  virtual void getSearchingPaths(std::vector<tString>& vpaths) const override {
59  CORE_Test::getSearchingPaths("stochmagnet",5,{"","default","cases"},vpaths);
60  }
61 
67  virtual tBoolean primaryTests(const CORE_Run& runner,
68  const std::map<tString,tString>& options) const override;
69 
75  virtual tBoolean elementaryTests(const CORE_Run& runner,
76  const std::map<tString,tString>& options) const override;
77 
83  virtual tBoolean caseTests(const CORE_Run& runner,const std::map<tString,tString>& options) const override;
84 
85 private:
91  tBoolean testNormalLaw(const CORE_Run& runner,
92  const std::map<tString,tString>& options) const;
93 
99  tBoolean testField(const CORE_Run& runner,
100  const std::map<tString,tString>& options) const;
101 
107  tBoolean testVirtualMethods(const CORE_Run& runner,const std::map<tString,tString>& options) const;
108 
114  tBoolean testOperators(const CORE_Run& runner,const std::map<tString,tString>& options) const;
115 
123  const tIndex& Nx,
124  const tIndex& Ny,
125  const tIndex& Nz) const;
126 
127 
142  const std::array<tReal,3>& Mu0,
143  const tBoolean& hasZeeman,
144  const tReal& J,const tBoolean& hasSelfInteraction,
145  const tIndex& n, const tReal& h,
146  const tString& system,const tString& noise,const tReal& T,const tReal& dt) const;
158  const tIndex& Nx,const tIndex& Ny,const tIndex& Nz,const tReal& J,const tBoolean& hasSelfInteraction,
159  const tString& systemName,const tString& noiseName) const;
160 
161 
170  tBoolean validate(const CORE_Run& runner,
171  const tString& path,const tString& prefix,
172  const SM_Beam& beam,const tIndex& s) const;
173 
183  tBoolean testDerivative(const tIndex& i,const tDimension& d,
184  const SM_Network& network,SM_RealField& Mu,const SM_Operator& op,SM_RealField& H) const;
185 
186 
187 };
188 
189 
190 #endif
tUCInt tDimension
Definition: CORE_StdPtrField.h:567
This class is an outpput results generator for stoch magnet program.
Definition: CORE_Run.h:36
This class is a Test class for Stoch Microm package.
Definition: CORE_Test.h:44
virtual void getSearchingPaths(std::vector< tString > &vpaths) const
get the test path locations
Definition: CORE_Test.h:160
This class is a simulation of a beam of trajectories class for Stoch Microm package.
Definition: SM_Beam.h:46
This class is describes a a network.
Definition: SM_Network.h:18
This class is describes an operator.
Definition: SM_Operator.h:18
Definition: SM_Test.h:18
virtual tBoolean elementaryTests(const CORE_Run &runner, const std::map< tString, tString > &options) const override
execute the elementary tests
Definition: SM_Test.cpp:461
virtual tBoolean primaryTests(const CORE_Run &runner, const std::map< tString, tString > &options) const override
execute the primary tests
Definition: SM_Test.cpp:48
virtual void getSearchingPaths(std::vector< tString > &vpaths) const override
get the test path locations
Definition: SM_Test.h:58
SM_Test(void)
create the class
Definition: SM_Test.cpp:33
tBoolean testVirtualMethods(const CORE_Run &runner, const std::map< tString, tString > &options) const
test the efficiency of the templated method vs virtual method
Definition: SM_Test.cpp:165
tBoolean linedParticlesTestCase(const CORE_Run &runner, const std::array< tReal, 3 > &Mu0, const tBoolean &hasZeeman, const tReal &J, const tBoolean &hasSelfInteraction, const tIndex &n, const tReal &h, const tString &system, const tString &noise, const tReal &T, const tReal &dt) const
test n particles on a 3D- line with system & noise function
Definition: SM_Test.cpp:553
virtual ~SM_Test(void)
destroy the class
Definition: SM_Test.cpp:37
tBoolean grid3DParticlesTestCase(const CORE_Run &runner, const tIndex &Nx, const tIndex &Ny, const tIndex &Nz, const tReal &J, const tBoolean &hasSelfInteraction, const tString &systemName, const tString &noiseName) const
test Nx x Ny x Nz particles on a 3D-grid with system & noise function
Definition: SM_Test.cpp:760
virtual tBoolean caseTests(const CORE_Run &runner, const std::map< tString, tString > &options) const override
execute the case tests
Definition: SM_Test.cpp:1017
tBoolean testEnergyOperatorsDerivatives(SM_Beam &beam, const tIndex &Nx, const tIndex &Ny, const tIndex &Nz) const
test the Energy & H relations with the formulat dE/dmu=_H on a grid of size Nx x Ny x Nz
Definition: SM_Test.cpp:393
tBoolean testDerivative(const tIndex &i, const tDimension &d, const SM_Network &network, SM_RealField &Mu, const SM_Operator &op, SM_RealField &H) const
test derivative of the operator at particle i in the direction d on the network at Mu
Definition: SM_Test.cpp:234
tBoolean validate(const CORE_Run &runner, const tString &path, const tString &prefix, const SM_Beam &beam, const tIndex &s) const
validate the s-trajectory of the beam simulations
Definition: SM_Test.cpp:936
tBoolean testOperators(const CORE_Run &runner, const std::map< tString, tString > &options) const
test the oparator by appling the formule dE/dM=-H
Definition: SM_Test.cpp:301
tBoolean testField(const CORE_Run &runner, const std::map< tString, tString > &options) const
test the field
Definition: SM_Test.cpp:145
tBoolean testNormalLaw(const CORE_Run &runner, const std::map< tString, tString > &options) const
test the normal law
Definition: SM_Test.cpp:84
#define tIndex
Definition: types.h:157
#define tString
Definition: types.h:147
#define tBoolean
Definition: types.h:151
#define tReal
Definition: types.h:137