GridBoundaryCondition.Fill Method

Creates a boundary condition that uses a constant fill value for out-of-range samples.

Definition

Namespace: Numerics.NET.Curves.Surfaces
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0
C#
public static GridBoundaryCondition Fill(
	double value
)

Parameters

value  Double
The constant value to use when the stencil requires samples outside [0, N-1].

Return Value

GridBoundaryCondition
A boundary condition configured with the specified fill value.

Remarks

When an interpolation stencil requires a value at index i < 0 or i ≥ N, the specified constant value is returned instead of a grid value.

Effect: Out-of-range samples in the stencil are replaced with the constant value. This can create discontinuities or artifacts at grid edges, depending on the fill value.

Use cases:

  • Padding data with zeros or a known background value.
  • Isolating the grid interior from edge effects.
  • Simulating data embedded in a constant field.

Common values: 0.0 (zero padding), double.NaN (mark invalid regions), or a domain-specific background value.

See Also