Template Class EvaluationContext

Class Documentation

template<typename VectorType>
class EvaluationContext

Inputs shared by all contributors during one residual evaluation.

This is an evaluation-scoped view. It retains non-owning references to the supplied state accessors and must not be stored by a contributor or used after those accessors are destroyed.

Public Types

using HistoryQuery = std::function<VectorType(HistoryGroupId, double)>

Public Functions

inline EvaluationContext(const double time, const StateAccessor<VectorType> &state, const StateAccessor<VectorType> *state_derivative = nullptr, TermSelection terms = {}, HistoryQuery history_query = {})
EvaluationContext(double, StateAccessor<VectorType>&&, const StateAccessor<VectorType>* = nullptr, TermSelection = {}, HistoryQuery = {}) = delete
EvaluationContext(double, const StateAccessor<VectorType>&&, const StateAccessor<VectorType>* = nullptr, TermSelection = {}, HistoryQuery = {}) = delete
inline double time() const
inline const StateAccessor<VectorType> &state() const
inline const StateAccessor<VectorType> *state_derivative() const
inline const VectorType &state(const FieldId field_id) const

Return the current value of one semantic field.

inline const VectorType &derivative(const FieldId field_id) const

Return the current derivative of one semantic field.

inline bool has_state_derivative() const
inline const TermSelection &terms() const
inline bool has_history() const
inline VectorType historical_state(const HistoryGroupId group, const double time) const