Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar > Class Template Reference

Testing class for LinearOpWithSolveBase. More...

#include <Thyra_LinearOpWithSolveTesterDecl.hpp>

List of all members.

Public Types

typedef Teuchos::ScalarTraits<
RangeScalar >::magnitudeType 
RangeScalarMag
 
typedef Teuchos::ScalarTraits<
DomainScalar >::magnitudeType 
DomainScalarMag
 
typedef Teuchos::PromotionTraits<
RangeScalar, DomainScalar
>::promote 
Scalar
 
typedef Teuchos::ScalarTraits<
Scalar >::magnitudeType 
ScalarMag
 

Public Member Functions

 LinearOpWithSolveTester (const bool check_forward_default=true, const RangeScalarMag forward_default_residual_warning_tol=1e-6, const RangeScalarMag forward_default_residual_error_tol=1e-5, const DomainScalarMag forward_default_solution_error_warning_tol=1e-6, const DomainScalarMag forward_default_solution_error_error_tol=1e-5, const bool check_forward_residual=true, const RangeScalarMag forward_residual_solve_tol=1e-5, const RangeScalarMag forward_residual_slack_warning_tol=1e-6, const RangeScalarMag forward_residual_slack_error_tol=1e-5, const bool check_forward_solution_error=true, const RangeScalarMag forward_solution_error_solve_tol=1e-5, const RangeScalarMag forward_solution_error_slack_warning_tol=1e-6, const RangeScalarMag forward_solution_error_slack_error_tol=1e-5, const bool check_adjoint_default=true, const DomainScalarMag adjoint_default_residual_warning_tol=1e-6, const DomainScalarMag adjoint_default_residual_error_tol=1e-5, const RangeScalarMag adjoint_default_solution_error_warning_tol=1e-6, const RangeScalarMag adjoint_default_solution_error_error_tol=1e-5, const bool check_adjoint_residual=true, const DomainScalarMag adjoint_residual_solve_tol=1e-5, const DomainScalarMag adjoint_residual_slack_warning_tol=1e-6, const DomainScalarMag adjoint_residual_slack_error_tol=1e-5, const bool check_adjoint_solution_error=true, const DomainScalarMag adjoint_solution_error_solve_tol=1e-5, const DomainScalarMag adjoint_solution_error_slack_warning_tol=1e-6, const DomainScalarMag adjoint_solution_error_slack_error_tol=1e-5, const int num_random_vectors=1, const bool show_all_tests=false, const bool dump_all=false, const int num_rhs=1)
 Default constructor which sets default parameter values.
void check_forward_default (const bool &check_forward_default)
 Set if a default forward solve will be performed on not.
void forward_default_residual_warning_tol (const RangeScalarMag &forward_default_residual_warning_tol)
 
void forward_default_residual_error_tol (const RangeScalarMag &forward_default_residual_error_tol)
 
void forward_default_solution_error_warning_tol (const DomainScalarMag &forward_default_solution_error_warning_tol)
 
void forward_default_solution_error_error_tol (const DomainScalarMag &forward_default_solution_error_error_tol)
 
void check_forward_residual (const bool &check_forward_residual)
 Set if a tolerance on the residual of the forward solve should checked or not.
void forward_residual_solve_tol (const RangeScalarMag &forward_residual_solve_tol)
 Set the relative tolerance that will be requested in the residual for the forward solve .
void forward_residual_slack_warning_tol (const RangeScalarMag &forward_residual_slack_warning_tol)
 
void forward_residual_slack_error_tol (const RangeScalarMag &forward_residual_slack_error_tol)
 
void check_forward_solution_error (const bool &check_forward_solution_error)
 Set if a tolerance on the solution error of the forward solve should checked or not.
void forward_solution_error_solve_tol (const RangeScalarMag &forward_solution_error_solve_tol)
 Set the relative tolerance that will be requested in the solution_error for the forward solve .
void forward_solution_error_slack_warning_tol (const RangeScalarMag &forward_solution_error_slack_warning_tol)
 
void forward_solution_error_slack_error_tol (const RangeScalarMag &forward_solution_error_slack_error_tol)
 
