本文整理汇总了C++中meb::InArgs::get_p方法的典型用法代码示例。如果您正苦于以下问题:C++ InArgs::get_p方法的具体用法?C++ InArgs::get_p怎么用?C++ InArgs::get_p使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类meb::InArgs
的用法示例。
在下文中一共展示了InArgs::get_p方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
*out << "\nstate_ic:\n" << describe(state_ic,verbLevel);
RCP<Rythmos::IntegratorBase<Scalar> > integrator;
{
RCP<ParameterList>
integratorPL = sublist(paramList,RythmosIntegrator_name);
integratorPL->set( "Take Variable Steps", as<bool>(numTimeSteps < 0) );
integratorPL->set( "Fixed dt", as<double>((finalTime - state_ic.get_t())/numTimeSteps) );
RCP<Rythmos::IntegratorBase<Scalar> >
defaultIntegrator = Rythmos::controlledDefaultIntegrator<Scalar>(
Rythmos::simpleIntegrationControlStrategy<Scalar>(integratorPL)
);
integrator = defaultIntegrator;
}
RCP<Rythmos::StepperAsModelEvaluator<Scalar> >
stateIntegratorAsModel = Rythmos::stepperAsModelEvaluator(
stateStepper, integrator, state_ic
);
stateIntegratorAsModel->setVerbLevel(verbLevel);
*out << "\nUse the StepperAsModelEvaluator to integrate state x(p,finalTime) ... \n";
RCP<Thyra::VectorBase<Scalar> > x_final;
{
Teuchos::OSTab tab(out);
x_final = createMember(stateIntegratorAsModel->get_g_space(0));
eval_g(
*stateIntegratorAsModel,
0, *state_ic.get_p(0),
finalTime,
0, &*x_final
);
*out
<< "\nx_final = x(p,finalTime) evaluated using stateIntegratorAsModel:\n"
<< describe(*x_final,solnVerbLevel);
}
//
// Test the integrated state against the exact analytical state solution
//
RCP<const Thyra::VectorBase<Scalar> >
exact_x_final = create_Vector(
epetraStateModel->getExactSolution(finalTime),
stateModel->get_x_space()
);
result = Thyra::testRelNormDiffErr(
"exact_x_final", *exact_x_final, "x_final", *x_final,
"maxStateError", maxStateError, "warningTol", 1.0, // Don't warn
&*out, solnVerbLevel
);
if (!result) success = false;
//
// Solve and test the forward sensitivity computation
//
if (doFwdSensSolve) {