Show / Hide Table of Contents

Class Trapezoidal.Instance.DerivativeInstance

An IDerivative for Trapezoidal.

Inheritance
object
Trapezoidal.Instance.DerivativeInstance
Implements
IDerivative
ITruncatable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: SpiceSharp.Simulations.IntegrationMethods
Assembly: SpiceSharp.dll
Syntax
protected class Trapezoidal.Instance.DerivativeInstance : IDerivative, ITruncatable

Constructors

DerivativeInstance(Instance, int)

Initializes a new instance of the Trapezoidal.Instance.DerivativeInstance class.

Declaration
public DerivativeInstance(Trapezoidal.Instance method, int index)
Parameters
Type Name Description
Trapezoidal.Instance method

The integration method.

int index

The integrated value 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.

Truncate()

Truncates the current timestep.

Declaration
public double Truncate()
Returns
Type Description
double

The maximum timestep allowed by this instance.

Implements

IDerivative
ITruncatable

Extension Methods

Utility.ThrowIfNull<T>(T, string)

See Also

IDerivative
ITruncatable
In this article
Back to top Generated by DocFX