Miscellaneous Support Code for Developing Thyra Operator/Vector Subclass Implementations
[Development of Concrete Thyra Operator/Vector Subclass Implementations]

This is some basic C++ code to support the development of Thyra subclass implementations. More...


Modules

group  Internal Helper Code not meant for General Use
 Some support code that is not meant for general programmers to access.

Classes

class  Thyra::SingleRhsEuclideanLinearOpBase< Scalar >
 Base class for linear operators that can only implement a single RHS vector apply operation and only support one scalar type. More...
class  Thyra::SingleRhsLinearOpBase< Scalar >
 Base class for linear operators that can only implement a single RHS vector apply operation and only support one scalar type. More...
class  Thyra::SingleScalarEuclideanLinearOpBase< Scalar >
 Base class for euclidean linear operators that can only handle a single scalar type. More...
class  Thyra::SingleScalarLinearOpBase< Scalar >
 Base class for linear operators that can only handle a single scalar type. More...

Defines

#define THYRA_ASSERT_LHS_ARG(FUNC_NAME, LHS_ARG)
 This macro just asserts that a LHS argument is set.
#define THYRA_ASSERT_VEC_SPACES(FUNC_NAME, VS1, VS2)   THYRA_ASSERT_VEC_SPACES_NAMES(FUNC_NAME,VS1,#VS1,VS2,#VS2)
 This is a very useful macro that should be used to validate that two vector spaces are compatible.
#define THYRA_ASSERT_LINEAR_OP_VEC_APPLY_SPACES(FUNC_NAME, M, M_T, X, Y)
 This is a very useful macro that should be used to validate that the spaces for the vector version of the LinearOpBase::apply() function (or related operations).
#define THYRA_ASSERT_LINEAR_OP_MULTIVEC_APPLY_SPACES(FUNC_NAME, M, M_T, X, Y)
 This is a very useful macro that should be used to validate that the spaces for the multi-vector version of the LinearOpBase::apply() function (or related operations).

Functions

template<class Scalar>
void Thyra::apply_op_validate_input (const char func_name[], const VectorSpaceBase< Scalar > &space, const RTOpPack::RTOpT< Scalar > &op, const int num_vecs, const VectorBase< Scalar > *vecs[], const int num_targ_vecs, VectorBase< Scalar > *targ_vecs[], RTOpPack::ReductTarget *reduct_obj, const Index first_ele, const Index sub_dim, const Index global_offset)
 Validate the inputs to VectorBase::applyOp().
template<class Scalar>
void Thyra::apply_op_validate_input (const char func_name[], const VectorSpaceBase< Scalar > &domain, const VectorSpaceBase< Scalar > &range, const RTOpPack::RTOpT< Scalar > &primary_op, const int num_multi_vecs, const MultiVectorBase< Scalar > *multi_vecs[], const int num_targ_multi_vecs, MultiVectorBase< Scalar > *targ_multi_vecs[], RTOpPack::ReductTarget *reduct_objs[], const Index primary_first_ele, const Index primary_sub_dim, const Index primary_global_offset, const Index secondary_first_ele, const Index secondary_sub_dim)
 Validate the inputs to MultiVectorBase::applyOp().

Detailed Description

This is some basic C++ code to support the development of Thyra subclass implementations.


Define Documentation

#define THYRA_ASSERT_LHS_ARG FUNC_NAME,
LHS_ARG   ) 
 

Value:

TEST_FOR_EXCEPTION( \
    (LHS_ARG) == NULL, std::invalid_argument \
    ,FUNC_NAME << " : Error!" \
    );
This macro just asserts that a LHS argument is set.

Definition at line 118 of file Thyra_AssertOp.hpp.

#define THYRA_ASSERT_VEC_SPACES FUNC_NAME,
VS1,
VS2   )     THYRA_ASSERT_VEC_SPACES_NAMES(FUNC_NAME,VS1,#VS1,VS2,#VS2)
 

This is a very useful macro that should be used to validate that two vector spaces are compatible.

If the vector spaces are not compatible then a very helpful error message is generated (in the std::exception class) along with the file name and line number where this macro is called. The error message string embedded in the thrown exception gives the concrete types of the two vector spaces involved as well as their dimensions.

Definition at line 152 of file Thyra_AssertOp.hpp.

#define THYRA_ASSERT_LINEAR_OP_VEC_APPLY_SPACES FUNC_NAME,
M,
M_T,
X,
 ) 
 

