本文整理汇总了C++中Teuchos::includesVerbLevel方法的典型用法代码示例。如果您正苦于以下问题:C++ Teuchos::includesVerbLevel方法的具体用法?C++ Teuchos::includesVerbLevel怎么用?C++ Teuchos::includesVerbLevel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Teuchos
的用法示例。
在下文中一共展示了Teuchos::includesVerbLevel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: describe
void EpetraLinearOp::describe(
FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel
) const
{
using Teuchos::includesVerbLevel;
using Teuchos::as;
using Teuchos::rcp_dynamic_cast;
using Teuchos::OSTab;
using Teuchos::describe;
OSTab tab(out);
if ( as<int>(verbLevel) == as<int>(Teuchos::VERB_LOW) || is_null(op_)) {
out << this->description() << std::endl;
}
else if (includesVerbLevel(verbLevel,Teuchos::VERB_MEDIUM)) {
out
<< Teuchos::Describable::description()
<< "{"
<< "rangeDim=" << this->range()->dim()
<< ",domainDim=" << this->domain()->dim()
<< "}\n";
OSTab tab2(out);
if (op_.get()) {
if ( as<int>(verbLevel) >= as<int>(Teuchos::VERB_HIGH) ) {
out << "opTrans="<<toString(opTrans_)<<"\n";
out << "applyAs="<<toString(applyAs_)<<"\n";
out << "adjointSupport="<<toString(adjointSupport_)<<"\n";
out << "op="<<typeName(*op_)<<"\n";
}
if ( as<int>(verbLevel) >= as<int>(Teuchos::VERB_EXTREME) ) {
OSTab tab3(out);
RCP<const Epetra_CrsMatrix>
csr_op = rcp_dynamic_cast<const Epetra_CrsMatrix>(op_);
if (!is_null(csr_op)) {
csr_op->Print(out);
}
}
}
else {
out << "op=NULL"<<"\n";
}
}
}
示例2: unscaleModelVars
void EpetraExt::unscaleModelVars(
const ModelEvaluator::InArgs &scaledVars,
const ModelEvaluator::InArgs &varScalings,
ModelEvaluator::InArgs *origVars,
Teuchos::FancyOStream *out,
Teuchos::EVerbosityLevel verbLevel
)
{
using Teuchos::RCP;
using Teuchos::includesVerbLevel;
typedef ModelEvaluator EME;
#ifdef TEUCHOS_DEBUG
TEUCHOS_TEST_FOR_EXCEPT(!origVars);
assertModelVarScalings(varScalings);
#endif
// Print scaling vectors
if (out && includesVerbLevel(verbLevel,Teuchos::VERB_HIGH)) {
RCP<const Epetra_Vector> inv_s_x;
if ( scaledVars.supports(EME::IN_ARG_x) &&
!is_null(inv_s_x=varScalings.get_x()) )
{
*out << "\nState inverse scaling vector inv_s_x:\n";
Teuchos::OSTab tab(*out);
inv_s_x->Print(*out);
}
}
// Scal the input varaibles
if (scaledVars.supports(EME::IN_ARG_x_dot)) {
unscaleModelVar( InArgsGetterSetter_x_dot(), scaledVars, varScalings, origVars,
out, verbLevel );
}
if (scaledVars.supports(EME::IN_ARG_x_dotdot)) {
unscaleModelVar( InArgsGetterSetter_x_dotdot(), scaledVars, varScalings, origVars,
out, verbLevel );
}
if (scaledVars.supports(EME::IN_ARG_x)) {
unscaleModelVar( InArgsGetterSetter_x(), scaledVars, varScalings, origVars,
out, verbLevel );
}
const int Np = scaledVars.Np();
for ( int l = 0; l < Np; ++l ) {
unscaleModelVar( InArgsGetterSetter_p(l), scaledVars, varScalings, origVars,
out, verbLevel );
}
if (scaledVars.supports(EME::IN_ARG_x_dot_poly)) {
TEUCHOS_TEST_FOR_EXCEPTION(
!is_null(varScalings.get_x()), std::logic_error,
"Error, can't hanlde unscaling of x_dot_poly yet!"
);
origVars->set_x_dot_poly(scaledVars.get_x_dot_poly());
}
if (scaledVars.supports(EME::IN_ARG_x_dotdot_poly)) {
TEUCHOS_TEST_FOR_EXCEPTION(
!is_null(varScalings.get_x()), std::logic_error,
"Error, can't hanlde unscaling of x_dotdot_poly yet!"
);
origVars->set_x_dotdot_poly(scaledVars.get_x_dotdot_poly());
}
if (scaledVars.supports(EME::IN_ARG_x_poly)) {
TEUCHOS_TEST_FOR_EXCEPTION(
!is_null(varScalings.get_x()), std::logic_error,
"Error, can't hanlde unscaling of x_poly yet!"
);
origVars->set_x_poly(scaledVars.get_x_poly());
}
if (scaledVars.supports(EME::IN_ARG_t)) {
TEUCHOS_TEST_FOR_EXCEPTION(
varScalings.get_t() > 0.0, std::logic_error,
"Error, can't hanlde unscaling of t yet!"
);
origVars->set_t(scaledVars.get_t());
}
if (scaledVars.supports(EME::IN_ARG_alpha)) {
TEUCHOS_TEST_FOR_EXCEPTION(
varScalings.get_alpha() > 0.0, std::logic_error,
"Error, can't hanlde unscaling of alpha yet!"
);
origVars->set_alpha(scaledVars.get_alpha());
}
if (scaledVars.supports(EME::IN_ARG_beta)) {
TEUCHOS_TEST_FOR_EXCEPTION(
varScalings.get_beta() > 0.0, std::logic_error,
"Error, can't hanlde unscaling of beta yet!"
);
origVars->set_beta(scaledVars.get_beta());
//.........这里部分代码省略.........