cgTest.hh

Go to the documentation of this file.
1 
7 #ifndef cgTest_hh
8 #define cgTest_hh
9 
10 #include "basics/testcase.hh"
11 #include "space/space.hh"
12 
13 using concepts::Real;
14 
15 namespace test {
16 
21  class CgTest : public TestCase {
22  public:
23  CgTest() : spc(5) {}
24  virtual ~CgTest() {}
25  virtual void run();
26 
28 
32  Real res[5]);
36  Real res[5]);
38  private:
40  };
41 
42 } // namespace test
43 
44 #endif // cgTest_hh
Base class for tests.
Definition: testcase.hh:92
virtual void run()
Runs the tests. Must be overwritten by the specialization.
void testNormal(concepts::Matrix< Real > &m, concepts::Vector< Real > &rhs, Real res[5])
Without preconditioning.
Test the iterative solver CG.
Definition: cgTest.hh:21
Unit tests.
Definition: testcase.hh:66
virtual ~CgTest()
Definition: cgTest.hh:24
void testPrecond(concepts::Matrix< Real > &m, concepts::Vector< Real > &rhs, Real res[5])
With diagonal preconditioner.
concepts::DummySpace< concepts::Real > spc
Without preconditioning.
Definition: cgTest.hh:39
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich