Table of Contents

Class ModifiedCraigSneydScheme

Namespace
NanoQL.Methods
Assembly
NanoQL.dll

The modified Craig-Sneyd operator-splitting scheme: the Craig-Sneyd step whose second predictor adds the whole operator weighted by ½ − μ to the mixed part weighted by μ.

[WorkingType]
public sealed class ModifiedCraigSneydScheme : IFdmScheme
Inheritance
ModifiedCraigSneydScheme
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.

Constructors

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

Initializes a new instance of the ModifiedCraigSneydScheme class.

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

Parameters

theta double

The implicit corrections' weight.

mu double

The mixed part's weight in the second predictor.

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.