Skip to content
Projects

Cut edges

The equations of simgeometry.cut_edges, declared on the code that implements them and checked by the tests.

bracketed_edge_geometry

functionsource

Vectorized edge bisections used by embedded-boundary finite differences.

solid
solid=⋃kMk,owner(i)=max⁡{k:i∈Mk}\text{solid} = \bigcup_k M_k, \qquad \text{owner}(i) = \max\{k : i \in M_k\}
cut
f(a,±)(i)=fraction from fluid node i towards its solid neighbour i±ea,NaN where uncutf_{(a, \pm)}(i) = \text{fraction from fluid node } i \text{ towards its solid neighbour } i \pm e_a, \quad \text{NaN where uncut}
Assumes
  • node masks MkM_k per object, the last listed object owning an overlap
  • every edge from a fluid node to a solid neighbour is one outside-to-inside bracket, located by intersection_fractions against the neighbour's owner
  • periodic axes roll the masks and wrap the probe points
  • no boundary values, stencil weights or minimum-distance clamps
Built from

cut_edges

functionsource

Find all surface crossings, including objects between two fluid nodes.

hits
t∈[0,1]: all hits of xi+t h ea, merged closer than 10−10t \in [0, 1]: \text{ all hits of } x_i + t\,h\,e_a, \text{ merged closer than } 10^{-10}
entering
entering=[p(t+δ)∈S]−[p(t−δ)∈S],δ=min⁡(10−7,Δt/4)\text{entering} = [p(t + \delta) \in S] - [p(t - \delta) \in S], \qquad \delta = \min(10^{-7}, \Delta t / 4)
Assumes
  • the diagnostic path: every edge of the grid, all hits of intersect_segment, sorted by axis, lower node and fraction
  • analytic for primitives on nonperiodic edges, sampled (samples per edge) otherwise; features narrower than a sampling interval can be missed