Reference
Contents
Index
API Reference
Vofinit.getcc — Function
getcc(func, x0, h0, xex, ndim0 = Cint(3); nex = Cint.((0, 0)), npt = Cint.((4, 4, 4, 4)), nvis = Cint.((0, 0)))Calculate the volume fraction of the cell using the VOFI algorithm.
Arguments
func: A function that takes three arguments (x, y, z) and returns aFloat64value. This function represents the level set function of the interface.x0: A tuple of threeFloat64values representing the coordinates of the minimum vertex of the cell.h0: A tuple of threeFloat64values representing the cell size in each dimension.xex: A tuple of threeFloat64values representing a flag to compute the centroid and interface length/area.ndim0: ACintvalue representing the number of dimensions (default is 3).npt: A tuple of fourCintvalues representing the number of points for the quadrature in each dimension.nvis: A tuple of twoCintvalues representing a flag for visualization output.
Returns
- A
Float64value representing the volume fraction of the cell.
Vofinit.getcelltype — Function
getcelltype(func, x0, h0, ndim0 = Cint(3))Determine the cell type based on the level set function.
Arguments
func: A function that takes three arguments (x, y, z) and returns aFloat64value. This function represents the level set function of the interface.x0: A tuple of threeFloat64values representing the coordinates of the minimum vertex of the cell.h0: A tuple of threeFloat64values representing the cell size in each dimension.ndim0: ACintvalue representing the number of dimensions (default is 3).
Returns
- A
Cintvalue representing the cell type, where 1 indicates a full cell, -1 indicates a cut cell, and 0 indicates an empty cell.