3.9 intv3d – Half-space integration volume for arbitrary polyhedra¶
The intv3d routine computes the signed volume of the portion of a polyhedron lying in the half-space \(\mathbf n\cdot\mathbf x+\texttt{c}>0\). This corresponds to the liquid-side convention used by inte3d. The sign of the volume follows the boundary orientation convention described for toolv3d.
Fortran:
call intv3d(c,ipv,nipv,ntp,nts,vertp,vol,xnc,xns, &
ync,yns,znc,zns)
C:
intv3d(&c,ipv,nipv,&ntp,&nts,vertp,&vol,&xnc,xns,
&ync,yns,&znc,zns);
Python:
vol = voft.intv3d(c,ipv,nipv,ntp,nts,vertp,xnc,xns,ync,yns,znc,zns)
Arguments:
|
|
|
scalar representing the signed distance from the PLIC interface to the origin along the normal vector \(\boldsymbol{n}\) |
|
|
|
array of dimensions |
|
|
|
array of length \(\texttt{ns}\) storing the number of vertices per face boundary |
|
|
|
maximum vertex index in the connectivity list |
|
|
|
total number of face boundaries |
|
|
|
array of dimensions \((\texttt{nv},3)\) containing the vertex coordinates; rows beyond |
|
|
|
scalar representing the signed volume of the portion of the polyhedron lying within the half-space (liquid volume) |
|
|
|
\(x,y,z\)-components of the unit-length vector \(\boldsymbol{n}\) normal to the PLIC interface pointing towards the liquid phase |
|
|
|
arrays of length \(\texttt{ns}\) storing the \(x,y,z\)-components of the outward-pointing unit normal vector for each face boundary |
Note:¶
Unlike inte3d, this routine does not return a complete representation of the truncated geometry. The original connectivity, size parameters, face normals, and vertex coordinates up to index ntp remain unchanged. However, additional intersection coordinates may be written to vertp beyond ntp, so the array must have sufficient capacity. In Python, vertp must be a writable, Fortran-contiguous NumPy array of the required data type.