Solid boundaries

Name

Solid boundaries -- 

Synopsis


#include <gfs.h>


#define     GFS_IS_FLUID                    (cell)
#define     GFS_IS_MIXED                    (cell)
#define     GFS_FACE_FRACTION               (fa)

            GfsSolidVector;

void        gfs_cell_fluid                  (FttCell *cell);
void        gfs_cell_init_solid_fractions_from_children
                                            (FttCell *cell);
gboolean    gfs_cell_check_solid_fractions  (FttCell *root);
void        gfs_cell_traverse_mixed         (FttCell *root,
                                             FttTraverseType order,
                                             FttTraverseFlags flags,
                                             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 :


GfsSolidVector

typedef struct {
  gdouble s[FTT_NEIGHBORS];
  gdouble a, v, fv;
  FttCell * merged;
  FttVector cm, ca;
} GfsSolidVector;

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_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);

Checks the consistency of the solid fractions of each cell of the cell tree relative to the neighboring solid fractions.

root :

the root FttCell of the cell tree to check.

Returns :

TRUE if the solid fractions are consistent, FALSE otherwise.


gfs_cell_traverse_mixed ()

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.