Show / Hide Table of Contents

Interface IIntegrationMethod

An interface describing an integration method.

Namespace: SpiceSharp.Simulations
Assembly: SpiceSharp.dll
Syntax
public interface IIntegrationMethod : ISimulationState

Properties

BaseTime

Gets the base timepoint in seconds from which the current timepoint is being probed.

Declaration
double BaseTime { get; }
Property Value
Type Description
double

The base time.

MaxOrder

Gets the maximum order of the integration method.

Declaration
int MaxOrder { get; }
Property Value
Type Description
int

The maximum order.

Order

Gets or sets the current order of the integration method.

Declaration
int Order { get; set; }
Property Value
Type Description
int

The current order.

Slope

Gets the derivative factor of any quantity that is being derived by the integration method.

Declaration
double Slope { get; }
Property Value
Type Description
double

The slope.

Time

Gets the currently probed timepoint in seconds.

Declaration
double Time { get; }
Property Value
Type Description
double

The current time.

Methods

Accept()

Accepts a solution at the current timepoint.

Declaration
void Accept()

CreateDerivative(bool)

Creates a derivative.

Declaration
IDerivative CreateDerivative(bool track = true)
Parameters
Type Name Description
bool track

If set to true, the integration method will use this state to limit truncation errors.

Returns
Type Description
IDerivative

The derivative.

CreateIntegral(bool)

Creates an integrator.

Declaration
IIntegral CreateIntegral(bool track = true)
Parameters
Type Name Description
bool track

If set to true, the integration method will use this state to limit truncation errors.

Returns
Type Description
IIntegral

The integrator.

Evaluate(double)

Evaluates the current solution at the probed timepoint. If the solution is invalid, the analysis should roll back and try again.

Declaration
bool Evaluate(double maxTimestep)
Parameters
Type Name Description
double maxTimestep
Returns
Type Description
bool

true if the current solution is a valid solution; otherwise, false.

Exceptions
Type Condition
ArgumentException

Thrown if maxTimestep is not positive.

GetPreviousSolution(int)

Gets a previous solution used by the integration method. An index of 0 indicates the last accepted solution.

Declaration
IVector<double> GetPreviousSolution(int index)
Parameters
Type Name Description
int index

The number of points to go back.

Returns
Type Description
IVector<double>

The previous solution.

GetPreviousTimestep(int)

Gets a previous timestep. An index of 0 indicates the current timestep.

Declaration
double GetPreviousTimestep(int index)
Parameters
Type Name Description
int index

The number of points to go back.

Returns
Type Description
double

The previous timestep.

Initialize()

Initializes the integration method using the allocated biasing state. At this point, all entities should have received the chance to allocate and register integration states.

Declaration
void Initialize()

Prepare()

Prepares the integration method for calculating the next timepoint.

Declaration
void Prepare()

Probe()

Probes a new timepoint.

Declaration
void Probe()

RegisterState(IIntegrationState)

Registers an integration state with the integration method.

Declaration
void RegisterState(IIntegrationState state)
Parameters
Type Name Description
IIntegrationState state

The integration state.

Reject()

Rejects the last probed timepoint as a valid solution. This method can be called if no solution could be found (eg. due to non-convergence).

Declaration
void Reject()

Truncate(double)

Truncate the current timestep.

Declaration
void Truncate(double maxTimestep)
Parameters
Type Name Description
double maxTimestep
Exceptions
Type Condition
ArgumentException

Thrown if maxTimestep is not positive.

Extension Methods

Utility.ThrowIfNull<T>(T, string)

See Also

ISimulationState
In this article
Back to top Generated by DocFX