You are here:
Concepts
>
Concepts Web
>
Class documentation
Class documentation of Concepts
Loading...
Searching...
No Matches
eigensolver
testsuite
constrained.hh
Go to the documentation of this file.
1
6
#ifndef testConstrained_hh
7
#define testConstrained_hh
8
9
#include "
basics/testcase.hh
"
10
#include "operator/sparseMatrix.hh"
11
#include "
toolbox/array.hh
"
12
13
using
concepts::Real
;
14
15
namespace
test
{
16
17
// ******************************************************** ConstrainedEVP **
18
28
class
ConstrainedEVP
:
public
TestCase
{
29
public
:
30
ConstrainedEVP
(uint dim, uint cdim, uint gdim, uint kmax) :
31
spc(dim), cspc(cdim), gspc(gdim),
32
a(0), b(spc, spc), c(spc, cspc), kmax_(kmax) {}
33
virtual
void
run
();
34
#ifdef HAS_ARPACK
36
void
testARPACKregularInv();
38
void
testARPACKshiftInv();
39
#endif
40
#ifdef HAS_JDBSym
42
void
testJDBSym();
43
#endif
45
void
testInexactInv
();
46
private
:
47
void
testResults(
const
concepts::Array<Real>
& res);
48
protected
:
49
concepts::DummySpace<Real>
spc, cspc, gspc;
50
std::unique_ptr<concepts::Operator<Real> > a;
51
concepts::SparseMatrix<Real>
b, c;
52
const
Real* exact_;
53
const
uint kmax_;
54
};
55
56
// ********************************************************** GolubExample **
57
86
class
GolubExample
:
public
ConstrainedEVP
{
87
public
:
89
GolubExample
();
90
virtual
~GolubExample
() {}
91
private
:
92
static
const
Real exact[4];
93
};
94
95
// ******************************************************* GolubExampleSum **
96
107
class
GolubExampleSum
:
public
ConstrainedEVP
{
108
public
:
110
GolubExampleSum
();
111
virtual
~GolubExampleSum
() {}
112
private
:
113
static
const
Real exact[4];
114
concepts::SparseMatrix<Real>
a1, a2;
115
};
116
117
// ************************************************ MaxwellTransmissionEVP **
118
122
class
MaxwellTransmissionEVP
:
public
ConstrainedEVP
{
123
public
:
125
MaxwellTransmissionEVP
();
126
virtual
~MaxwellTransmissionEVP
() {}
127
private
:
128
static
const
Real exact[20];
129
void
matlab_matrix_entry(
concepts::Matrix<Real>
& m,
130
uint i, uint j, Real entry);
131
};
132
133
}
// namespace test
134
135
#endif
// testConstrained_hh
array.hh
concepts::Array
Definition
array.hh:46
concepts::DummySpace
Definition
space.hh:373
concepts::Matrix
Definition
matrix.hh:39
concepts::SparseMatrix
Definition
sparseMatrix.hh:65
test::ConstrainedEVP
Definition
constrained.hh:28
test::ConstrainedEVP::testInexactInv
void testInexactInv()
Test with inexact inverse iteration.
test::ConstrainedEVP::run
virtual void run()
Runs the tests. Must be overwritten by the specialization.
test::GolubExampleSum
Definition
constrained.hh:107
test::GolubExampleSum::GolubExampleSum
GolubExampleSum()
Constructor. Sets up three matrices a, b and c.
test::GolubExample
Definition
constrained.hh:86
test::GolubExample::GolubExample
GolubExample()
Constructor. Sets up three matrices a, b and c.
test::MaxwellTransmissionEVP
Definition
constrained.hh:122
test::MaxwellTransmissionEVP::MaxwellTransmissionEVP
MaxwellTransmissionEVP()
Constructor. Sets up three matrices a, b and c.
test::TestCase
Definition
testcase.hh:92
concepts::Real
double Real
Definition
typedefs.hh:39
test
Definition
testcase.hh:66
testcase.hh
Generated on Wed Sep 13 2023 21:06:18 for Concepts by
1.9.8