Table of Contents

Class FdmDirichletBoundary

Namespace
NanoQL.Methods
Assembly
NanoQL.dll

A Dirichlet boundary condition: a fixed value on one side of one direction of the grid, written into the solution after each application of the operator and each solve.

public sealed class FdmDirichletBoundary : BoundaryCondition<FdmLinearOp>
Inheritance
FdmDirichletBoundary
Inherited Members

Remarks

Immutable, its indices fixed at construction; the schemes call it in QuantLib's order, and it writes into the caller's span, allocating nothing.

Constructors

FdmDirichletBoundary(FdmMesher, double, int, BoundaryConditionSide)

Initializes a new instance of the FdmDirichletBoundary class.

public FdmDirichletBoundary(FdmMesher mesher, double valueOnBoundary, int direction, BoundaryConditionSide side)

Parameters

mesher FdmMesher

The mesher.

valueOnBoundary double

The value on the boundary.

direction int

The direction.

side BoundaryConditionSide

The side: Lower or Upper.

Exceptions

ArgumentNullException

mesher is null.

ArgumentOutOfRangeException

The direction isn't one of the mesher's, where QuantLib reads past its vectors' ends.

ArgumentException

The side is None, with QuantLib's "internal error".

Methods

ApplyAfterApplying(double, double)

A value at a location, the boundary's value beyond the boundary's extreme location and the given value inside.

public double ApplyAfterApplying(double x, double value)

Parameters

x double

The location.

value double

The value.

Returns

double

The boundary's value below a lower boundary or above an upper one; otherwise the value.

ApplyAfterApplying(Span<double>)

Modifies values u, in place, so that they satisfy the condition.

public override void ApplyAfterApplying(Span<double> a)

Parameters

a Span<double>

The values.

Exceptions

ArgumentException

a doesn't reach the boundary's last index, where QuantLib writes past its end.

ApplyAfterSolving(Span<double>)

Modifies values u, in place, so that they satisfy the condition.

public override void ApplyAfterSolving(Span<double> a)

Parameters

a Span<double>

The values.

Exceptions

ArgumentException

a doesn't reach the boundary's last index, where QuantLib writes past its end.

ApplyBeforeApplying(FdmLinearOp)

Modifies an operator L before it is applied to values u, so that v = Lu satisfies the condition.

public override void ApplyBeforeApplying(FdmLinearOp op)

Parameters

op FdmLinearOp

The operator.

ApplyBeforeSolving(FdmLinearOp, Span<double>)

Modifies an operator L and the right-hand side before the system Lu' = u is solved, so that u' satisfies the condition.

public override void ApplyBeforeSolving(FdmLinearOp op, Span<double> rhs)

Parameters

op FdmLinearOp

The operator.

rhs Span<double>

The right-hand side, modified in place.

SetTime(double)

Sets the current time of a time-dependent condition.

public override void SetTime(double t)

Parameters

t double

The time.