54 #define max(a,b) ( (a) > (b) ? (a) : (b) )
55 #define min(a,b) ( (a) < (b) ? (a) : (b) )
106 if( num_vecs != 5 || ( num_vecs && vecs == NULL ) )
108 if( num_targ_vecs != 0 || ( num_targ_vecs && targ_vecs == NULL ) )
111 vecs[1].sub_dim != vecs[0].sub_dim
112 || vecs[2].sub_dim != vecs[0].sub_dim
113 || vecs[3].sub_dim != vecs[0].sub_dim
114 || vecs[4].sub_dim != vecs[0].sub_dim
145 for( k = 0; k < sub_dim; ++k, v0_val += v0_val_s, v1_val += v1_val_s, v2_val += v2_val_s, v3_val += v3_val_s, v4_val += v4_val_s )
149 if ((*v1_val) > -(*inf_bound))
150 { comp_err_ith = fabs((*v3_val)*((*v0_val)-(*v1_val))-(*mu)); }
152 if ((*v2_val) < (*inf_bound))
153 { comp_err_ith =
max(comp_err_ith, fabs((*v4_val)*((*v2_val)-(*v0_val))-(*mu))); }
156 (*comp_err) =
max( (*comp_err), comp_err_ith );
167 ,
"ROp_comp_err_with_mu"
201 *ptr_inf_bound = inf_bound;
int RTOp_ROp_comp_err_with_mu_construct(RTOp_value_type mu, RTOp_value_type inf_bound, struct RTOp_RTOp *op)
int RTOp_ROp_comp_err_with_mu_init(RTOp_value_type mu, RTOp_value_type inf_bound, struct RTOp_RTOp *op)
int(* obj_create)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)
const struct RTOp_obj_type_vtbl_t RTOp_obj_value_value_vtbl
const struct RTOp_obj_type_vtbl_t * obj_data_vtbl
const struct RTOp_RTOp_vtbl_t RTOp_ROp_comp_err_with_mu_vtbl
#define RTOp_ERR_INCOMPATIBLE_VECS
const RTOp_value_type * values
int RTOp_get_reduct_max_value_op(const struct RTOp_RTOp_vtbl_t *vtbl, const void *obj_data, RTOp_reduct_op_func_ptr_t *reduct_op_func_ptr)
#define RTOp_ERR_INVALID_NUM_VECS
int(* obj_free)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)
const struct RTOp_RTOp_vtbl_t * vtbl
static int RTOp_ROp_comp_err_with_mu_apply_op(const struct RTOp_RTOp_vtbl_t *vtbl, const void *obj_data, const int num_vecs, const struct RTOp_SubVector vecs[], const int num_targ_vecs, const struct RTOp_MutableSubVector targ_vecs[], RTOp_ReductTarget reduct_obj)
int RTOp_reduct_max_value(const struct RTOp_RTOp_vtbl_t *vtbl, const void *obj_data, RTOp_ReductTarget in_targ_obj, RTOp_ReductTarget inout_targ_obj)
int RTOp_ROp_comp_err_with_mu_destroy(struct RTOp_RTOp *op)
RTOp_value_type RTOp_ROp_comp_err_with_mu_val(RTOp_ReductTarget reduct_obj)
#define RTOp_ERR_INVALID_NUM_TARG_VECS
const struct RTOp_obj_type_vtbl_t RTOp_obj_value_vtbl
Teuchos_Ordinal RTOp_index_type