10#ifndef THYRA_APPLY_OP_HELPER_HPP 
   11#define THYRA_APPLY_OP_HELPER_HPP 
   13#include "Thyra_apply_op_helper_decl.hpp" 
   14#include "Thyra_VectorBase.hpp" 
   15#include "Thyra_VectorSpaceBase.hpp" 
   16#include "Thyra_AssertOp.hpp" 
   17#include "Teuchos_Assert.hpp" 
   18#include "Teuchos_as.hpp" 
   23  const std::string &func_name,
 
   32  const int num_vecs = vecs.size();
 
   33  const int num_targ_vecs = targ_vecs.size();
 
   35    global_offset_in < 0, std::logic_error
 
   36    ,func_name << 
" : Error! global_offset_in = " 
   37    <<global_offset_in<<
" is not valid" );
 
   38  for (
int k = 0; k < num_vecs; ++k)
 
   40  for (
int k = 0; k < num_targ_vecs; ++k)
 
 
   47  const std::string &func_name,
 
   54  const Ordinal primary_global_offset_in
 
   60    primary_global_offset_in < 0, std::logic_error
 
   61    ,func_name << 
" : Error! primary_global_offset_in = " 
   62    <<primary_global_offset_in<<
" is not valid" );
 
   65  for (
int k = 0; k < multi_vecs.size(); ++k) {
 
   69  for (
int k = 0; k < targ_multi_vecs.size(); ++k) {
 
 
   80#define THYRA_APPLY_OP_HELPER_INSTANT(SCALAR) \ 
   82  template void apply_op_validate_input( \ 
   83    const std::string &func_name, \ 
   84    const VectorSpaceBase<SCALAR > &space, \ 
   85    const RTOpPack::RTOpT<SCALAR > &op, \ 
   86    const ArrayView<const Ptr<const VectorBase<SCALAR > > > &vecs, \ 
   87    const ArrayView<const Ptr<VectorBase<SCALAR > > > &targ_vecs, \ 
   88    const Ptr<RTOpPack::ReductTarget> &reduct_obj, \ 
   89    const Ordinal global_offset_in \ 
   92  template void apply_op_validate_input( \ 
   93    const std::string &func_name, \ 
   94    const VectorSpaceBase<SCALAR > &domain, \ 
   95    const VectorSpaceBase<SCALAR > &range, \ 
   96    const RTOpPack::RTOpT<SCALAR > &primary_op, \ 
   97    const ArrayView<const Ptr<const MultiVectorBase<SCALAR > > > &multi_vecs, \ 
   98    const ArrayView<const Ptr<MultiVectorBase<SCALAR > > > &targ_multi_vecs, \ 
   99    const ArrayView<const Ptr<RTOpPack::ReductTarget> > &reduct_objs, \ 
  100    const Ordinal primary_global_offset_in \ 
Interface for a collection of column vectors called a multi-vector.
 
Abstract interface for finite-dimensional dense vectors.
 
Abstract interface for objects that represent a space for vectors.
 
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
 
#define THYRA_ASSERT_VEC_SPACES(FUNC_NAME, VS1, VS2)
This is a very useful macro that should be used to validate that two vector spaces are compatible.
 
Teuchos::Ordinal Ordinal
Type for the dimension of a vector space. `*.
 
void apply_op_validate_input(const std::string &func_name, const VectorSpaceBase< Scalar > &space, const RTOpPack::RTOpT< Scalar > &op, const ArrayView< const Ptr< const VectorBase< Scalar > > > &vecs, const ArrayView< const Ptr< VectorBase< Scalar > > > &targ_vecs, const Ptr< RTOpPack::ReductTarget > &reduct_obj, const Ordinal global_offset)
Validate the inputs to VectorBase::applyOp().
 
TypeTo as(const TypeFrom &t)