Tests the solving with domain decomposition. More...
#include <domainDecompTest.hh>


Public Member Functions | |
| void | _succeed () |
| Explicitly succeds a test. | |
| DomainDecomp (uint g=0, bool m=false, bool i=false, bool d=false) | |
| Constructor. | |
| long | getNumFailed () const |
| Returns number of failed tests. | |
| long | getNumPassed () const |
| Returns number of passed tests. | |
| const ostream * | getStream () const |
| Returns output stream. | |
| long | report () const |
| Prints a report on the number of passed and failed tests to the output stream. | |
| virtual void | reset () |
| Resets the counters for the failed and passed tests. | |
| virtual void | run () |
| Runs the tests. Must be overwritten by the specialization. | |
| void | setStream (ostream *osptr) |
| Sets the output stream. | |
| virtual | ~DomainDecomp () |
Test routines | |
| void | testCG () |
| Tests the solving with CG. | |
| void | testSuperLU () |
| Tests the solving with SuperLU. | |
| void | solve (concepts::SolverFabric< Real > &fabricI, concepts::SolverFabric< Real > &fabricB, bool explSchur) |
| Solve one system and compares with solution of direct inversionxb. | |
Protected Member Functions | |
| void | do_fail (const string &lbl, const char *fname, long lineno) |
| Internal function to report a failed test (besides increasing the failed counter) | |
| bool | do_numtest (double num, double orig, const string &lbl, const string &lbl2, const char *fname, long lineno, const double tol=1e-10) |
| Internal function to do a numerical test. | |
| bool | do_numtest (std::complex< double > num, std::complex< double > orig, const string &lbl, const string &lbl2, const char *fname, long lineno, const double tol=1e-10) |
| bool | do_test (bool cond, const string &lbl, const char *fname, long lineno) |
| Internal function to do a test. | |
Private Attributes | |
| bool | d_ |
| concepts::Sequence < concepts::Set< uint > > | domains_ |
| Set of domain attributes. | |
| bool | i_ |
| Flag for using iterative or direct solver. | |
| concepts::Sequence < concepts::SparseMatrix< Real > * > | M_ |
| Mass matrix for each domain. | |
| concepts::Import2dMesh | msh_ |
| Mesh. | |
| hp2D::hpFull | prebuild_ |
| Space Prebuilder. | |
| std::auto_ptr < concepts::Vector< Real > > | rhs_ |
| Vector of right hand side. | |
| std::auto_ptr < concepts::DomainDecomp < hp2D::hpAdaptiveSpaceH1 > > | spc_ |
| Space. | |
Tests the solving with domain decomposition.
Definition at line 26 of file domainDecompTest.hh.
| test::DomainDecomp::DomainDecomp | ( | uint | g = 0, |
| bool | m = false, |
||
| bool | i = false, |
||
| bool | d = false |
||
| ) |
Constructor.
| g | number geometrical refinements |
| m | true: matrices are stored in a Matlab file |
| i | true: use iterative solver |
| d | true: use direct solver |
| virtual test::DomainDecomp::~DomainDecomp | ( | ) | [inline, virtual] |
Definition at line 36 of file domainDecompTest.hh.
| void test::TestCase::_succeed | ( | ) | [inline, inherited] |
Explicitly succeds a test.
Definition at line 109 of file testcase.hh.
| void test::TestCase::do_fail | ( | const string & | lbl, |
| const char * | fname, | ||
| long | lineno | ||
| ) | [protected, inherited] |
Internal function to report a failed test (besides increasing the failed counter)
| bool test::TestCase::do_numtest | ( | std::complex< double > | num, |
| std::complex< double > | orig, | ||
| const string & | lbl, | ||
| const string & | lbl2, | ||
| const char * | fname, | ||
| long | lineno, | ||
| const double | tol = 1e-10 |
||
| ) | [protected, inherited] |
| bool test::TestCase::do_numtest | ( | double | num, |
| double | orig, | ||
| const string & | lbl, | ||
| const string & | lbl2, | ||
| const char * | fname, | ||
| long | lineno, | ||
| const double | tol = 1e-10 |
||
| ) | [protected, inherited] |
Internal function to do a numerical test.
| bool test::TestCase::do_test | ( | bool | cond, |
| const string & | lbl, | ||
| const char * | fname, | ||
| long | lineno | ||
| ) | [protected, inherited] |
Internal function to do a test.
| long test::TestCase::getNumFailed | ( | ) | const [inline, inherited] |
Returns number of failed tests.
Definition at line 102 of file testcase.hh.
| long test::TestCase::getNumPassed | ( | ) | const [inline, inherited] |
Returns number of passed tests.
Definition at line 100 of file testcase.hh.
| const ostream* test::TestCase::getStream | ( | ) | const [inline, inherited] |
Returns output stream.
Definition at line 104 of file testcase.hh.
| long test::TestCase::report | ( | ) | const [inherited] |
Prints a report on the number of passed and failed tests to the output stream.
| virtual void test::TestCase::reset | ( | ) | [inline, virtual, inherited] |
Resets the counters for the failed and passed tests.
Definition at line 116 of file testcase.hh.
| virtual void test::DomainDecomp::run | ( | ) | [virtual] |
Runs the tests. Must be overwritten by the specialization.
Implements test::TestCase.
| void test::TestCase::setStream | ( | ostream * | osptr | ) | [inline, inherited] |
Sets the output stream.
Definition at line 106 of file testcase.hh.
| void test::DomainDecomp::solve | ( | concepts::SolverFabric< Real > & | fabricI, |
| concepts::SolverFabric< Real > & | fabricB, | ||
| bool | explSchur | ||
| ) |
Solve one system and compares with solution of direct inversionxb.
| void test::DomainDecomp::testCG | ( | ) |
Tests the solving with CG.
The Schur complement is taken as operator.
| void test::DomainDecomp::testSuperLU | ( | ) |
Tests the solving with SuperLU.
The Schur complement is calculated explicitly.
bool test::DomainDecomp::d_ [private] |
Definition at line 56 of file domainDecompTest.hh.
concepts::Sequence<concepts::Set<uint> > test::DomainDecomp::domains_ [private] |
Set of domain attributes.
Definition at line 62 of file domainDecompTest.hh.
bool test::DomainDecomp::i_ [private] |
Flag for using iterative or direct solver.
Definition at line 56 of file domainDecompTest.hh.
concepts::Sequence<concepts::SparseMatrix<Real>*> test::DomainDecomp::M_ [private] |
Mass matrix for each domain.
Definition at line 66 of file domainDecompTest.hh.
Mesh.
Definition at line 58 of file domainDecompTest.hh.
hp2D::hpFull test::DomainDecomp::prebuild_ [private] |
Space Prebuilder.
Definition at line 60 of file domainDecompTest.hh.
std::auto_ptr<concepts::Vector<Real> > test::DomainDecomp::rhs_ [private] |
Vector of right hand side.
Definition at line 68 of file domainDecompTest.hh.
std::auto_ptr<concepts::DomainDecomp<hp2D::hpAdaptiveSpaceH1> > test::DomainDecomp::spc_ [private] |
Space.
Definition at line 64 of file domainDecompTest.hh.