Template Class ModelEvaluatorImpl

Inheritance Relationships

Base Type

Derived Types

Class Documentation

template<class ScalarT, typename IdxT>
class ModelEvaluatorImpl : public GridKit::Model::Evaluator<ScalarT, IdxT>

Model implementation base class.

Subclassed by GridKit::BaseBus< ScalarT, IdxT >, GridKit::Branch< ScalarT, IdxT >, GridKit::Generator2< ScalarT, IdxT >, GridKit::Generator4< ScalarT, IdxT >, GridKit::Generator4Governor< ScalarT, IdxT >, GridKit::Generator4Param< ScalarT, IdxT >, GridKit::GeneratorBase< ScalarT, IdxT >, GridKit::Load< ScalarT, IdxT >, GridKit::MiniGrid< ScalarT, IdxT >, GridKit::SystemModel< ScalarT, IdxT >, GridKit::SystemSteadyStateModel< ScalarT, IdxT >

Public Functions

inline virtual IdxT size()

How many variables exist in the model.

inline virtual IdxT nnz()

How many non-zero elements are in this model’s Jacobian.

This knowledge may be needed to allocate the buffers for the model’s Jacobian, so it it should not depend on allocate() having been called.

See also

getCsrJacobian()

inline virtual bool hasJacobian()

Is the Jacobian defined. Used in IDA to determine whether DQ is used or not.

Returns:

true

Returns:

false

inline virtual std::vector<bool> &tag()

An indicator for which variables in the model are differential (true) or algebraic (false).

This information may be required for certain integrator features (such as the AnalysisManager::NativeDynamicSolver::Rosenbrock integrator), but is not required to be set. A reference to an empty vector may be returned.

Pre:

tagDifferentiable() must have been called.

inline virtual VectorT &absoluteTolerance()

Get the absolute tolerance for each variable in the model.

Returns:

a reference to the absolute tolerance vector.

Pre:

setAbsoluteTolerance must have been called first.

inline virtual const VectorT &absoluteTolerance() const

Get the absolute tolerance for each variable in the model.

Returns:

a const reference to the absolute tolerance vector.

Pre:

setAbsoluteTolerance must have been called first.