Class CraigSneydScheme
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
thetadoubleThe implicit corrections' weight.
mudoubleThe second predictor's weight.
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.