C++ main module for emicrom Package  1.0
EMM_OperatorsTest.h
Go to the documentation of this file.
1 #ifndef EMM_OperatorsTest_H
2 #define EMM_OperatorsTest_H
3 
4 #include "EMM_Test.h"
5 
6 #include "EMM_Matter.h"
7 #include "EMM_RealField.h"
8 #include "EMM_Grid3D.h"
10 #include "EMM_MatterField.h"
11 
35 class EMM_OperatorsTest : public virtual EMM_Test {
36 
38  // ATTRIBUTES
39 
40 public:
41 
42 
43 private:
44 protected:
45  // METHODS
46 
47  // CONSTRUCTORS
48 
51  EMM_OperatorsTest(void);
52 
53 
54 
55  // DESTRUCTORS
56 
57 
60  virtual ~EMM_OperatorsTest(void);
61 
62 
63 
64 public:
67  inline static SP::EMM_OperatorsTest New() {
68  SP::EMM_OperatorsTest p(new EMM_OperatorsTest(),EMM_OperatorsTest::Delete());
69  p->setThis(p);
70  return p;
71  };
72 
73 
74 
79  virtual tBoolean test(const CORE_Run& runner,const map<tString,tString>& options) const;
80 
85  virtual tBoolean performanceTest(const CORE_Run& runner,const map<tString,tString>& options) const;
86 
87 
88 protected:
89 
90 
91 
92  // OPERATOR TESTS
93 
94 
95 
101  tReal testSelfAdjointness(const tUIndex& nCells,
102  const EMM_RealArray& sigma,
103  const EMM_MagneticExcitationOperator& op) const;
104 
111  tReal symmetricTest(const tBoolean& isSymmetric,
112  const tUIndex& nCells,
113  const EMM_RealArray& sigma,
114  const EMM_MagneticExcitationOperator& op) const;
115 
116 
119  tReal testEDerivatives(const EMM_RealArray& sigma,const tReal& cellVolume,
120  const tReal& h,const tReal& eps_dh,
121  EMM_RealField& M,const EMM_MagneticExcitationOperator& op) const;
122 
123 
126  tReal testHDerivatives(const EMM_RealArray& sigma,const tReal& cellVolume,
127  const tReal& h,const tReal& eps_dh,
128  EMM_RealField& M,const EMM_MagneticExcitationOperator& op) const;
129 
143  tBoolean genericOperatorTest(const SV::CORE_Object& args,
144  const map<tString,tString>& options,
145  const tString & opClassName,
146  const tString& outputPath,
147  const tReal& errMax,
148  const tReal& dh,const tReal& eps_dh,
149  const tReal& eps_rel,
150  const tBoolean& isSymmetric,
151  const tFlag& anisotropy) const;
152 
153 private:
154  template<class T>
155  static tReal compareDiscretizedData(const tUSInt& d,const tString& fn,const EMM_MagneticExcitationOperator& op,tUIndex& indexMax);
156 
157 
158 private:
159  //primary tests for operators
160  tBoolean magnetostrictionPrimaryTests(const CORE_Run& runner,const map<tString,tString>& options) const;
161  tBoolean demagnetizedPrimaryTests(const CORE_Run& runner,const map<tString,tString>& options) const;
162 
163  //generic tests for operators
170 
171 
172 
173 
174 };
175 
176 #include "EMM_OperatorsTest.hpp"
177 #endif
tBoolean demagnetizedOperatorTest() const
Definition: EMM_OperatorsTest.cpp:1558
tBoolean anisotropyOperatorTest() const
Definition: EMM_OperatorsTest.cpp:1496
tBoolean exchangeOperatorTest() const
Definition: EMM_OperatorsTest.cpp:1456
tReal testHDerivatives(const EMM_RealArray &sigma, const tReal &cellVolume, const tReal &h, const tReal &eps_dh, EMM_RealField &M, const EMM_MagneticExcitationOperator &op) const
verify that
Definition: EMM_OperatorsTest.cpp:548
This class is a Run class for Common package.
Definition: CORE_Run.h:38
virtual tBoolean performanceTest(const CORE_Run &runner, const map< tString, tString > &options) const
make the tests of performance
Definition: EMM_OperatorsTest.cpp:159
virtual tBoolean test(const CORE_Run &runner, const map< tString, tString > &options) const
make the test
Definition: EMM_OperatorsTest.cpp:30
This class is the operators test class for E-MicroM in grid3D domain.
Definition: EMM_OperatorsTest.h:35
tReal testSelfAdjointness(const tUIndex &nCells, const EMM_RealArray &sigma, const EMM_MagneticExcitationOperator &op) const
test the self adjointless of the field
Definition: EMM_OperatorsTest.cpp:350
#define tUSInt
Definition: types.h:28
tBoolean genericOperatorTest(const SV::CORE_Object &args, const map< tString, tString > &options, const tString &opClassName, const tString &outputPath, const tReal &errMax, const tReal &dh, const tReal &eps_dh, const tReal &eps_rel, const tBoolean &isSymmetric, const tFlag &anisotropy) const
make all the test batteris for operator
Definition: EMM_OperatorsTest.cpp:647
#define tBoolean
Definition: types.h:139
EMM_OperatorsTest(void)
create
Definition: EMM_OperatorsTest.cpp:20
tBoolean demagnetizedPrimaryTests(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: EMM_OperatorsTest.cpp:1553
This class is a test class for E-MicromM package.
Definition: EMM_Test.h:25
tBoolean magnetostrictionPrimaryTests(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: EMM_OperatorsTest.cpp:1598
tReal testEDerivatives(const EMM_RealArray &sigma, const tReal &cellVolume, const tReal &h, const tReal &eps_dh, EMM_RealField &M, const EMM_MagneticExcitationOperator &op) const
verify that
Definition: EMM_OperatorsTest.cpp:459
DEFINE_SPTR(EMM_OperatorsTest)
SP_OBJECT(EMM_OperatorsTest)
tBoolean zeemanOperatorTest() const
Definition: EMM_OperatorsTest.cpp:1430
static tReal compareDiscretizedData(const tUSInt &d, const tString &fn, const EMM_MagneticExcitationOperator &op, tUIndex &indexMax)
Definition: EMM_OperatorsTest.hpp:7
#define tUIndex
Definition: types.h:126
tReal symmetricTest(const tBoolean &isSymmetric, const tUIndex &nCells, const EMM_RealArray &sigma, const EMM_MagneticExcitationOperator &op) const
test the symmetry of the operator :
Definition: EMM_OperatorsTest.cpp:394
This class describes a real array.
Definition: EMM_RealArray.h:16
#define tString
Definition: types.h:135
virtual ~EMM_OperatorsTest(void)
destroy
Definition: EMM_OperatorsTest.cpp:23
tBoolean magnetostrictionOperatorTest() const
Definition: EMM_OperatorsTest.cpp:1604
static SP::EMM_OperatorsTest New()
create a test class
Definition: EMM_OperatorsTest.h:67
This class is an operator of a E-MicromM package wich compute a magnetic excitation operator...
Definition: EMM_MagneticExcitationOperator.h:15
This class describes a real field.
Definition: EMM_RealField.h:21
#define tReal
Definition: types.h:118
tBoolean staticMagneticTensorOperatorTest() const
Definition: EMM_OperatorsTest.cpp:1677
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141
#define tFlag
Definition: types.h:74