Class FixedTrapezoidal.Instance.DerivativeInstance
An IDerivative for FixedTrapezoidal.
Implements
Inherited Members
Namespace: SpiceSharp.Simulations.IntegrationMethods
Assembly: SpiceSharp.dll
Syntax
protected class FixedTrapezoidal.Instance.DerivativeInstance : IDerivative
Constructors
DerivativeInstance(Instance, int)
Creates a new FixedTrapezoidal.Instance.DerivativeInstance.
Declaration
public DerivativeInstance(FixedTrapezoidal.Instance method, int index)
Parameters
Type | Name | Description |
---|---|---|
FixedTrapezoidal.Instance | method | The integration method. |
int | index | The index. |
Properties
Derivative
Gets the current derivative.
Declaration
public double Derivative { get; }
Property Value
Type | Description |
---|---|
double | The derivative. |
Value
Gets or sets the current value.
Declaration
public double Value { get; set; }
Property Value
Type | Description |
---|---|
double | The value. |
Methods
Derive()
Integrates the state (calculates the derivative from the value).
Declaration
public void Derive()
GetContributions(double)
Gets the Y-matrix value and Rhs-vector contributions for the derived quantity. The relationship is assumed to be linear.
Declaration
public JacobianInfo GetContributions(double coefficient)
Parameters
Type | Name | Description |
---|---|---|
double | coefficient | The coefficient of the quantity that is derived. |
Returns
Type | Description |
---|---|
JacobianInfo | The information for filling in the Y-matrix and Rhs-vector. |
GetContributions(double, double)
Gets the Y-matrix value and Rhs-vector contributions for the derived quantity.
Declaration
public JacobianInfo GetContributions(double coefficient, double currentValue)
Parameters
Type | Name | Description |
---|---|---|
double | coefficient | The coefficient of the quantity that is derived. |
double | currentValue | The current value of the derived state. |
Returns
Type | Description |
---|---|
JacobianInfo | The information for filling in the Y-matrix and Rhs-vector. |
GetPreviousDerivative(int)
Gets a previous derivative. An index of 0 indicates the current value.
Declaration
public double GetPreviousDerivative(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The number of points to go back in time. |
Returns
Type | Description |
---|---|
double | The previous derivative. |
GetPreviousValue(int)
Gets a previous value. An index of 0 indicates the current value.
Declaration
public double GetPreviousValue(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index. |
Returns
Type | Description |
---|---|
double | The previous value. |