EpetraExt::ModelEvaluator::OutArgs Simple_ModelEval::createOutArgs() const { EpetraExt::ModelEvaluator::OutArgsSetup outArgs; outArgs.setModelEvalDescription(this->description()); outArgs.set_Np_Ng(1, 1); outArgs.setSupports(OUT_ARG_DgDp, 0, 0, DerivativeSupport(DERIV_MV_BY_COL)); return outArgs; }
EpetraExt::ModelEvaluator::OutArgs Piro::Epetra::TrapezoidRuleSolver::createOutArgs() const { EpetraExt::ModelEvaluator::OutArgsSetup outArgs; outArgs.setModelEvalDescription(this->description()); // Ng is 1 bigger then model-Ng so that the solution vector can be an outarg outArgs.set_Np_Ng(num_p, num_g+1); //EpetraExt::ModelEvaluator::OutArgs model_outargs = model->createOutArgs(); //for (int i=0; i<num_g; i++) // for (int j=0; j<num_p; j++) // if (!model_outargs.supports(OUT_ARG_DgDp, i, j).none()) // outArgs.setSupports(OUT_ARG_DgDp, i, j, // DerivativeSupport(DERIV_MV_BY_COL)); return outArgs; }
EpetraExt::ModelEvaluator::OutArgs MockModelEval_A::createOutArgs() const { EpetraExt::ModelEvaluator::OutArgsSetup outArgs; outArgs.setModelEvalDescription(this->description()); outArgs.set_Np_Ng(1, 1); outArgs.setSupports(OUT_ARG_DgDp, 0, 0, DerivativeSupport(DERIV_MV_BY_COL)); outArgs.setSupports(OUT_ARG_DgDx, 0, DerivativeSupport(DERIV_MV_BY_COL)); outArgs.setSupports(OUT_ARG_f,true); outArgs.setSupports(OUT_ARG_DfDp, 0, DerivativeSupport(DERIV_MV_BY_COL)); outArgs.setSupports(OUT_ARG_W,true); outArgs.set_W_properties( DerivativeProperties( DERIV_LINEARITY_UNKNOWN, DERIV_RANK_FULL, true)); return outArgs; }
EpetraExt::ModelEvaluator::OutArgs Piro::Epetra::NOXSolver::createOutArgs() const { EpetraExt::ModelEvaluator::OutArgsSetup outArgs; outArgs.setModelEvalDescription(this->description()); // Ng is 1 bigger then model-Ng so that the solution vector can be an outarg outArgs.set_Np_Ng(num_p, num_g+1); // We support all dg/dp layouts model supports, plus the linear op layout EpetraExt::ModelEvaluator::OutArgs model_outargs = model->createOutArgs(); for (int i=0; i<num_g; i++) { for (int j=0; j<num_p; j++) { DerivativeSupport ds = model_outargs.supports(OUT_ARG_DgDp, i, j); if (!ds.none()) { ds.plus(DERIV_LINEAR_OP); outArgs.setSupports(OUT_ARG_DgDp, i, j, ds); } } } return outArgs; }
EpetraExt::ModelEvaluator::OutArgs MockModelEval_D:: createOutArgs() const { EpetraExt::ModelEvaluator::OutArgsSetup outArgs; outArgs.setModelEvalDescription(this->description()); outArgs.set_Np_Ng(2, 1); outArgs.setSupports(OUT_ARG_f, true); outArgs.setSupports(OUT_ARG_W, true); outArgs.set_W_properties( DerivativeProperties( DERIV_LINEARITY_UNKNOWN, DERIV_RANK_FULL, true)); outArgs.setSupports(OUT_ARG_DfDp, 0, DERIV_MV_BY_COL); outArgs.setSupports(OUT_ARG_DfDp, 1, DERIV_MV_BY_COL); outArgs.setSupports(OUT_ARG_DgDx, 0, DERIV_TRANS_MV_BY_ROW); outArgs.setSupports(OUT_ARG_DgDp, 0, 0, DERIV_MV_BY_COL); outArgs.setSupports(OUT_ARG_DgDp, 0, 1, DERIV_MV_BY_COL); #ifdef Piro_ENABLE_Stokhos outArgs.setSupports(OUT_ARG_f_sg, true); outArgs.setSupports(OUT_ARG_W_sg, true); outArgs.setSupports(OUT_ARG_g_sg, 0, true); outArgs.setSupports(OUT_ARG_DfDp_sg, 0, DERIV_MV_BY_COL); outArgs.setSupports(OUT_ARG_DfDp_sg, 1, DERIV_MV_BY_COL); outArgs.setSupports(OUT_ARG_DgDx_sg, 0, DERIV_TRANS_MV_BY_ROW); outArgs.setSupports(OUT_ARG_DgDp_sg, 0, 0, DERIV_MV_BY_COL); outArgs.setSupports(OUT_ARG_DgDp_sg, 0, 1, DERIV_MV_BY_COL); #endif return outArgs; }