C++ main module for emicrom Package  1.0
MATH_SolverTest.h
Go to the documentation of this file.
1 #ifndef MATH_SolverTest_H
2 #define MATH_SolverTest_H
3 
4 #include "CORE_Test.h"
5 
6 #include "MATH_MorseMatrix.h"
7 #include "MATH_FullMatrix.h"
8 
9 class CORE_Run;
10 
19 class MATH_SolverTest : public CORE_Test{
20 
22  // ATTRIBUTES
23 
24 
25 public:
26 
27 
28 protected:
29  // METHODS
30 
31  // CONSTRUCTORS
32 
35  MATH_SolverTest(void);
36 
37 
38 
39  // DESTRUCTORS
40 
41 
44  virtual ~MATH_SolverTest(void);
45 
46 
47 
48 public:
51  inline static SP::MATH_SolverTest New() {
52  SP::MATH_SolverTest p(new MATH_SolverTest(),MATH_SolverTest::Delete());
53  p->setThis(p);
54  return p;
55  };
56 
57 
58 
59 
60 
66  virtual tBoolean test(const CORE_Run& runner,const map<tString,tString>& options) const;
67 
68 
69 
70 
71 private:
72 
73  //generate matrices
74 
75  SP::MATH_Matrix generateSymmetricElasticMatrix(const CORE_Run& runner) const;
76  SP::MATH_Matrix generateSymmetricFEMElasticMatrix(const CORE_Run& runner) const;
77  SP::MATH_Matrix generateVOGGR8x2x2ElasticMatrix(const CORE_Run& runner) const;
78  SP::MATH_Matrix generateMorseMatrix(const CORE_Run& runner,const tReal& a,const tReal& b) const;
79 
80  //generate Right Hand Side vectors
81  SP::MATH_Vector generateRHS(const CORE_Run& runner,const tUIndex& n) const;
82 
83  //save into file
84  void saveIntoFile(const tString& fileName,const MATH_FullMatrix& A) const;
85  void saveIntoFile(const tString& fileName,const MATH_Vector& V) const;
86 
87  //vector tests
88  tBoolean vectorTests(const CORE_Run& runner,const map<tString,tString>& options) const;
89 
90  //morse matrix test
91  tBoolean morseMatrixTests(const CORE_Run& runner,const map<tString,tString>& options) const;
92 
93  //general solver test
94  tBoolean solverTest(const CORE_Run& runner,const tString& solverName,MATH_Matrix& A,MATH_Vector& b) const;
95 
96  //CG solver test
97  tBoolean conjugateGradientMorseMatrixTests(const CORE_Run& runner,const map<tString,tString>& options) const;
98  tBoolean conjugateGradientGeneralMatrixTests(const CORE_Run& runner,const map<tString,tString>& options) const;
99  tBoolean conjugateGradientGeneralMatrixMaskedVectorTests(const CORE_Run& runner,const map<tString,tString>& options) const;
100 
101  tBoolean conjugateGradientElasticMatrixTest(const CORE_Run& runner,const map<tString,tString>& options) const;
102 
103  //CGS solver tests
104  tBoolean conjugateGradientSquaredSymmetricElasticMatrixTest(const CORE_Run& runner,const map<tString,tString>& options) const;
105  tBoolean conjugateGradientSquaredVOGGR8x2x2ElasticMatrixTest(const CORE_Run& runner,const map<tString,tString>& options) const;
106 
107  //BiCGStab solver tests
108  tBoolean biConjugateGradientStabilizedSymmetricElasticMatrixTest(const CORE_Run& runner,const map<tString,tString>& options) const;
109  tBoolean biConjugateGradientStabilizedVOGGR8x2x2ElasticMatrixTest(const CORE_Run& runner,const map<tString,tString>& options) const;
110 
111 
112 };
113 
114 #endif
tBoolean conjugateGradientSquaredVOGGR8x2x2ElasticMatrixTest(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: MATH_SolverTest.cpp:982
tBoolean conjugateGradientGeneralMatrixMaskedVectorTests(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: MATH_SolverTest.cpp:834
tBoolean solverTest(const CORE_Run &runner, const tString &solverName, MATH_Matrix &A, MATH_Vector &b) const
Definition: MATH_SolverTest.cpp:554
tBoolean biConjugateGradientStabilizedVOGGR8x2x2ElasticMatrixTest(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: MATH_SolverTest.cpp:1019
tBoolean conjugateGradientMorseMatrixTests(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: MATH_SolverTest.cpp:615
MATH_SolverTest(void)
create
Definition: MATH_SolverTest.cpp:14
static SP::MATH_SolverTest New()
create a test class
Definition: MATH_SolverTest.h:51
This class is a Run class for Common package.
Definition: CORE_Run.h:38
This class is a test class for the math solver package of E-MicroM code.
Definition: MATH_SolverTest.h:19
This class describes a general matrix interface used in solver.
Definition: MATH_Matrix.h:20
tBoolean morseMatrixTests(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: MATH_SolverTest.cpp:476
SP::MATH_Matrix generateSymmetricElasticMatrix(const CORE_Run &runner) const
Definition: MATH_SolverTest.cpp:235
DEFINE_SPTR(MATH_SolverTest)
virtual ~MATH_SolverTest(void)
destroy
Definition: MATH_SolverTest.cpp:17
SP::MATH_Vector generateRHS(const CORE_Run &runner, const tUIndex &n) const
Definition: MATH_SolverTest.cpp:358
#define tBoolean
Definition: types.h:139
SP_OBJECT(MATH_SolverTest)
tBoolean conjugateGradientSquaredSymmetricElasticMatrixTest(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: MATH_SolverTest.cpp:966
tBoolean biConjugateGradientStabilizedSymmetricElasticMatrixTest(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: MATH_SolverTest.cpp:1002
void saveIntoFile(const tString &fileName, const MATH_FullMatrix &A) const
Definition: MATH_SolverTest.cpp:396
virtual tBoolean test(const CORE_Run &runner, const map< tString, tString > &options) const
make the test
Definition: MATH_SolverTest.cpp:21
SP::MATH_Matrix generateVOGGR8x2x2ElasticMatrix(const CORE_Run &runner) const
Definition: MATH_SolverTest.cpp:298
tBoolean conjugateGradientElasticMatrixTest(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: MATH_SolverTest.cpp:949
This class describes a masked vector.
Definition: MATH_Vector.h:16
#define tUIndex
Definition: types.h:126
SP::MATH_Matrix generateSymmetricFEMElasticMatrix(const CORE_Run &runner) const
Definition: MATH_SolverTest.cpp:272
tBoolean conjugateGradientGeneralMatrixTests(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: MATH_SolverTest.cpp:719
This class impements the MATH_Matrix class thanks to CORE_RealArray data.
Definition: MATH_FullMatrix.h:19
#define tString
Definition: types.h:135
This class is a test class for common package.
Definition: CORE_Test.h:18
SP::MATH_Matrix generateMorseMatrix(const CORE_Run &runner, const tReal &a, const tReal &b) const
Definition: MATH_SolverTest.cpp:156
tBoolean vectorTests(const CORE_Run &runner, const map< tString, tString > &options) const
Definition: MATH_SolverTest.cpp:430
#define tReal
Definition: types.h:118
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141