void check_adjoint_default (const bool &check_adjoint_default)
 Set if a default forward solve will be performed on not.
void adjoint_default_residual_warning_tol (const DomainScalarMag &adjoint_default_residual_warning_tol)
 
void adjoint_default_residual_error_tol (const DomainScalarMag &adjoint_default_residual_error_tol)
 
void adjoint_default_solution_error_warning_tol (const RangeScalarMag &adjoint_default_solution_error_warning_tol)
 
void adjoint_default_solution_error_error_tol (const RangeScalarMag &adjoint_default_solution_error_error_tol)
 
void check_adjoint_residual (const bool &check_adjoint_residual)
 Set if a tolerance on the residual of the adjoint solve should checked or not.
void adjoint_residual_solve_tol (const DomainScalarMag &adjoint_residual_solve_tol)
 Set the relative tolerance that will be requested in the residual in the adjoint solve .
void adjoint_residual_slack_warning_tol (const DomainScalarMag &adjoint_residual_slack_warning_tol)
 
void adjoint_residual_slack_error_tol (const DomainScalarMag &adjoint_residual_slack_error_tol)
 
void check_adjoint_solution_error (const bool &check_adjoint_solution_error)
 Set if a tolerance on the solution error of the adjoint solve should checked or not.
void adjoint_solution_error_solve_tol (const RangeScalarMag &adjoint_solution_error_solve_tol)
 Set the relative tolerance that will be requested in the solution_error for the adjoint solve .
void adjoint_solution_error_slack_warning_tol (const RangeScalarMag &adjoint_solution_error_slack_warning_tol)
 
void adjoint_solution_error_slack_error_tol (const RangeScalarMag &adjoint_solution_error_slack_error_tol)
 
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 num_rhs (const int &num_rhs)
 Set the number of right-hand-sides in the multivectors.
void turn_off_all_tests ()
 Turn off all tests so that individual tests can be set.
void set_all_solve_tol (const ScalarMag solve_tol)
 Set all the solve tolerances to the same value.
void set_all_slack_warning_tol (const ScalarMag slack_warning_tol)
 Set all the warning tolerances to the same value.
void set_all_slack_error_tol (const ScalarMag slack_error_tol)
 Set all the error tolerances to the same value.
bool check (const LinearOpWithSolveBase< RangeScalar, DomainScalar > &op, Teuchos::FancyOStream *out) const
 Check a LinearOpWithSolveBase object.


Detailed Description

template<class RangeScalar, class DomainScalar = RangeScalar>
class Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >

Testing class for LinearOpWithSolveBase.

This testing class can be used in several different roles:

This class can check single linear solves or multi-RHS (i.e. multi-vector) linear solves.

As a general rule, the client can specify tolerances that are used to determine if a test is successful or not.

The client can pass in randomizer objects that create "random" vectors and multi-vectors that are used by the testing class. This can be very important in some cases and this gives the client full control over what data is used in the tests.

This testing class is not designed to test the LinearOpBase interface. For that purpose, use the LinearOpTester class in conjunction with this testing class to fully validate a LinearOpWithSolveBase object.

ToDo: Finish documentation!

Examples:

silly1DFFT_serial.cpp.

Definition at line 75 of file Thyra_LinearOpWithSolveTesterDecl.hpp.


Member Typedef Documentation

template<class RangeScalar, class DomainScalar = RangeScalar>
typedef Teuchos::ScalarTraits<RangeScalar>::magnitudeType Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::RangeScalarMag
 

Definition at line 79 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
typedef Teuchos::ScalarTraits<DomainScalar>::magnitudeType Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::DomainScalarMag
 

Definition at line 81 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
typedef Teuchos::PromotionTraits<RangeScalar,DomainScalar>::promote Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::Scalar
 

Definition at line 83 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::ScalarMag
 

Definition at line 85 of file Thyra_LinearOpWithSolveTesterDecl.hpp.


Constructor & Destructor Documentation

