Table of Contents

Class CraigSneydScheme

Namespace
NanoQL.Methods
Assembly
NanoQL.dll

The Craig-Sneyd operator-splitting scheme: the Douglas step, then a second predictor on the operator's mixed part weighted by μ and a second round of implicit corrections.

[WorkingType]
public sealed class CraigSneydScheme : IFdmScheme
Inheritance
CraigSneydScheme
Implements
Inherited Members

Remarks

A working type: Step(Span<double>, double) steps the caller's values in place through buffers the scheme holds, so a step allocates nothing after the first. TR-BDF2 drives it as its trapezoidal sub-scheme, on an operator set over TR-BDF2's whole step.

Constructors

CraigSneydScheme(double, double, FdmLinearOpComposite, ImmutableArray<BoundaryCondition<FdmLinearOp>>)

Initializes a new instance of the CraigSneydScheme class.

public CraigSneydScheme(double theta, double mu, FdmLinearOpComposite map, ImmutableArray<BoundaryCondition<FdmLinearOp>> bcSet = default)

Parameters

theta double

The implicit corrections' weight.

mu double

The second predictor's weight.

map FdmLinearOpComposite

The operator.

bcSet ImmutableArray<BoundaryCondition<FdmLinearOp>>

The boundary conditions; default or empty for none.

Exceptions

ArgumentNullException

map is null.

ArgumentException

A boundary condition is null.

Methods

SetStep(double)

Sets the step's length.

public void SetStep(double dt)

Parameters

dt double

The length.

Step(Span<double>, double)

Steps the values back from time t by the set step, in place.

public void Step(Span<double> a, double t)

Parameters

a Span<double>

The values.

t double

The time the step starts from.

Exceptions

ArgumentException

The step would end before time 0.

NanoQLException

A direction's system can't be solved.