Sundance::EvalContext Class Reference

List of all members.

Public Member Functions

 EvalContext ()
 EvalContext (const RegionQuadCombo &rqc, const Set< int > &needsDiffOrder, int contextID)
void setSetupVerbosity (int v) const
int setupVerbosity () const
void setEvalSetupVerbosity (int v) const
int evalSetupVerbosity () const
bool operator< (const EvalContext &other) const
std::string toString () const
std::string brief () const
int topLevelDiffOrder () const
bool needsDerivOrder (int order) const

Static Public Member Functions

static int nextID ()

Private Attributes

int setupVerbosity_
int evalSetupVerbosity_
int maxDiffOrder_
RCP< OrderedTriple< Set< int >
, int, RegionQuadCombo > > 
data_

Related Functions

(Note that these are not member functions.)

ostream & operator<< (std::ostream &os, const Sundance::EvalContext &c)
std::string toString (const Sundance::EvalContext &h)


Detailed Description

Different contexts might require the same expression to be evaluated to different orders of functional differentiation; for example, in setting up a linear system, second-order derivatives are required, but in evaluating a functional only zeroth derivs are required. An EvaluationContext is used as a key to associate an evaluator and its corresponding set of functional derivatives with a context.

They key consists of three parts: first, an integer identifier indicating the caller, e.g., an assembler or functional evaluator, second, a set indicating which orders of differentiation are required by the top level caller, and third, a region-quadrature combination.

Definition at line 64 of file SundanceEvalContext.hpp.


Constructor & Destructor Documentation

Sundance::EvalContext::EvalContext (  )  [inline]

Empty ctor

Definition at line 68 of file SundanceEvalContext.hpp.

Sundance::EvalContext::EvalContext ( const RegionQuadCombo rqc,
const Set< int > &  needsDiffOrder,
int  contextID 
) [inline]

Construct with a region-quadrature combination and an identifier of the construcing context.

Definition at line 74 of file SundanceEvalContext.hpp.


Member Function Documentation

std::string Sundance::EvalContext::brief (  )  const [inline]

Write a short description to a std::string

Definition at line 111 of file SundanceEvalContext.hpp.

References data_, Teuchos::toString(), and toString().

int Sundance::EvalContext::evalSetupVerbosity (  )  const [inline]

bool Sundance::EvalContext::needsDerivOrder ( int  order  )  const [inline]

Indicate whether or not a given order of differentiation is needed in this context

Definition at line 123 of file SundanceEvalContext.hpp.

References data_.

Referenced by Sundance::SymbPreprocessor::setupVariations().

static int Sundance::EvalContext::nextID (  )  [inline, static]

Return a unique context ID

Definition at line 127 of file SundanceEvalContext.hpp.

Referenced by Sundance::EquationSet::init().

bool Sundance::EvalContext::operator< ( const EvalContext other  )  const [inline]

Comparison operator for use in maps

Definition at line 99 of file SundanceEvalContext.hpp.

References data_.

void Sundance::EvalContext::setEvalSetupVerbosity ( int  v  )  const [inline]

Set the verbosity level to be used during setup of evaluators for expressions in this context

Definition at line 92 of file SundanceEvalContext.hpp.

References evalSetupVerbosity_.

Referenced by Sundance::EquationSet::init().

void Sundance::EvalContext::setSetupVerbosity ( int  v  )  const [inline]

Set the verbosity level to be used during preprocessing of expressions in this context

Definition at line 84 of file SundanceEvalContext.hpp.

References setupVerbosity_.

Referenced by Sundance::EquationSet::init(), and Sundance::SymbPreprocessor::setupVariations().

int Sundance::EvalContext::setupVerbosity (  )  const [inline]

Return the verbosity level to be used during preprocessing of expressions in this context

Definition at line 88 of file SundanceEvalContext.hpp.

References setupVerbosity_.

