|
Thyra Package Browser (Single Doxygen Collection) Version of the Day
|
Unit testing class for a MultiVectorBase object.
More...
#include <Thyra_MultiVectorTester_decl.hpp>

Public Types | |
| typedef Teuchos::ScalarTraits < Scalar >::magnitudeType | ScalarMag |
| Local typedef for scalar magnitude. | |
Public Member Functions | |
| LinearOpTester< Scalar > & | linearOpTester () |
Expose a non-const reference to the LinearOpTester object used to test the LinearOpBase interface supported by MultiVectorBase. | |
| const LinearOpTester< Scalar > & | linearOpTester () const |
Expose a const reference to the LinearOpTester object used to test the LinearOpBase interface supported by MultiVectorBase. | |
| void | warning_tol (const ScalarMag &warning_tol) |
| Set the tolerance above which a relative error will generate a warning message. | |
| ScalarMag | warning_tol () const |
Return the warning tolerance for *this. | |
| void | error_tol (const ScalarMag &error_tol) |
| Set the error above which a relative error will generate a an message and cause the test to fail. | |
| ScalarMag | error_tol () const |
Return the error tolerance for *this. | |
| void | num_random_vectors (const int num_random_vectors) |
| Set the number random vectors that is generated during each test. | |
| int | num_random_vectors () const |
Return the number of random vectors used for *this objects tests. | |
| void | show_all_tests (const bool show_all_tests) |
| Set whether all of the tests will be printed independent if they pass or fail. | |
| bool | show_all_tests () const |
Return the number of random vectors used for *this objects tests. | |
| void | dump_all (const bool dump_all) |
| Set whether all of the vectors and multi-vectors will be dumped or not. | |
| bool | dump_all () const |
Return the number of random vectors used for *this objects tests. | |
| MultiVectorTester (const ScalarMag warning_tol=1e-13, const ScalarMag error_tol=1e-10, const int num_random_vectors=1, const bool show_all_tests=false, const bool dump_all=false) | |
| Default constructor which sets default parameter values. | |
| bool | checkMultiVector (const VectorSpaceBase< Scalar > &vs, const Ptr< Teuchos::FancyOStream > &out) const |
| Check a multi-vector as created by a VectorSpaceBase object. | |
| bool | check (const MultiVectorBase< Scalar > &mv, const Ptr< Teuchos::FancyOStream > &out) const |
| Check a multi-vector object in a set of comprehensive teats. | |
Private Attributes | |
| LinearOpTester< Scalar > | linearOpTester_ |
| ScalarMag | warning_tol_ |
| ScalarMag | error_tol_ |
| int | num_random_vectors_ |
| bool | show_all_tests_ |
| bool | dump_all_ |
Depreicated. | |
| THYRA_DEPRECATED bool | check (const MultiVectorBase< Scalar > &mv, Teuchos::FancyOStream *out) const |
| Deprecated. | |
Unit testing class for a MultiVectorBase object.
ToDo: Finish documentation!
Definition at line 47 of file Thyra_MultiVectorTester_decl.hpp.
| typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Thyra::MultiVectorTester< Scalar >::ScalarMag |
Local typedef for scalar magnitude.
Definition at line 51 of file Thyra_MultiVectorTester_decl.hpp.
| Thyra::MultiVectorTester< Scalar >::MultiVectorTester | ( | const ScalarMag | warning_tol = 1e-13, |
| const ScalarMag | error_tol = 1e-10, |
||
| const int | num_random_vectors = 1, |
||
| const bool | show_all_tests = false, |
||
| const bool | dump_all = false |
||
| ) |
Default constructor which sets default parameter values.
Note: It is not recommended that the client pass in values in this constructor since the argument list may change in the near future but instead use the above set functions to change an option after construction.
Postconditions:
this->warning_tol() == warning_tol this->error_tol() == error_tol this->num_random_vectors() == num_random_vectors this->show_all_tests() == show_all_tests this->dump_all() == dump_all this->linearOpTester().set_all_warning_tol(warning_tol) this->linearOpTester().set_all_error_tol(error_tol) this->linearOpTester().num_random_vectors(num_random_vectors) this->linearOpTester().show_all_tests(show_all_tests) this->linearOpTester().dump_all(dump_all) Definition at line 44 of file Thyra_MultiVectorTester_def.hpp.
| LinearOpTester< Scalar > & Thyra::MultiVectorTester< Scalar >::linearOpTester | ( | ) | [inline] |
Expose a non-const reference to the LinearOpTester object used to test the LinearOpBase interface supported by MultiVectorBase.
Clients can use this interface to override options directly set on *this.
Definition at line 227 of file Thyra_MultiVectorTester_decl.hpp.
| const LinearOpTester< Scalar > & Thyra::MultiVectorTester< Scalar >::linearOpTester | ( | ) | const [inline] |
Expose a const reference to the LinearOpTester object used to test the LinearOpBase interface supported by MultiVectorBase.
Clients can use this interface to query (but not change) options.
Definition at line 235 of file Thyra_MultiVectorTester_decl.hpp.
| void Thyra::MultiVectorTester< Scalar >::warning_tol | ( | const ScalarMag & | warning_tol | ) | [inline] |
Set the tolerance above which a relative error will generate a warning message.
Also calls this->linearOpTester().set_all_warning_tol(warning_tol).
Definition at line 243 of file Thyra_MultiVectorTester_decl.hpp.
| MultiVectorTester< Scalar >::ScalarMag Thyra::MultiVectorTester< Scalar >::warning_tol | ( | ) | const [inline] |
Return the warning tolerance for *this.
Definition at line 253 of file Thyra_MultiVectorTester_decl.hpp.
| void Thyra::MultiVectorTester< Scalar >::error_tol | ( | const ScalarMag & | error_tol | ) | [inline] |
Set the error above which a relative error will generate a an message and cause the test to fail.
Also calls this->linearOpTester().set_all_error_tol(error_tol).
Definition at line 261 of file Thyra_MultiVectorTester_decl.hpp.
| MultiVectorTester< Scalar >::ScalarMag Thyra::MultiVectorTester< Scalar >::error_tol | ( | ) | const [inline] |
Return the error tolerance for *this.
Definition at line 271 of file Thyra_MultiVectorTester_decl.hpp.
| void Thyra::MultiVectorTester< Scalar >::num_random_vectors | ( | const int | num_random_vectors | ) | [inline] |
Set the number random vectors that is generated during each test.
Also calls this->linearOpTester().num_random_vectors(num_random_vectors).
Definition at line 279 of file Thyra_MultiVectorTester_decl.hpp.
| int Thyra::MultiVectorTester< Scalar >::num_random_vectors | ( | ) | const [inline] |
Return the number of random vectors used for *this objects tests.
Definition at line 288 of file Thyra_MultiVectorTester_decl.hpp.
| void Thyra::MultiVectorTester< Scalar >::show_all_tests | ( | const bool | show_all_tests | ) | [inline] |
Set whether all of the tests will be printed independent if they pass or fail.
Also calls this->linearOpTester().show_all_tests(show_all_tests).
Definition at line 296 of file Thyra_MultiVectorTester_decl.hpp.
| bool Thyra::MultiVectorTester< Scalar >::show_all_tests | ( | ) | const [inline] |
Return the number of random vectors used for *this objects tests.
Definition at line 305 of file Thyra_MultiVectorTester_decl.hpp.
| void Thyra::MultiVectorTester< Scalar >::dump_all | ( | const bool | dump_all | ) | [inline] |
Set whether all of the vectors and multi-vectors will be dumped or not.
Also calls this->linearOpTester().dump_all(dump_all).
Definition at line 313 of file Thyra_MultiVectorTester_decl.hpp.
| bool Thyra::MultiVectorTester< Scalar >::dump_all | ( | ) | const [inline] |
Return the number of random vectors used for *this objects tests.
Definition at line 322 of file Thyra_MultiVectorTester_decl.hpp.
| bool Thyra::MultiVectorTester< Scalar >::checkMultiVector | ( | const VectorSpaceBase< Scalar > & | vs, |
| const Ptr< Teuchos::FancyOStream > & | out | ||
| ) | const |
Check a multi-vector as created by a VectorSpaceBase object.
Definition at line 60 of file Thyra_MultiVectorTester_def.hpp.
References Thyra::VectorSpaceBase< Scalar >::dim().
| bool Thyra::MultiVectorTester< Scalar >::check | ( | const MultiVectorBase< Scalar > & | mv, |
| const Ptr< Teuchos::FancyOStream > & | out | ||
| ) | const |
Check a multi-vector object in a set of comprehensive teats.
| mv | [in] The multi-vector object to test. |
| out | [in/out] If out != NULL then output will be sent to *out. |
The behavior of this function greatly depends on a number of options (see MultiVectorTester() for the default values for these options):
print_all_tests(bool): If print_all_tests() == true, then some output will be sent to *out for every test performed. This is useful to see all of tests that are performed and in debugging. dump_all(bool): If dump_all() == true, then all of the vectors will be printed that are created during the tests. This option is really only needed during initial debugging and should only be used with small vector spaces since it will produce a lot of O(space.dim()) output. num_random_tests(int): This is the number of random tests to perform per category of test. A higher number will result is better validation but will consume more CPU time. warning_tol(ScalarMag): Any test with a relative error greater than warning_tol() will result in a warning message printed to *out but will not result in a filed test. error_tol(Scalar): Any test with a relative error greater than error_tol() will result in an error message printed to *out and will result in a failed test. true if all of the tests where within the error_tol() and returns false if not.The best way to see what this testing function is doing is to run the test with out!=NULL and to look at the implementation by clicking on the following link to the source code:
Definition at line 170 of file Thyra_MultiVectorTester_def.hpp.
Referenced by Thyra::MultiVectorTester< Scalar >::check().
| THYRA_DEPRECATED bool Thyra::MultiVectorTester< Scalar >::check | ( | const MultiVectorBase< Scalar > & | mv, |
| Teuchos::FancyOStream * | out | ||
| ) | const [inline] |
Deprecated.
Definition at line 197 of file Thyra_MultiVectorTester_decl.hpp.
References Thyra::MultiVectorTester< Scalar >::check().
LinearOpTester<Scalar> Thyra::MultiVectorTester< Scalar >::linearOpTester_ [private] |
Definition at line 210 of file Thyra_MultiVectorTester_decl.hpp.
ScalarMag Thyra::MultiVectorTester< Scalar >::warning_tol_ [private] |
Definition at line 212 of file Thyra_MultiVectorTester_decl.hpp.
ScalarMag Thyra::MultiVectorTester< Scalar >::error_tol_ [private] |
Definition at line 213 of file Thyra_MultiVectorTester_decl.hpp.
int Thyra::MultiVectorTester< Scalar >::num_random_vectors_ [private] |
Definition at line 214 of file Thyra_MultiVectorTester_decl.hpp.
bool Thyra::MultiVectorTester< Scalar >::show_all_tests_ [private] |
Definition at line 215 of file Thyra_MultiVectorTester_decl.hpp.
bool Thyra::MultiVectorTester< Scalar >::dump_all_ [private] |
Definition at line 216 of file Thyra_MultiVectorTester_decl.hpp.
1.7.4