Solid boundaries

Name

Solid boundaries -- 

Synopsis


#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);
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,
                                             FttCellTraverseFunc func,
                                             gpointer data);

Description

Details

GFS_IS_FLUID()

#define     GFS_IS_FLUID(cell)

Evaluates to TRUE if cell is entirely contained in the fluid, FALSE otherwise.

cell :a FttCell.


GFS_IS_MIXED()

#define     GFS_IS_MIXED(cell)

Evaluates to TRUE if cell is partially contained in the fluid, FALSE otherwise.

cell :a FttCell.


GFS_FACE_FRACTION()

#define     GFS_FACE_FRACTION(fa)

fa : 


struct GfsSolidVector

struct GfsSolidVector {
  gdouble s[FTT_NEIGHBORS];
  gdouble a;
  FttCell * merged;
};

Contains the surface and volume fractions of the cell not contained in the solid.


gfs_cell_fluid ()

void        gfs_cell_fluid                  (FttCell *cell);

Sets cell and all its descendants as full fluid cells.

cell : a FttCell.


gfs_cell_init_solid_fractions ()

void        gfs_cell_init_solid_fractions   (FttCell *root,
                                             GtsSurface *s,
                                             GNode *stree,
                                             gboolean is_open,
                                             gboolean destroy_solid,
                                             FttCellCleanupFunc cleanup);

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.


gfs_cell_init_solid_fractions_from_children ()

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.


gfs_cell_check_solid_fractions ()

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.


gfs_refine_mixed ()

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).


gfs_cell_traverse_mixed ()

void        gfs_cell_traverse_mixed         (FttCell *root,
                                             FttCellTraverseFunc func,
                                             gpointer data);

Traverses a cell tree starting at the given root FttCell. Calls the given function for each leaf cell which is also a mixed cell.

root : the root FttCell of the tree to traverse.
func : the function to call for each visited FttCell.
data : user data to pass to func.