58 class init_rtop_server_t {
60 init_rtop_server_t() {
62 find_nan_inf_targ = find_nan_inf_op.reduct_obj_create();
66 init_rtop_server_t init_rtop_server;
71 ,
bool throw_excpt, std::ostream*
out )
74 std::ostringstream omsg;
76 <<
"The scalar \"" << name
77 <<
"\" = " << val <<
" is not a valid bounded number";
79 *out << omsg.str() << std::endl;
82 ,
"assert_print_nan_inf(...) : Error, " << omsg.str() );
89 const Vector& v,
const char name[]
90 ,
bool throw_excpt, std::ostream*
out
93 find_nan_inf_op.reduct_obj_reinit(find_nan_inf_targ.
ptr());
94 const Vector* vecs[1] = { &v };
95 apply_op(find_nan_inf_op,1,vecs,0,NULL,&*find_nan_inf_targ);
100 <<
"The vector \"" << name <<
"\" has the first following NaN or Inf element\n"
101 << name <<
"(" << ele.
i <<
") = " << ele.
v0_i << std::endl;
105 ,
"assert_print_nan_inf(...) : Error, the vector named "
106 << name <<
" has at least one element which is NaN or Inf" );
Adapter subclass that uses a RTOp_RTOp object.
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
RTOp_value_type value_type
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
struct RTOp_ROp_find_nan_inf_reduct_obj_t RTOp_ROp_find_nan_inf_val(RTOp_ReductTarget targ_obj)
int RTOp_ROp_find_nan_inf_construct(struct RTOp_RTOp *op)
bool assert_print_nan_inf(const value_type &val, const char name[], bool throw_excpt, std::ostream *out)
This function asserts if a value_type scalare is a NaN or Inf and optionally prints out these entires...
int RTOp_is_nan_inf(RTOp_value_type val)
void apply_op(EApplyBy apply_by, const RTOpPack::RTOp &primary_op, const size_t num_multi_vecs, const MultiVector *multi_vecs[], const size_t num_targ_multi_vecs, MultiVectorMutable *targ_multi_vecs[], RTOpPack::ReductTarget *reduct_objs[]=NULL, const index_type primary_first_ele=1, const index_type primary_sub_dim=0, const index_type primary_global_offset=0, const index_type secondary_first_ele=1, const index_type secondary_sub_dim=0)
Apply a reduction/transformation operator column by column and return an array of the reduction objec...
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)