template<class RangeScalar, class DomainScalar>
Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::LinearOpWithSolveTester const bool  check_forward_default = true,
const RangeScalarMag  forward_default_residual_warning_tol = 1e-6,
const RangeScalarMag  forward_default_residual_error_tol = 1e-5,
const DomainScalarMag  forward_default_solution_error_warning_tol = 1e-6,
const DomainScalarMag  forward_default_solution_error_error_tol = 1e-5,
const bool  check_forward_residual = true,
const RangeScalarMag  forward_residual_solve_tol = 1e-5,
const RangeScalarMag  forward_residual_slack_warning_tol = 1e-6,
const RangeScalarMag  forward_residual_slack_error_tol = 1e-5,
const bool  check_forward_solution_error = true,
const RangeScalarMag  forward_solution_error_solve_tol = 1e-5,
const RangeScalarMag  forward_solution_error_slack_warning_tol = 1e-6,
const RangeScalarMag  forward_solution_error_slack_error_tol = 1e-5,
const bool  check_adjoint_default = true,
const DomainScalarMag  adjoint_default_residual_warning_tol = 1e-6,
const DomainScalarMag  adjoint_default_residual_error_tol = 1e-5,
const RangeScalarMag  adjoint_default_solution_error_warning_tol = 1e-6,
const RangeScalarMag  adjoint_default_solution_error_error_tol = 1e-5,
const bool  check_adjoint_residual = true,
const DomainScalarMag  adjoint_residual_solve_tol = 1e-5,
const DomainScalarMag  adjoint_residual_slack_warning_tol = 1e-6,
const DomainScalarMag  adjoint_residual_slack_error_tol = 1e-5,
const bool  check_adjoint_solution_error = true,
const DomainScalarMag  adjoint_solution_error_solve_tol = 1e-5,
const DomainScalarMag  adjoint_solution_error_slack_warning_tol = 1e-6,
const DomainScalarMag  adjoint_solution_error_slack_error_tol = 1e-5,
const int  num_random_vectors = 1,
const bool  show_all_tests = false,
const bool  dump_all = false,
const int  num_rhs = 1
 

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 43 of file Thyra_LinearOpWithSolveTester.hpp.


Member Function Documentation

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::check_forward_default const bool &  check_forward_default  )  [inline]
 

Set if a default forward solve will be performed on not.

Definition at line 128 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::forward_default_residual_warning_tol const RangeScalarMag forward_default_residual_warning_tol  )  [inline]
 

Definition at line 131 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::forward_default_residual_error_tol const RangeScalarMag forward_default_residual_error_tol  )  [inline]
 

Definition at line 134 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::forward_default_solution_error_warning_tol const DomainScalarMag forward_default_solution_error_warning_tol  )  [inline]
 

Definition at line 137 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::forward_default_solution_error_error_tol const DomainScalarMag forward_default_solution_error_error_tol  )  [inline]
 

Definition at line 140 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::check_forward_residual const bool &  check_forward_residual  )  [inline]
 

Set if a tolerance on the residual of the forward solve should checked or not.

Definition at line 143 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::forward_residual_solve_tol const RangeScalarMag forward_residual_solve_tol  )  [inline]
 

Set the relative tolerance that will be requested in the residual for the forward solve .

Definition at line 147 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::forward_residual_slack_warning_tol const RangeScalarMag forward_residual_slack_warning_tol  )  [inline]
 

Definition at line 150 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::forward_residual_slack_error_tol const RangeScalarMag forward_residual_slack_error_tol  )  [inline]
 

Definition at line 153 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::check_forward_solution_error const bool &  check_forward_solution_error  )  [inline]
 

Set if a tolerance on the solution error of the forward solve should checked or not.

Definition at line 156 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::forward_solution_error_solve_tol const RangeScalarMag forward_solution_error_solve_tol  )  [inline]
 

Set the relative tolerance that will be requested in the solution_error for the forward solve .

Definition at line 160 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::forward_solution_error_slack_warning_tol const RangeScalarMag forward_solution_error_slack_warning_tol  )  [inline]
 

Definition at line 163 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::forward_solution_error_slack_error_tol const RangeScalarMag forward_solution_error_slack_error_tol  )  [inline]
 

Definition at line 166 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::check_adjoint_default const bool &  check_adjoint_default  )  [inline]
 

Set if a default forward solve will be performed on not.

Definition at line 169 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::adjoint_default_residual_warning_tol const DomainScalarMag adjoint_default_residual_warning_tol  )  [inline]
 

