Module stencil::region [] [src]

Line regions for fixed boundary condition

Data Layout

  • Open: x_i = (i+1)L / (N+1)
  • Closed: x_i = iL / (N-1), with fixed values x_0 = x_L, x_{N-1} = x_R

These are used for implementing Manifold trait.

This example is not tested
xxx---------xxx  Line<A, P3, Open>(N=9)
xxo---------oxx  Line<A, P2, Closed>(N=11)
  |<-- L -->|    dx = L/10

Examples

// closed line with one-padding:
let mut a = Line::<f64, P1, Closed>::new(128, 0.0, 0.0, 2.0);
// open line with two-padding:
let mut a = Line::<f64, P2, Open>::new(128, 0.0, 0.0, 2.0);

Structs

Closed

Marker trait for closed-edge

Line

One-dimensional line with finite length

Open

Marker trait for open-edge

Traits

Edge

Marker trait for boundary edge.