本文整理汇总了C++中meb::InArgs::get_t方法的典型用法代码示例。如果您正苦于以下问题:C++ InArgs::get_t方法的具体用法?C++ InArgs::get_t怎么用?C++ InArgs::get_t使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类meb::InArgs
的用法示例。
在下文中一共展示了InArgs::get_t方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
);
}
*out <<"\nstateStepper:\n" << describe(*stateStepper,verbLevel);
*out <<"\nstateStepper valid options:\n";
stateStepper->getValidParameters()->print(
*out, PLPrintOptions().indent(2).showTypes(true).showDoc(true)
);
stateStepper->setParameterList(sublist(paramList,RythmosStepper_name));
//
// Setup finite difference objects that will be used for tests
//
Thyra::DirectionalFiniteDiffCalculator<Scalar> fdCalc;
fdCalc.setParameterList(sublist(paramList,FdCalc_name));
fdCalc.setOStream(out);
fdCalc.setVerbLevel(verbLevel);
//
// Use a StepperAsModelEvaluator to integrate the state
//
const MEB::InArgs<Scalar>
state_ic = stateModel->getNominalValues();
*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"