Referenced by Sundance::CellDiameterExprEvaluator::CellDiameterExprEvaluator(), Sundance::CellVectorEvaluator::CellVectorEvaluator(), Sundance::ChainRuleEvaluator::ChainRuleEvaluator(), Sundance::EvaluatableExpr::computeInputR(), Sundance::ConstantEvaluator::ConstantEvaluator(), Sundance::CoordExprEvaluator::CoordExprEvaluator(), Sundance::CurveNormEvaluator::CurveNormEvaluator(), Sundance::DerivOfSymbFuncEvaluator::DerivOfSymbFuncEvaluator(), Sundance::DiffOpEvaluator::DiffOpEvaluator(), Sundance::ExprWithChildren::displayNonzeros(), Sundance::EvaluatableExpr::findDerivSubset(), Sundance::ExprWithChildren::findQ_W(), Sundance::ChainRuleEvaluator::init(), Sundance::SymbolicFuncElement::internalDetermineR(), Sundance::ExprWithChildren::internalDetermineR(), Sundance::ExplicitFunctionalDerivativeElement::internalDetermineR(), Sundance::EvaluatableExpr::internalDetermineR(), Sundance::DiscreteFuncElement::internalDetermineR(), Sundance::DiffOp::internalDetermineR(), Sundance::ZeroExpr::internalFindC(), Sundance::UnknownParameterElement::internalFindC(), Sundance::SymbolicFuncElement::internalFindC(), Sundance::ExprWithChildren::internalFindC(), Sundance::ExplicitFunctionalDerivativeElement::internalFindC(), Sundance::DiscreteFuncElement::internalFindC(), Sundance::DiffOp::internalFindC(), Sundance::ConstantExpr::internalFindC(), Sundance::ProductExpr::internalFindQ_V(), Sundance::ExprWithChildren::internalFindQ_V(), Sundance::UnaryMinus::internalFindQ_W(), Sundance::ProductExpr::internalFindQ_W(), Sundance::ExprWithChildren::internalFindQ_W(), Sundance::UnknownParameterElement::internalFindV(), Sundance::SymbolicFuncElement::internalFindV(), Sundance::ExprWithChildren::internalFindV(), Sundance::ExplicitFunctionalDerivativeElement::internalFindV(), Sundance::DiscreteFuncElement::internalFindV(), Sundance::DiffOp::internalFindV(), Sundance::ConstantExpr::internalFindV(), Sundance::ZeroExpr::internalFindW(), Sundance::UnknownParameterElement::internalFindW(), Sundance::SymbolicFuncElement::internalFindW(), Sundance::ExprWithChildren::internalFindW(), Sundance::ExplicitFunctionalDerivativeElement::internalFindW(), Sundance::DiscreteFuncElement::internalFindW(), Sundance::DiffOp::internalFindW(), Sundance::ConstantExpr::internalFindW(), Sundance::DiffOp::requestMultiIndexAtEvalPoint(), Sundance::SymbPreprocessor::setupVariations(), and Sundance::EvaluatableExpr::sparsitySuperset().

int Sundance::EvalContext::topLevelDiffOrder (  )  const [inline]

std::string Sundance::EvalContext::toString (  )  const [inline]

Write to a std::string

Definition at line 103 of file SundanceEvalContext.hpp.

References data_, and Teuchos::toString().

Referenced by brief(), operator<<(), and toString().


Friends And Related Function Documentation

ostream & operator<< ( std::ostream &  os,
const Sundance::EvalContext c 
) [related]

Definition at line 141 of file SundanceEvalContext.hpp.

References toString().

std::string toString ( const Sundance::EvalContext h  )  [related]


Member Data Documentation

Definition at line 132 of file SundanceEvalContext.hpp.

Referenced by brief(), needsDerivOrder(), operator<(), and toString().

Definition at line 130 of file SundanceEvalContext.hpp.

Referenced by evalSetupVerbosity(), and setEvalSetupVerbosity().

Definition at line 131 of file SundanceEvalContext.hpp.

Referenced by topLevelDiffOrder().

Definition at line 129 of file SundanceEvalContext.hpp.

Referenced by setSetupVerbosity(), and setupVerbosity().

Site Contact