Class ModifiedCraigSneydScheme
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
thetadoubleThe implicit corrections' weight.
mudoubleThe mixed part's weight in the second predictor.
mapFdmLinearOpCompositeThe operator.
bcSetImmutableArray<BoundaryCondition<FdmLinearOp>>The boundary conditions;
defaultor empty for none.
Exceptions
- ArgumentNullException
mapis null.- ArgumentException
A boundary condition is null.
Methods
SetStep(double)
Sets the step's length.
public void SetStep(double dt)
Parameters
dtdoubleThe 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
Exceptions
- ArgumentException
The step would end before time 0.
- NanoQLException
A direction's system can't be solved.