Value:

THYRA_ASSERT_LHS_ARG(FUNC_NAME,Y); \
  THYRA_ASSERT_MAT_VEC_SPACES(FUNC_NAME,M,M_T,::Thyra::VS_RANGE,*(Y)->space()); \
  THYRA_ASSERT_MAT_VEC_SPACES(FUNC_NAME,M,M_T,::Thyra::VS_DOMAIN,*(X).space());
This is a very useful macro that should be used to validate that the spaces for the vector version of the LinearOpBase::apply() function (or related operations).

If the vector spaces are not compatible then a very helpful error message is generated (in the std::exception class) along with the file name and line number where this macro is called. The error message string embedded in the thrown exception gives the concrete types of the vector spaces involved as well as their dimensions.

Examples:
sillyCgSolve.hpp.

Definition at line 186 of file Thyra_AssertOp.hpp.

#define THYRA_ASSERT_LINEAR_OP_MULTIVEC_APPLY_SPACES FUNC_NAME,
M,
M_T,
X,
 ) 
 

Value:

THYRA_ASSERT_LHS_ARG(FUNC_NAME,Y); \
  THYRA_ASSERT_VEC_SPACES(FUNC_NAME,*(X).domain(),*(Y)->domain()); \
  THYRA_ASSERT_MAT_VEC_SPACES(FUNC_NAME,M,M_T,::Thyra::VS_RANGE,*(Y)->range()); \
  THYRA_ASSERT_MAT_VEC_SPACES(FUNC_NAME,M,M_T,::Thyra::VS_DOMAIN,*(X).range());
This is a very useful macro that should be used to validate that the spaces for the multi-vector version of the LinearOpBase::apply() function (or related operations).

If the vector spaces are not compatible then a very helpful error message is generated (in the std::exception class) along with the file name and line number where this macro is called. The error message string embedded in the thrown exception gives the concrete types of the vector spaces involved as well as their dimensions.

Definition at line 203 of file Thyra_AssertOp.hpp.


Function Documentation

template<class Scalar>
void Thyra::apply_op_validate_input const char  func_name[],
const VectorSpaceBase< Scalar > &  space,
const RTOpPack::RTOpT< Scalar > &  op,
const int  num_vecs,
const VectorBase< Scalar > *  vecs[],
const int  num_targ_vecs,
VectorBase< Scalar > *  targ_vecs[],
RTOpPack::ReductTarget reduct_obj,
const Index  first_ele,
const Index  sub_dim,
const Index  global_offset
 

Validate the inputs to VectorBase::applyOp().

Throws an exception with a nice error message if one of the preconditions are not met.

Definition at line 40 of file Thyra_apply_op_helper.hpp.

template<class Scalar>
void Thyra::apply_op_validate_input const char  func_name[],
const VectorSpaceBase< Scalar > &  domain,
const VectorSpaceBase< Scalar > &  range,
const RTOpPack::RTOpT< Scalar > &  primary_op,
const int  num_multi_vecs,
const MultiVectorBase< Scalar > *  multi_vecs[],
const int  num_targ_multi_vecs,
MultiVectorBase< Scalar > *  targ_multi_vecs[],
RTOpPack::ReductTarget reduct_objs[],
const Index  primary_first_ele,
const Index  primary_sub_dim,
const Index  primary_global_offset,
const Index  secondary_first_ele,
const Index  secondary_sub_dim
 

Validate the inputs to MultiVectorBase::applyOp().

Throws an exception with a nice error message if one of the preconditions are not met.

Definition at line 77 of file Thyra_apply_op_helper.hpp.


Generated on Thu Sep 18 12:39:53 2008 for Thyra ANA Operator/VectorBase Interfaces and Related Software by doxygen 1.3.9.1