Template Class Signal

Inheritance Relationships

Base Type

Class Documentation

template<typename scalar_type, typename index_type>
class Signal : public GridKit::EMT::Component<scalar_type, index_type>

N signals, which are held or follow the output added to their residuals.

Public Functions

explicit Signal(const ModelDataT &data)

Construct N signals.

Layout: internal variable s of size N, with no terminal, input or output.

virtual Model::ConfigurationChecks verify() const override

Check that N is positive.

Returns:

The failed checks.

virtual int tagDifferentiable() override

Fill the tag() vector with proper indicators.

Note

For some models, this may be a no-op, and the vector returned by tag() will still be empty.

Pre:

allocate() must have been called.

template<typename T>
void internalResidual(const T *y, const T *yp, const T *w, const T *wp, T *f) const

Write the residual of s: minus its derivative if it is held, and otherwise minus s, to which the output it follows is added.