Interface IIntegral
Describes a state with a derivative that can also calculate the integrated value with respect tjo time.
Namespace: SpiceSharp.Simulations
Assembly: SpiceSharp.dll
Syntax
public interface IIntegral
Properties
Derivative
Gets or sets the current derivative.
Declaration
double Derivative { get; set; }
Property Value
Type | Description |
---|---|
double | The derivative. |
Value
Gets the current value.
Declaration
double Value { get; }
Property Value
Type | Description |
---|---|
double | The value. |
Methods
GetContributions(double)
Gets the Y-matrix value and Rhs-vector contributions for the derived quantity. The relationship is assumed to be linear.
Declaration
JacobianInfo GetContributions(double coefficient)
Parameters
Type | Name | Description |
---|---|---|
double | coefficient | The coefficient of the quantity that is integrated. |
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 integrated quantity.
Declaration
JacobianInfo GetContributions(double coefficient, double currentValue)
Parameters
Type | Name | Description |
---|---|---|
double | coefficient | The coefficient of the quantity that is integrated. |
double | currentValue | The current value of the integrated state. |
Returns
Type | Description |
---|---|
JacobianInfo | The information for fijlling in the Y-matrix and Rhs-vector. |
GetPreviousDerivative(int)
Gets a previous derivative. An index of 0 indicates the current derivative.
Declaration
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 value. |
GetPreviousValue(int)
Gets a previous value. An index of 0 indicates the current value.
Declaration
double GetPreviousValue(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The number of points to go back in time. |
Returns
Type | Description |
---|---|
double | The previous value. |
Integrate()
Integrates the state (calculates the value from the derivative).
Declaration
void Integrate()