pub struct ReflectedHeatChernoff<C, R, F = f64>{
pub region: R,
/* private fields */
}Expand description
Chernoff wrapper for Neumann (reflecting) BCs via the image method.
F_refl(τ) f = C(τ)f + C(τ)(f ∘ σ_R) (Walsh 1986 §3.4, math.md §25.3).
order() returns inner.order(): reflection preserves order for symmetric
(Neumann) BCs (Proposition 25.1 — commutator vanishes).
§v2.8 scope
Concrete ChernoffFunction<f64> impl for:
ReflectedHeatChernoff<DiffusionChernoff<f64>, HalfSpaceRegion<f64, 1>>.
Generic-C impls deferred to v2.9 (requires CoordinateState<F, D> supertrait).
Fields§
§region: RThe reflecting region. Stored for future multi-D GridFn2D/GridFn3D
impls (deferred to v2.9) and for public inspection by callers.
Implementations§
Source§impl<C, R, F> ReflectedHeatChernoff<C, R, F>
impl<C, R, F> ReflectedHeatChernoff<C, R, F>
Sourcepub fn new(inner: C, region: R) -> Result<Self, SemiflowError>
pub fn new(inner: C, region: R) -> Result<Self, SemiflowError>
Wrap inner Chernoff function with reflecting region region.
§Errors
Returns Err if the inner or region is invalid; always Ok for
pre-validated inputs.
Trait Implementations§
Source§impl ChernoffFunction for ReflectedHeatChernoff<DiffusionChernoff<f64>, HalfSpaceRegion<f64, 1>, f64>
Image-method apply_into for the D=1 half-space on a one-sided grid.
impl ChernoffFunction for ReflectedHeatChernoff<DiffusionChernoff<f64>, HalfSpaceRegion<f64, 1>, f64>
Image-method apply_into for the D=1 half-space on a one-sided grid.
§Implementation note (half-line [0, L] grid)
math.md §25.3 specifies a 4-step full-line algorithm where the ghost
h = f ∘ σ_R has support at the OUTSIDE (negative-x) nodes of a full-line
grid. For the common case of a one-sided grid [0, L] (all nodes inside R),
there are no outside nodes, so ghost = 0 and the 4-step algorithm reduces
to a plain inner Chernoff step — NOT the correct Neumann semigroup.
The correct Neumann semigroup on a [0, L] half-line grid is obtained by
replacing src.grid.boundary with BoundaryPolicy::Reflect before the
inner Chernoff step. This gives the DiffusionChernoff stencil access to the
even extension of src at the left boundary (x = 0), which is exactly what
the full-line image method computes when restricted to x ∈ [0, L].
Equivalence proof sketch (single node x = 0, pure-heat stencil):
Full-line image method at x = 0:
step1 = W0*f(0) + W1*f(h) + W2*f(h') (src = 0 for x < 0)
step3 = W1*f(h) + W2*f(h') (ghost = f(|x|) for x < 0)
sum = W0*f(0) + 2*W1*f(h) + 2*W2*f(h')
Half-line Reflect step at x = 0:
C_reflect*f(0) = W0*f(0) + W1*(f(h) + f(h)) + W2*(f(h') + f(h'))
= W0*f(0) + 2*W1*f(h) + 2*W2*f(h') == sumThe equivalence holds at every grid node (interior nodes are unaffected by boundary policy for small tau).
Source§fn growth(&self) -> Growth<f64>
fn growth(&self) -> Growth<f64>
Growth: (inner_M, inner_ω) — no doubling on a one-sided grid because
the Reflect-boundary step is a single contraction of the inner Chernoff.
Source§fn apply_into(
&self,
tau: f64,
src: &Self::S,
dst: &mut Self::S,
scratch: &mut ScratchPool<f64>,
) -> Result<(), SemiflowError>
fn apply_into( &self, tau: f64, src: &Self::S, dst: &mut Self::S, scratch: &mut ScratchPool<f64>, ) -> Result<(), SemiflowError>
dst := S(tau) src. Caller provides pre-allocated
dst and a scratch pool for hot-path temporaries (ADR-0041 Wave 1). Read moreSource§fn apply_adjoint_into(
&self,
tau: F,
src: &Self::S,
dst: &mut Self::S,
scratch: &mut ScratchPool<F>,
) -> Result<(), SemiflowError>
fn apply_adjoint_into( &self, tau: F, src: &Self::S, dst: &mut Self::S, scratch: &mut ScratchPool<F>, ) -> Result<(), SemiflowError>
Source§fn plan_len(&self, tau: F, proto: &Self::S) -> Option<(usize, usize)>
fn plan_len(&self, tau: F, proto: &Self::S) -> Option<(usize, usize)>
(data, work) of a τ-keyed step plan for states shaped like proto
(ADR-0215), or None (default) when the engine has no plan. Read moreSource§fn apply_planned_into(
&self,
tau: F,
data: &[F],
work: &mut [F],
src: &Self::S,
dst: &mut Self::S,
scratch: &mut ScratchPool<F>,
) -> Result<(), SemiflowError>
fn apply_planned_into( &self, tau: F, data: &[F], work: &mut [F], src: &Self::S, dst: &mut Self::S, scratch: &mut ScratchPool<F>, ) -> Result<(), SemiflowError>
dst := S(τ) src with a plan data filled by THIS engine for τ, and a
work area of length plan_len(..).1. A plan that does not match — another
τ, sampling grid, length or engine state, or a truncated buffer — falls
back to apply_into. Default: apply_into. Read moreSource§impl<C, R, F> Clone for ReflectedHeatChernoff<C, R, F>where
C: ChernoffFunction<F, S = GridFn1D<F>> + Clone,
R: ReflectingRegion<F> + Clone,
F: SemiflowFloat + Clone,
impl<C, R, F> Clone for ReflectedHeatChernoff<C, R, F>where
C: ChernoffFunction<F, S = GridFn1D<F>> + Clone,
R: ReflectingRegion<F> + Clone,
F: SemiflowFloat + Clone,
Source§impl<C, R, F> Debug for ReflectedHeatChernoff<C, R, F>where
C: ChernoffFunction<F, S = GridFn1D<F>> + Debug,
R: ReflectingRegion<F> + Debug,
F: SemiflowFloat + Debug,
impl<C, R, F> Debug for ReflectedHeatChernoff<C, R, F>where
C: ChernoffFunction<F, S = GridFn1D<F>> + Debug,
R: ReflectingRegion<F> + Debug,
F: SemiflowFloat + Debug,
Auto Trait Implementations§
impl<C, R, F> Freeze for ReflectedHeatChernoff<C, R, F>
impl<C, R, F> RefUnwindSafe for ReflectedHeatChernoff<C, R, F>
impl<C, R, F> Send for ReflectedHeatChernoff<C, R, F>
impl<C, R, F> Sync for ReflectedHeatChernoff<C, R, F>
impl<C, R, F> Unpin for ReflectedHeatChernoff<C, R, F>
impl<C, R, F> UnsafeUnpin for ReflectedHeatChernoff<C, R, F>
impl<C, R, F> UnwindSafe for ReflectedHeatChernoff<C, R, F>
Blanket Implementations§
Source§impl<C, F> Adjointable<F, 1> for Cwhere
C: ChernoffFunction<F>,
F: SemiflowFloat,
impl<C, F> Adjointable<F, 1> for Cwhere
C: ChernoffFunction<F>,
F: SemiflowFloat,
Source§fn apply_adjoint_into(
&self,
tau: F,
a: F,
b: F,
c: F,
src: &MeasureState<F, 1>,
dst: &mut MeasureState<F, 1>,
) -> Result<(), SemiflowError>
fn apply_adjoint_into( &self, tau: F, a: F, b: F, c: F, src: &MeasureState<F, 1>, dst: &mut MeasureState<F, 1>, ) -> Result<(), SemiflowError>
Source§impl<C, F> ApplyChernoffExt<F> for C
impl<C, F> ApplyChernoffExt<F> for C
Source§fn apply_chernoff(
&self,
tau: F,
src: &Self::S,
) -> Result<Self::S, SemiflowError>
fn apply_chernoff( &self, tau: F, src: &Self::S, ) -> Result<Self::S, SemiflowError>
S(tau) src as a fresh state. Read more