Details
struct FttCell
struct FttCell {
/*< public >*/
guint flags;
gpointer data;
/*< private >*/
struct _FttOct * parent, * children;
}; |
enum FttCellFlags
typedef enum {
FTT_FLAG_ID = 7,
FTT_FLAG_DESTROYED = 1 << 3,
FTT_FLAG_LEAF = 1 << 4, /* used only for I/O operations */
FTT_FLAG_TRAVERSED = FTT_FLAG_LEAF, /* used for face traversal */
FTT_FLAG_USER = 5 /* user flags start here */
} FttCellFlags; |
struct FttVector
struct FttVector {
gdouble x, y, z;
}; |
FTT_CELL_IS_ROOT()
#define FTT_CELL_IS_ROOT(c) ((c)->parent == NULL) |
Evaluates to TRUE if c does not have any parent, FALSE otherwise.
FTT_CELL_IS_LEAF()
#define FTT_CELL_IS_LEAF(c) ((c)->children == NULL) |
Evaluates to TRUE if c does not have any children, FALSE otherwise.
FTT_MAINTAINER
#define FTT_MAINTAINER "s.popinet@niwa.cri.nz" |
FttCellInitFunc ()
void (*FttCellInitFunc) (FttCell *cell,
gpointer data); |
This function is used to initialize extra user data associated with cell. For example to allocate extra memory, initialize user-defined variables etc...
ftt_cell_refine ()
Recursively refines the tree starting from root. Each leaf of the
tree is tested for refinement using the refine function. The new
refined cells created are initialized using init (if not NULL)
and are themselves recursively refined.
ftt_cell_refine_single ()
Refines cell and eventually its neighbors to ensure that the
neighborhood properties are preserved. The new refined cells
created are initialized using init (if not NULL).
FttCellRefineFunc ()
gboolean (*FttCellRefineFunc) (FttCell *cell,
gpointer data); |
This function is used to control the refinement process of a cell tree.
ftt_refine_corner ()
gboolean ftt_refine_corner (const FttCell *cell); |
ftt_cell_refine_corners ()
FttCellCoarsenFunc ()
gboolean (*FttCellCoarsenFunc) (FttCell *cell,
gpointer data); |
ftt_cell_coarsen ()
Coarsens the cell tree defined by root according to coarsen.
ftt_cell_flatten ()
Recursively destroys all the cells of the tree defined by root
which do not form the boundary in direction d. The resulting cell
tree is in effect a domain "flattened" in direction d.
The resulting domain is always one-cell thick in direction d.
ftt_cell_check ()
gboolean ftt_cell_check (const FttCell *cell); |
ftt_cell_destroy ()
Frees all memory allocated for cell and its descendants.
The user-defined function cleanup is called prior to freeing memory.
ftt_cell_destroy_root ()
Destroys the root cell of a cell tree but not its children. Each
child becomes the root cell of a new cell tree. The new (orphaned)
children are returned in children.
Note that the function will fail if root is also a leaf cell.
FttCellCleanupFunc ()
void (*FttCellCleanupFunc) (FttCell *cell); |
Performs any cleanup action needed for the user data associated with cell prior to its destruction (example: freeing extra memory allocated at cell creation using a FttCellInitFunc function).
ftt_cell_level()
#define ftt_cell_level(c) |
Evaluates to the level of c.
ftt_cell_set_level ()
void ftt_cell_set_level (FttCell *root,
guint level); |
Sets the level of the root cell of a cell tree to level.
Updates the levels of its children recursively.
ftt_cell_pos ()
Fills pos with the coordinates of the center of cell.
ftt_cell_relative_pos ()
Fills pos with the coordinates of the center of cell relative to
the center of its parent cell. The length unit is the size of the
parent cell.
ftt_cell_set_pos ()
Sets the position of the center of the root cell of a cell tree to
pos. Updates the positions of its children recursively.
ftt_level_size ()
gdouble ftt_level_size (guint level); |
ftt_cell_size ()
gdouble ftt_cell_size (const FttCell *cell); |
ftt_cell_volume ()
gdouble ftt_cell_volume (const FttCell *cell); |
ftt_cell_parent()
#define ftt_cell_parent(c) |
Evaluates to the parent of c. NULL is c is a root cell.
ftt_cell_depth ()
guint ftt_cell_depth (const FttCell *root); |