Template Class Inductor

Inheritance Relationships

Base Type

Class Documentation

template<class ScalarT, typename IdxT>
class Inductor : public GridKit::CircuitComponent<ScalarT, IdxT>

Declaration of a Inductor class.

Public Functions

virtual int allocate() final

Allocates all of the internal buffers for the component. If a components needs a more specialized allocation (such as by having additional internal buffers), it should override this function and then call it in the body to ensure it stays up-to-date with new implementations.

Pre:

nnz_ and size_ must be set. Typically these are set by the child object in its constructor.

Returns:

An error code, or 0 if success

virtual int setAbsoluteTolerance(RealT)

Compute the absolute tolerance for each variable in the model.

This represents a “noise” level close to zero for which pure relative error cannot be used.

Parameters:

rel_tol – The relative tolerance which can be used to pick the absolute tolerance.

Returns:

int 0 if successful, non-zero otherwise.

virtual int evaluateInternalResidual() final

Evaluate all of the residuals of internal variables of the component, modifying f_.

Returns:

An error code, or 0 if successful.

virtual int evaluateExternalResidual() final

Evaluate all of the residuals of external variables of the component, modifying f_.

Returns:

An error code, or 0 if successful.