LinearOpBase.
More...
#include <Thyra_LinearOpTesterDecl.hpp>
Inheritance diagram for Thyra::LinearOpTester< RangeScalar, DomainScalar >:
Public Types | |
| typedef Teuchos::PromotionTraits< RangeScalar, DomainScalar >::promote | Scalar |
| Local typedef for promoted scalar type . | |
| typedef Teuchos::ScalarTraits< Scalar >::magnitudeType | ScalarMag |
| Local typedef for promoted scalar magnitude. | |
Public Member Functions | |
| LinearOpTester (const bool check_linear_properties=true, const ScalarMag linear_properties_warning_tol=1e-13, const ScalarMag linear_properties_error_tol=1e-10, const bool check_adjoint=true, const ScalarMag adjoint_warning_tol=1e-13, const ScalarMag adjoint_error_tol=1e-10, const bool check_for_symmetry=false, const ScalarMag symmetry_warning_tol=1e-13, const ScalarMag symmetry_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. | |
| void | check_linear_properties (const bool &check_linear_properties) |
Set if to check for linear properties alpha*op*(x + y) == op(alpha*x) + op(alpha*y). | |
| void | linear_properties_warning_tol (const ScalarMag &linear_properties_warning_tol) |
| Set the tolerance above which a relative error will generate a warning message for the check of the linear properties. | |
| void | linear_properties_error_tol (const ScalarMag &linear_properties_error_tol) |
| Set the tolerance above which a relative error will generate a error message and result in test failure for the check of the linear properties. | |
| void | check_adjoint (const bool &check_adjoint) |
Set if to check for adjoint property x'*(op*y) == y'*(op'*x) if adjoint is supported. | |
| void | adjoint_warning_tol (const ScalarMag &adjoint_warning_tol) |
| Set the tolerance above which a relative error will generate a warning message for the check of the adjoint. | |
| void | adjoint_error_tol (const ScalarMag &adjoint_error_tol) |
| Set the tolerance above which a relative error will generate a error message and result in test failure for the check of the adjoint. | |
| void | check_for_symmetry (const bool &check_for_symmetry) |
Set if to check for symmetry property x'*(op*y) == y'*(op*x) for symmetric operators. | |
| void | symmetry_warning_tol (const ScalarMag &symmetry_warning_tol) |
| Set the tolerance above which a relative error will generate a warning message for the check of symmetry. | |
| void | symmetry_error_tol (const ScalarMag &symmetry_error_tol) |
| Set the tolerance above which a relative error will generate a error message and result in test failure for the check of symmetry. | |
| void | num_random_vectors (const int &num_random_vectors) |
| Set the number random vectors that is generated during each test. | |
| void | show_all_tests (const bool &show_all_tests) |
| Set if all tests are shown or just summaries. | |
| void | dump_all (const bool &dump_all) |
Set if all of the vectors are dumped or not (only relevant if show_all_tests()==true). | |
| void | set_all_warning_tol (const ScalarMag warning_tol) |
| Set all the warning tolerances to the same value. | |
| void | set_all_error_tol (const ScalarMag error_tol) |
| Set all the error tolerances to the same value. | |
| bool | check (const LinearOpBase< RangeScalar, DomainScalar > &op, MultiVectorRandomizerBase< RangeScalar > *rangeRandomizer, MultiVectorRandomizerBase< DomainScalar > *domainRandomizer, std::ostream *out, const std::string &leadingIndent="", const std::string &indentSpacer=" ") const |
| Check a linear operator. | |
| bool | check (const LinearOpBase< RangeScalar, DomainScalar > &op, std::ostream *out, const std::string &leadingIndent="", const std::string &indentSpacer=" ") const |
Calls this->check(op,NULL,NULL,out,leadingIndent,indentSpacer). | |
| bool | compare (const LinearOpBase< RangeScalar, DomainScalar > &op1, const LinearOpBase< RangeScalar, DomainScalar > &op2, MultiVectorRandomizerBase< DomainScalar > *domainRandomizer, std::ostream *out, const std::string &leadingIndent="", const std::string &indentSpacer=" ") const |
| Check if two linear operators are the same or not. | |
| bool | compare (const LinearOpBase< RangeScalar, DomainScalar > &op1, const LinearOpBase< RangeScalar, DomainScalar > &op2, std::ostream *out, const std::string &leadingIndent="", const std::string &indentSpacer=" ") const |
Calls this->compare(op1,op2,NULL,out,leadingIndent,indentSpacer). | |
LinearOpBase.
This testing class performs many different tests just given a LinearOpBase object using the function check().
This testing class also can check if two linear operators are the same using random vectors by using the function compare().
ToDo: Finish documentation!
The default compiler-generated copy constructor and assignment operators are allowed since they have the correct semantics which are to simply copy control parameters.
silly1DFFT_serial.cpp, sillyCgSolve_mpi.cpp, sillyCgSolve_serial.cpp, and test_composite_linear_ops.cpp.
Definition at line 56 of file Thyra_LinearOpTesterDecl.hpp.
|
|||||
|
Local typedef for promoted scalar type .
Definition at line 60 of file Thyra_LinearOpTesterDecl.hpp. |
|
|||||
|
Local typedef for promoted scalar magnitude.
Definition at line 63 of file Thyra_LinearOpTesterDecl.hpp. |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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 below set functions to change an option after construction. Definition at line 159 of file Thyra_LinearOpTester.hpp. |
|
||||||||||
|
Set if to check for linear properties
Definition at line 90 of file Thyra_LinearOpTesterDecl.hpp. |
|
||||||||||
|
Set the tolerance above which a relative error will generate a warning message for the check of the linear properties.
Definition at line 95 of file Thyra_LinearOpTesterDecl.hpp. |
|
||||||||||
|
Set the tolerance above which a relative error will generate a error message and result in test failure for the check of the linear properties.
Definition at line 101 of file Thyra_LinearOpTesterDecl.hpp. |
|
||||||||||
|
Set if to check for adjoint property
Definition at line 106 of file Thyra_LinearOpTesterDecl.hpp. |
|
||||||||||
|
Set the tolerance above which a relative error will generate a warning message for the check of the adjoint.
Definition at line 111 of file Thyra_LinearOpTesterDecl.hpp. |
|
||||||||||
|
Set the tolerance above which a relative error will generate a error message and result in test failure for the check of the adjoint.
Definition at line 116 of file Thyra_LinearOpTesterDecl.hpp. |
|
||||||||||
|
Set if to check for symmetry property
Definition at line 121 of file Thyra_LinearOpTesterDecl.hpp. |
|
||||||||||
|
Set the tolerance above which a relative error will generate a warning message for the check of symmetry.
Definition at line 126 of file Thyra_LinearOpTesterDecl.hpp. |
|
||||||||||
|
Set the tolerance above which a relative error will generate a error message and result in test failure for the check of symmetry.
Definition at line 131 of file Thyra_LinearOpTesterDecl.hpp. |
|
||||||||||
|
Set the number random vectors that is generated during each test.
Definition at line 135 of file Thyra_LinearOpTesterDecl.hpp. |
|
||||||||||
|
Set if all tests are shown or just summaries.
Definition at line 139 of file Thyra_LinearOpTesterDecl.hpp. |
|
||||||||||
|
Set if all of the vectors are dumped or not (only relevant if
Definition at line 144 of file Thyra_LinearOpTesterDecl.hpp. |
|
||||||||||
|
Set all the warning tolerances to the same value. Postconditions:
Definition at line 188 of file Thyra_LinearOpTester.hpp. |
|
||||||||||
|
Set all the error tolerances to the same value. Postconditions:
Definition at line 196 of file Thyra_LinearOpTester.hpp. |
|
||||||||||||||||||||||||||||||||
|
Check a linear operator.
This function performs a number of tests on
All relative errors that exceed
out!=NULL and to look at the implementation by clicking on the following link to the source code:
Definition at line 204 of file Thyra_LinearOpTester.hpp. |
|
||||||||||||||||||||||||
|
Calls
Definition at line 553 of file Thyra_LinearOpTester.hpp. |
|
||||||||||||||||||||||||||||||||
|
Check if two linear operators are the same or not.
op1 and op2 are the same by checking that the range and domain spaces are compatible and then checking that sum(op1*v) == sum(op2*v) for various random vectors. The allowed warning and error tolerances are taken from linear_properties_warning_tol() and linear_properties_error_tol().
All relative errors that exceed
out!=NULL and to look at the implementation by clicking on the following link to the source code:
Definition at line 564 of file Thyra_LinearOpTester.hpp. |
|
||||||||||||||||||||||||||||
|
Calls
Definition at line 699 of file Thyra_LinearOpTester.hpp. |
1.3.9.1