Skip to content

meta(grids): non-box domains and richer boundary conditions — geometry seam, mask, Robin, tensor diffusion #80

Description

@kylebeggs

Umbrella for the four issues that extend the package beyond "axis-aligned box, scalar κ, Dirichlet/Neumann/Periodic". The comment threads already tie them together: #61's binary mask is the φ ∈ {0,1} special case of #69's phase-field candidate; Robin on an irregular domain is #62#69; #70's face-averaging policy depends on whether the coefficient Diffusion carries becomes φD.

Sub-issues, in order

  1. feat(grids): finite differences on non-trivial geometry — pick the seam #69 — pick the geometry seam (staircase mask / Shortley–Weller / generalized FD / level-set / phase-field). An investigation with a convergence study, not a build. Its answer decides the shape of feat(grids): active-cell mask so stencil operators can skip inactive cells #61: an active::Field{Bool} and a φ::Field{T} want to be the same seam.
  2. feat(grids): active-cell mask so stencil operators can skip inactive cells #61 — active-cell mask on CartesianGrid. Unblocks the downstream microvascular model; per-cell operator_diagonal has a closed form under mirroring.
  3. feat(boundaries): Robin BC (a·u + b·∂u/∂n = c) #62 — Robin BC on the six box faces. Self-contained; the per-face Field coefficient question is the real design call. Prior art for the irregular-domain version is shared with feat(grids): finite differences on non-trivial geometry — pick the seam #69 option 4.
  4. feat(operators): anisotropic diffusion ∇·(D∇u) with a full tensor D #70 — anisotropic tensor diffusion. Stage 1 (tensor_field, lift the two scalar-eltype guards) can proceed at any time; stages 2–3 (tensor face averaging, cross-derivative terms) wait on feat(grids): finite differences on non-trivial geometry — pick the seam #69 because the averaging policy for φD across a geometric interface differs from D across a fiber-orientation jump.

Invariants that bind every sub-issue

  • Leaf bodies stay array-level; a per-cell variable stencil is the thing to avoid, and an index-driven gather is the way to avoid it.
  • apply_adjoint! remains the exact discrete transpose, checked by ⟨Lx,y⟩ = ⟨x,Lᵀy⟩ on a materialized small problem. Corner ghosts on forests and slabs are garbage by design today; a cross-derivative leaf needs the corner-aware exchange before it touches those paths.
  • operator_diagonal becomes per-cell; multigrid depends on it.
  • Uniform CartesianGrid first for every item. Masked or tensor BlockForest / slabs are follow-ups.

🤖 Beep boop — Claude filed the umbrella; Kyle is not standing under it talking to himself.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions