3.11 inte3dface – Half-space intersection for planar polygons¶
The inte3dface routine computes the intersection between an arbitrary oriented planar polygon (which can be either convex or non-convex) and a half-space. This routine is particularly useful in unsplit advection schemes based on the WATIA methodology, where accurate calculation of face intersections is critical. The retained region corresponds to the half-space \(\mathbf n\cdot\mathbf x+\texttt{c}>0\).
\(\,\)
Fortran:
call inte3dface(c,icontn,icontp,ipv,ntp,ntv,vertp,xnc,ync,znc)
C:
inte3dface(&c,&icontn,&icontp,ipv,&ntp,&ntv,vertp,&xnc,&ync,&znc);
Python:
ntp = np.array(ntp, dtype=np.int32)
ntv = np.array(ntv, dtype=np.int32)
(icontn,icontp) = voft.inte3dface(c,ipv,ntp,ntv,vertp,xnc,ync,znc)
Arguments:
|
|
|
scalar representing the signed distance from the PLIC interface to the origin along the normal vector \(\boldsymbol{n}\) |
|
|
|
number of original polygon vertices satisfying \(\mathbf n\cdot\mathbf x+\texttt{c}\leq0\) |
|
|
|
number of original polygon vertices satisfying \(\mathbf n\cdot\mathbf x+\texttt{c}>0\) |
|
|
|
array of length |
|
|
|
maximum vertex index in the connectivity list; updated after truncation |
|
|
|
total number of vertices; updated after truncation |
|
|
|
array of dimensions \(({nv},3)\) storing the \(x,y,z\)-coordinates of each vertex; updated for the truncated geometry |
|
|
|
\(x,y,z\)-components of the unit-length vector \(\boldsymbol{n}\) normal to the PLIC interface pointing towards the liquid phase |
Note: The geometry is updated only when both icontp and icontn are positive. If \(\texttt{icontn}=0\), the entire polygon is retained and the geometry remains unchanged. If \(\texttt{icontp}=0\), the retained area is zero, but the geometry arrays and size parameters also remain unchanged. The caller must therefore check these counters before computing the retained area or exporting the resulting geometry.