Numerical C++ Library Concepts
TWiki Guest (guest)
Logout
Numerical C++ Library Concepts
IT Services
ISG Blog
IntraMATH
Contact
Login
Keyword or person
News
About us
People
People
Publications
Gallery
Applications
Installation
How to get started
Tutorials
Class documentation
ETH Zurich
D-MATH
wiki@math
Concepts
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
29
void
testNormal
(
concepts::Matrix<Real>
& m,
31
concepts::Vector<Real>
& rhs,
32
Real
res[5]);
34
void
testPrecond
(
concepts::Matrix<Real>
& m,
35
concepts::Vector<Real>
& rhs,
36
Real
res[5]);
38
private
:
39
concepts::DummySpace<concepts::Real>
spc
;
40
};
41
42
}
// namespace test
43
44
#endif // cgTest_hh
test::TestCase
Base class for tests.
Definition:
testcase.hh:92
test::CgTest::run
virtual void run()
Runs the tests. Must be overwritten by the specialization.
test::CgTest::testNormal
void testNormal(concepts::Matrix< Real > &m, concepts::Vector< Real > &rhs, Real res[5])
Without preconditioning.
testcase.hh
test::CgTest
Test the iterative solver CG.
Definition:
cgTest.hh:21
test
Unit tests.
Definition:
testcase.hh:66
test::CgTest::CgTest
CgTest()
Definition:
cgTest.hh:23
test::CgTest::~CgTest
virtual ~CgTest()
Definition:
cgTest.hh:24
concepts::Matrix< Real >
test::CgTest::testPrecond
void testPrecond(concepts::Matrix< Real > &m, concepts::Vector< Real > &rhs, Real res[5])
With diagonal preconditioner.
test::CgTest::spc
concepts::DummySpace< concepts::Real > spc
Without preconditioning.
Definition:
cgTest.hh:39
concepts::Vector< Real >
concepts::DummySpace< concepts::Real >
space.hh
concepts::Real
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