![]() | ![]() | ![]() | Gerris Flow Solver Reference Manual | ![]() |
---|
#include <gfs.h> #define GFS_IS_FLUID (cell) #define GFS_IS_MIXED (cell) #define GFS_FACE_FRACTION (fa) struct GfsSolidVector;void gfs_cell_fluid (FttCell *cell);void gfs_cell_init_solid_fractions (FttCell *root,GtsSurface *s,GNode *stree,gboolean is_open,gboolean destroy_solid, FttCellCleanupFunc cleanup,gpointer data);void gfs_cell_init_solid_fractions_from_children (FttCell *cell);gboolean gfs_cell_check_solid_fractions (FttCell *root,GtsSurface *solid,GNode *stree,gboolean is_open);gboolean gfs_refine_mixed (const FttCell *cell);void gfs_cell_traverse_mixed (FttCell *root, FttTraverseType order, FttTraverseFlags flags, FttCellTraverseFunc func,gpointer data);
#define GFS_IS_FLUID(cell)
Evaluates to TRUE if cell is entirely contained in the fluid, FALSE otherwise.
cell : | a FttCell. |
#define GFS_IS_MIXED(cell)
Evaluates to TRUE if cell is partially contained in the fluid, FALSE otherwise.
cell : | a FttCell. |
struct GfsSolidVector { gdouble s[FTT_NEIGHBORS]; gdouble a, v, fv; FttCell * merged; FttVector cm, ca; };
Contains the surface and volume fractions of the cell not contained in the solid.
void gfs_cell_fluid (FttCell *cell);
Sets cell and all its descendants as full fluid cells.
cell : | a FttCell. |
void gfs_cell_init_solid_fractions (FttCell *root,GtsSurface *s,GNode *stree,gboolean is_open,gboolean destroy_solid, FttCellCleanupFunc cleanup,gpointer data);
Initializes the solid fractions of all the cells of the cell tree starting at root.
If destroy_solid is set to TRUE, the cells entirely contained in the solid are destroyed using cleanup as cleanup function.
root : | the root FttCell of the cell tree. |
s : | a closed, orientable surface defining the solid boundary. |
stree : | a bounding box tree of the faces of s. |
is_open : | TRUE if s is an "open" boundary i.e. the signed volume enclosed by s is negative, FALSE otherwise. |
destroy_solid : | controls what to do with solid cells. |
cleanup : | a FttCellCleanupFunc or NULL. |
data : | user data to pass to cleanup. |
void gfs_cell_init_solid_fractions_from_children (FttCell *cell);
Uses the values of the solid fractions of the children of cell to compute the values of its solid fractions.
This function fails if cell is a leaf of the cell tree.
cell : | a FttCell. |
gboolean gfs_cell_check_solid_fractions (FttCell *root,GtsSurface *solid,GNode *stree,gboolean is_open);
Checks the consistency of the solid fractions of each cell of the cell tree relative to the neighboring solid fractions and to the solid geometry they represent (if solid is not NULL).
root : | the root FttCell of the cell tree to check. |
solid : | a closed, orientable surface defining the solid boundary or NULL. |
stree : | a bounding box tree of the faces of solid or NULL (only if solid is also NULL). |
is_open : | TRUE if solid is an "open" surface. |
Returns : | TRUE if the solid fractions are consistent, FALSE otherwise. |
gboolean gfs_refine_mixed (const FttCell *cell);
cell : | a FttCell. |
Returns : | TRUE if cell is a mixed leaf cell and any of its neighbors is not a leaf cell, FALSE otherwise (see figure topology.fig). |
void gfs_cell_traverse_mixed (FttCell *root, FttTraverseType order, FttTraverseFlags flags, FttCellTraverseFunc func,gpointer data);
Traverses a cell tree starting at the given root FttCell. Calls the given function for each mixed cell.
root : | the root FttCell of the tree to traverse. |
order : | the order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER. |
flags : | which types of children are to be visited. |
func : | the function to call for each visited FttCell. |
data : | user data to pass to func. |
<<< Fluid cell | Fluid cells operators >>> |