Definition at line 172 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::adjoint_default_residual_error_tol const DomainScalarMag adjoint_default_residual_error_tol  )  [inline]
 

Definition at line 175 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::adjoint_default_solution_error_warning_tol const RangeScalarMag adjoint_default_solution_error_warning_tol  )  [inline]
 

Definition at line 178 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::adjoint_default_solution_error_error_tol const RangeScalarMag adjoint_default_solution_error_error_tol  )  [inline]
 

Definition at line 181 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::check_adjoint_residual const bool &  check_adjoint_residual  )  [inline]
 

Set if a tolerance on the residual of the adjoint solve should checked or not.

Definition at line 185 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::adjoint_residual_solve_tol const DomainScalarMag adjoint_residual_solve_tol  )  [inline]
 

Set the relative tolerance that will be requested in the residual in the adjoint solve .

Definition at line 189 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::adjoint_residual_slack_warning_tol const DomainScalarMag adjoint_residual_slack_warning_tol  )  [inline]
 

Definition at line 192 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::adjoint_residual_slack_error_tol const DomainScalarMag adjoint_residual_slack_error_tol  )  [inline]
 

Definition at line 195 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::check_adjoint_solution_error const bool &  check_adjoint_solution_error  )  [inline]
 

Set if a tolerance on the solution error of the adjoint solve should checked or not.

Definition at line 198 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::adjoint_solution_error_solve_tol const RangeScalarMag adjoint_solution_error_solve_tol  )  [inline]
 

Set the relative tolerance that will be requested in the solution_error for the adjoint solve .

Definition at line 202 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::adjoint_solution_error_slack_warning_tol const RangeScalarMag adjoint_solution_error_slack_warning_tol  )  [inline]
 

Definition at line 205 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::adjoint_solution_error_slack_error_tol const RangeScalarMag adjoint_solution_error_slack_error_tol  )  [inline]
 

Definition at line 208 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::num_random_vectors const int &  num_random_vectors  )  [inline]
 

Set the number random vectors that is generated during each test.

Definition at line 212 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::show_all_tests const bool &  show_all_tests  )  [inline]
 

Set if all tests are shown or just summaries.

Definition at line 216 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::dump_all const bool &  dump_all  )  [inline]
 

Set if all of the vectors are dumped or not (only relevant if show_all_tests()==true).

Definition at line 221 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar = RangeScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::num_rhs const int &  num_rhs  )  [inline]
 

Set the number of right-hand-sides in the multivectors.

Definition at line 225 of file Thyra_LinearOpWithSolveTesterDecl.hpp.

template<class RangeScalar, class DomainScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::turn_off_all_tests  ) 
 

Turn off all tests so that individual tests can be set.

Postconditions:

Definition at line 108 of file Thyra_LinearOpWithSolveTester.hpp.

template<class RangeScalar, class DomainScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::set_all_solve_tol const ScalarMag  solve_tol  ) 
 

Set all the solve tolerances to the same value.

Postconditions:

Definition at line 119 of file Thyra_LinearOpWithSolveTester.hpp.

template<class RangeScalar, class DomainScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::set_all_slack_warning_tol const ScalarMag  slack_warning_tol  ) 
 

Set all the warning tolerances to the same value.

Postconditions:

Definition at line 129 of file Thyra_LinearOpWithSolveTester.hpp.

template<class RangeScalar, class DomainScalar>
void Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::set_all_slack_error_tol const ScalarMag  slack_error_tol  ) 
 

Set all the error tolerances to the same value.

Postconditions:

Definition at line 142 of file Thyra_LinearOpWithSolveTester.hpp.

template<class RangeScalar, class DomainScalar>
bool Thyra::LinearOpWithSolveTester< RangeScalar, DomainScalar >::check const LinearOpWithSolveBase< RangeScalar, DomainScalar > &  op,
Teuchos::FancyOStream out
const
 

Check a LinearOpWithSolveBase object.

ToDo: Finish documentation!

Definition at line 155 of file Thyra_LinearOpWithSolveTester.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:32:46 2008 for Thyra Operator Solve Support by doxygen 1.3.9.1