Gerris
Classes | Functions

GfsDomain

Collaboration diagram for GfsDomain:

Classes

 GfsDomainProjection
 GfsSimulation

Functions

void gfs_domain_copy_bc (GfsDomain *domain, FttTraverseFlags flags, gint max_depth, GfsVariable *v, GfsVariable *v1)
void gfs_domain_bc (GfsDomain *domain, FttTraverseFlags flags, gint max_depth, GfsVariable *v)
void gfs_domain_homogeneous_bc (GfsDomain *domain, FttTraverseFlags flags, gint max_depth, GfsVariable *ov, GfsVariable *v)
void gfs_domain_homogeneous_bc_stencil (GfsDomain *domain, FttTraverseFlags flags, gint max_depth, GfsVariable *ov, GfsVariable *v, GfsLinearProblem *lp)
void gfs_traverse_and_homogeneous_bc (GfsDomain *domain, FttTraverseType order, FttTraverseFlags flags, gint max_depth, FttCellTraverseFunc func, gpointer data, GfsVariable *ov, GfsVariable *v)
void gfs_traverse_and_bc (GfsDomain *domain, FttTraverseType order, FttTraverseFlags flags, gint max_depth, FttCellTraverseFunc func, gpointer data, GfsVariable *v, GfsVariable *v1)
void gfs_domain_face_bc (GfsDomain *domain, FttComponent c, GfsVariable *v)
void gfs_domain_match (GfsDomain *domain)
void gfs_domain_forget_boundary (GfsDomain *domain, GfsBoundary *boundary)
void gfs_domain_surface_bc (GfsDomain *domain, GfsVariable *v)
void gfs_domain_cell_traverse (GfsDomain *domain, FttTraverseType order, FttTraverseFlags flags, gint max_depth, FttCellTraverseFunc func, gpointer data)
FttCellTraverse * gfs_domain_cell_traverse_new (GfsDomain *domain, FttTraverseType order, FttTraverseFlags flags, gint max_depth)
void gfs_domain_traverse_layers (GfsDomain *domain, FttCellTraverseFunc func, gpointer data)
void gfs_domain_cell_traverse_box (GfsDomain *domain, GtsBBox *box, FttTraverseType order, FttTraverseFlags flags, gint max_depth, FttCellTraverseFunc func, gpointer data)
void gfs_domain_cell_traverse_condition (GfsDomain *domain, FttTraverseType order, FttTraverseFlags flags, gint max_depth, FttCellTraverseFunc func, gpointer data, gboolean(*condition)(FttCell *, gpointer), gpointer cdata)
void gfs_domain_traverse_mixed (GfsDomain *domain, FttTraverseType order, FttTraverseFlags flags, FttCellTraverseFunc func, gpointer data)
void gfs_domain_traverse_cut (GfsDomain *domain, GfsGenericSurface *s, FttTraverseType order, FttTraverseFlags flags, FttCellTraverseCutFunc func, gpointer data)
void gfs_domain_traverse_cut_2D (GfsDomain *domain, GfsGenericSurface *s, FttTraverseType order, FttTraverseFlags flags, FttCellTraverseCutFunc func, gpointer data)
guint gfs_domain_depth (GfsDomain *domain)
void gfs_domain_face_traverse (GfsDomain *domain, FttComponent c, FttTraverseType order, FttTraverseFlags flags, gint max_depth, FttFaceTraverseFunc func, gpointer data)
void gfs_domain_cell_traverse_boundary (GfsDomain *domain, FttDirection d, FttTraverseType order, FttTraverseFlags flags, gint max_depth, FttCellTraverseFunc func, gpointer data)
GtsRange gfs_domain_stats_variable (GfsDomain *domain, GfsVariable *v, FttTraverseFlags flags, gint max_depth, gboolean(*condition)(FttCell *, gpointer), gpointer cdata)
GtsRange gfs_domain_stats_solid (GfsDomain *domain)
void gfs_domain_stats_merged (GfsDomain *domain, GtsRange *solid, GtsRange *number)
void gfs_domain_stats_balance (GfsDomain *domain, GtsRange *size, GtsRange *boundary, GtsRange *mpiwait)
GfsNorm gfs_domain_norm_variable (GfsDomain *domain, GfsVariable *v, GfsFunction *w, FttTraverseFlags flags, gint max_depth, gboolean(*condition)(FttCell *, gpointer), gpointer cdata)
GfsNorm gfs_domain_norm_residual (GfsDomain *domain, FttTraverseFlags flags, gint max_depth, gdouble dt, GfsVariable *res)
GfsVariable ** gfs_domain_velocity (GfsDomain *domain)
GfsNorm gfs_domain_norm_velocity (GfsDomain *domain, FttTraverseFlags flags, gint max_depth)
GfsDomain * gfs_domain_read (GtsFile *fp)
void gfs_domain_split (GfsDomain *domain, gboolean one_box_per_pe)
FttCell * gfs_domain_locate (GfsDomain *domain, FttVector target, gint max_depth, GfsBox **where)
FttCell * gfs_domain_boundary_locate (GfsDomain *domain, FttVector target, gint max_depth, GtsObject **where)
gdouble gfs_domain_cell_point_distance2 (GfsDomain *domain, GtsPoint *p, gdouble(*distance2)(FttCell *, GtsPoint *, gpointer), gpointer data, FttCell **closest)
void gfs_domain_advect_point (GfsDomain *domain, FttVector *p, gdouble dt)
guint gfs_domain_size (GfsDomain *domain, FttTraverseFlags flags, gint max_depth)
gdouble gfs_domain_cfl (GfsDomain *domain, FttTraverseFlags flags, gint max_depth)
void gfs_cell_init (FttCell *cell, GfsDomain *domain)
void gfs_cell_reinit (FttCell *cell, GfsDomain *domain)
void gfs_cell_fine_init (FttCell *parent, GfsDomain *domain)
void gfs_cell_copy (const FttCell *from, FttCell *to, GfsDomain *domain)
void gfs_cell_write (const FttCell *cell, FILE *fp, GSList *variables)
void gfs_cell_read (FttCell *cell, GtsFile *fp, GfsDomain *domain)
void gfs_cell_write_binary (const FttCell *cell, FILE *fp, GSList *variables)
void gfs_cell_read_binary (FttCell *cell, GtsFile *fp, GfsDomain *domain)
guint gfs_domain_alloc (GfsDomain *domain)
void gfs_domain_free (GfsDomain *domain, guint i)
GfsVariable * gfs_domain_add_variable (GfsDomain *domain, const gchar *name, const gchar *description)
GfsVariable * gfs_domain_get_or_add_variable (GfsDomain *domain, const gchar *name, const gchar *description)
void gfs_domain_solid_force (GfsDomain *domain, FttVector *pf, FttVector *vf, FttVector *pm, FttVector *vm, GfsFunction *weight)
guint gfs_domain_tag_droplets (GfsDomain *domain, GfsVariable *c, GfsVariable *tag)
void gfs_domain_remove_droplets (GfsDomain *domain, GfsVariable *c, GfsVariable *v, gint min, gdouble val)
void gfs_domain_remove_ponds (GfsDomain *domain, gint min, FttCellCleanupFunc cleanup, gpointer data)
void gfs_domain_remove_specks (GfsDomain *domain)
void gfs_domain_timer_start (GfsDomain *domain, const gchar *name)
void gfs_domain_timer_stop (GfsDomain *domain, const gchar *name)
void gfs_domain_combine_traverse (GfsDomain *domain1, GfsDomain *domain2, FttCellCombineTraverseFunc inside, gpointer idata, FttCellTraverseFunc outside, gpointer odata)
GfsDerivedVariable * gfs_domain_add_derived_variable (GfsDomain *domain, GfsDerivedVariableInfo info)
gboolean gfs_domain_remove_derived_variable (GfsDomain *domain, const gchar *name)
void gfs_domain_sum (GfsDomain *domain, FttDirection d, GfsFunction *f, GfsVariable *v)
void gfs_domain_filter (GfsDomain *domain, GfsVariable *v, GfsVariable *fv)
GfsRequest * gfs_send_objects (GSList *list, int dest)
void gfs_wait (GfsRequest *r)
GSList * gfs_receive_objects (GfsDomain *domain, int src)
GfsRequest * gfs_send_boxes (GfsDomain *domain, GSList *boxes, int dest)
GSList * gfs_receive_boxes (GfsDomain *domain, int src)
GtsObject * gfs_object_from_name (GfsDomain *domain, const gchar *name)

Detailed Description

Spatial domain.

See also:

Syntax reference


Function Documentation

void gfs_cell_copy ( const FttCell *  from,
FttCell *  to,
GfsDomain *  domain 
)
Parameters:
froma #FttCell to copy attributes from.
toa #FttCell to copy attributes to.
domainthe #GfsDomain containing from.

Copies the attributes of the fluid cell from to the fluid cell to.

Here is the call graph for this function:

void gfs_cell_fine_init ( FttCell *  parent,
GfsDomain *  domain 
)
Parameters:
parenta #FttCell.
domaina #GfsDomain containing parent.

Initialises the children of parent.

Here is the call graph for this function:

void gfs_cell_init ( FttCell *  cell,
GfsDomain *  domain 
)
Parameters:
cella #FttCell.
domaina #GfsDomain containing cell.

Allocates the memory for fluid state data associated to cell or its children.

Here is the caller graph for this function:

void gfs_cell_read ( FttCell *  cell,
GtsFile *  fp,
GfsDomain *  domain 
)
Parameters:
cella #FttCell.
fpa #GtsFile.
domainthe #GfsDomain containing cell.

Reads from fp the fluid data associated with cell and described by domain->variables_io. This function is generally used in association with ftt_cell_read().

Here is the call graph for this function:

void gfs_cell_read_binary ( FttCell *  cell,
GtsFile *  fp,
GfsDomain *  domain 
)
Parameters:
cella #FttCell.
fpa #GtsFile.
domainthe #GfsDomain containing cell.

Reads from fp the fluid data associated with cell and described by domain->variables_io. This function is generally used in association with ftt_cell_read_binary().

Here is the call graph for this function:

void gfs_cell_reinit ( FttCell *  cell,
GfsDomain *  domain 
)
Parameters:
cella #FttCell.
domaina #GfsDomain containing cell.

Re-allocates the memory for fluid state data associated to cell.

void gfs_cell_write ( const FttCell *  cell,
FILE *  fp,
GSList *  variables 
)
Parameters:
cella #FttCell.
fpa file pointer.
variablesthe list of #GfsVariable to be written.

Writes in fp the fluid data associated with cell and described by variables. This function is generally used in association with ftt_cell_write().

void gfs_cell_write_binary ( const FttCell *  cell,
FILE *  fp,
GSList *  variables 
)
Parameters:
cella #FttCell.
fpa file pointer.
variablesthe list of #GfsVariable to be written.

Writes in fp the fluid data associated with cell and described by variables. This function is generally used in association with ftt_cell_write_binary().

GfsDerivedVariable* gfs_domain_add_derived_variable ( GfsDomain *  domain,
GfsDerivedVariableInfo  info 
)
Parameters:
domaina #GfsDomain.
infothe #GfsDerivedVariableInfo.

Adds a derived variable described by info to domain.

Returns:
the #GfsDerivedVariable if the variable was successfully added to domain or NULL if a variable with the same name already exists.

Here is the call graph for this function:

GfsVariable* gfs_domain_add_variable ( GfsDomain *  domain,
const gchar *  name,
const gchar *  description 
)
Parameters:
domaina #GfsDomain.
namethe name of the variable to add or NULL.
descriptionthe variable description or NULL.

Adds a new variable name to domain.

Returns:
the new variable or NULL if a variable with the same name already exists.

Here is the call graph for this function:

Here is the caller graph for this function:

void gfs_domain_advect_point ( GfsDomain *  domain,
FttVector *  p,
gdouble  dt 
)
Parameters:
domaina #GfsDomain.
pa #FttVector.
dtthe time step.

Updates the coordinates of point p at time t + dt using the velocity field defined by domain.

If p is not contained within domain, the coordinates are unchanged.

Here is the call graph for this function:

guint gfs_domain_alloc ( GfsDomain *  domain)
Parameters:
domaina #GfsDomain.
Returns:
the index of a memory location newly allocated for each cell of domain.
void gfs_domain_bc ( GfsDomain *  domain,
FttTraverseFlags  flags,
gint  max_depth,
GfsVariable *  v 
)
Parameters:
domaina #GfsDomain.
flagsthe traversal flags.
max_depththe maximum depth of the traversal.
va #GfsVariable.

Apply the boundary conditions in domain for variable v.

Here is the call graph for this function:

Here is the caller graph for this function:

FttCell* gfs_domain_boundary_locate ( GfsDomain *  domain,
FttVector  target,
gint  max_depth,
GtsObject **  where 
)
Parameters:
domaina #GfsDomain.
targetposition of the point to look for.
max_depthmaximum depth to consider (-1 means no restriction).
wherea pointer to a #GtsObject.

Locates the cell of domain or of its boundary containing target.

If where is not NULL it is filled with the #GtsObject (either a #GfsBox or a #GfsBoundary) containing the cell.

Returns:
a #FttCell of domain or of its boundary containing the point defined by target or NULL if target is not contained in any cell of domain or of its boundary.

Here is the call graph for this function:

gdouble gfs_domain_cell_point_distance2 ( GfsDomain *  domain,
GtsPoint *  p,
gdouble(*)(FttCell *, GtsPoint *, gpointer)  distance2,
gpointer  data,
FttCell **  closest 
)
Parameters:
domaina #GfsDomain.
pa #GtsPoint.
distance2the squared distance function.
datauser data to pass to distance2.
closestwhere to return the closest cell or NULL.

For non-leafs cells distance2 must return a lower-bound for the minimum distance (using for example ftt_cell_point_distance2_min()).

Returns:
the square of the minimum distance measured according to distance2 between p and a leaf cell of domain.
void gfs_domain_cell_traverse ( GfsDomain *  domain,
FttTraverseType  order,
FttTraverseFlags  flags,
gint  max_depth,
FttCellTraverseFunc  func,
gpointer  data 
)
Parameters:
domaina #GfsDomain.
orderthe order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER.
flagswhich types of children are to be visited.
max_depththe maximum depth of the traversal. Cells below this depth will not be traversed. If max_depth is -1 all cells in the tree are visited.
functhe function to call for each visited #FttCell.
datauser data to pass to func.

Traverses the cell trees of domain. Calls the given function for each cell visited.

Here is the caller graph for this function:

void gfs_domain_cell_traverse_boundary ( GfsDomain *  domain,
FttDirection  d,
FttTraverseType  order,
FttTraverseFlags  flags,
gint  max_depth,
FttCellTraverseFunc  func,
gpointer  data 
)
Parameters:
domaina #GfsDomain.
dthe direction of the boundary to traverse.
orderthe order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER.
flagswhich types of children are to be visited.
max_depththe maximum depth of the traversal. Cells below this depth will not be traversed. If max_depth is -1 all cells in the tree are visited.
functhe function to call for each visited #FttCell.
datauser data to pass to func.

Traverses the boundary of a domain in direction d. Calls the given function for each cell visited.

Here is the caller graph for this function:

void gfs_domain_cell_traverse_box ( GfsDomain *  domain,
GtsBBox *  box,
FttTraverseType  order,
FttTraverseFlags  flags,
gint  max_depth,
FttCellTraverseFunc  func,
gpointer  data 
)
Parameters:
domaina #GfsDomain.
boxa #GtsBBox.
orderthe order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER.
flagswhich types of children are to be visited.
max_depththe maximum depth of the traversal. Cells below this depth will not be traversed. If max_depth is -1 all cells in the tree are visited.
functhe function to call for each visited #FttCell.
datauser data to pass to func.

Traverses the cell trees of domain. Calls the given function for each cell visited. Only the cells overlapping with box are visited.

void gfs_domain_cell_traverse_condition ( GfsDomain *  domain,
FttTraverseType  order,
FttTraverseFlags  flags,
gint  max_depth,
FttCellTraverseFunc  func,
gpointer  data,
gboolean(*)(FttCell *, gpointer)  condition,
gpointer  cdata 
)
Parameters:
domaina #GfsDomain.
orderthe order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER.
flagswhich types of children are to be visited.
max_depththe maximum depth of the traversal. Cells below this depth will not be traversed. If max_depth is -1 all cells in the tree are visited.
functhe function to call for each visited #FttCell.
datauser data to pass to func.
conditionthe condition.
cdatauser data to pass to condition.

Traverses the cell trees of domain. Calls the given function for each cell visited.

Traversal of any branch of the tree is stopped whenever condition is not verified.

Here is the caller graph for this function:

FttCellTraverse* gfs_domain_cell_traverse_new ( GfsDomain *  domain,
FttTraverseType  order,
FttTraverseFlags  flags,
gint  max_depth 
)
Parameters:
domaina #GfsDomain.
orderthe order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER.
flagswhich types of children are to be visited.
max_depththe maximum depth of the traversal. Cells below this depth will not be traversed. If max_depth is -1 all cells in the tree are visited.
Returns:
a new #FttCellTraverse.

Here is the call graph for this function:

gdouble gfs_domain_cfl ( GfsDomain *  domain,
FttTraverseFlags  flags,
gint  max_depth 
)
Parameters:
domaina #GfsDomain.
flagswhich types of cells are to be visited.
max_depthmaximum depth of the traversal.
Returns:
the minimum over the cells of domain (traversed using flags and max_depth) of the time scale defined by the size of the cell and the norm of either the local velocity or the local acceleration.

Here is the call graph for this function:

void gfs_domain_combine_traverse ( GfsDomain *  domain1,
GfsDomain *  domain2,
FttCellCombineTraverseFunc  inside,
gpointer  idata,
FttCellTraverseFunc  outside,
gpointer  odata 
)
Parameters:
domain1a #GfsDomain.
domain2another #GfsDomain.
insidefunction to call for each pair of cells.
idatauser data to pass to inside.
outsidefunction to call for cells falling outside of domain2 or NULL.
odatauser data to pass to outside.

Calls inside for each leaf cell of domain1 contained in domain2. The second cell argument to inside is set to the cell of domain2 containing the first cell argument.

If outside is not NULL it is called for each leaf cell of domain1 which is outside of domain2.

void gfs_domain_copy_bc ( GfsDomain *  domain,
FttTraverseFlags  flags,
gint  max_depth,
GfsVariable *  v,
GfsVariable *  v1 
)
Parameters:
domaina #GfsDomain.
flagsthe traversal flags.
max_depththe maximum depth of the traversal.
va #GfsVariable.
v1another #GfsVariable.

Apply the boundary conditions of variable v in domain to variable v1.

Here is the call graph for this function:

Here is the caller graph for this function:

guint gfs_domain_depth ( GfsDomain *  domain)
Parameters:
domaina #GfsDomain.
Returns:
the maximum depth of the cell trees of domain. This function is global i.e. it returns the maximum depth over all the processes (for parallel execution).

Here is the caller graph for this function:

void gfs_domain_face_bc ( GfsDomain *  domain,
FttComponent  c,
GfsVariable *  v 
)
Parameters:
domaina #GfsDomain.
ca component.
va #GfsVariable.

Apply the boundary conditions on the faces of domain for variable v.

Here is the call graph for this function:

Here is the caller graph for this function:

void gfs_domain_face_traverse ( GfsDomain *  domain,
FttComponent  c,
FttTraverseType  order,
FttTraverseFlags  flags,
gint  max_depth,
FttFaceTraverseFunc  func,
gpointer  data 
)
Parameters:
domaina #GfsDomain.
conly the faces orthogonal to this component will be traversed - one of FTT_X, FTT_Y, (FTT_Z), FTT_XYZ.
orderthe order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER.
flagswhich types of children and faces are to be visited.
max_depththe maximum depth of the traversal. Cells below this depth will not be traversed. If max_depth is -1 all cells in the tree are visited.
functhe function to call for each visited #FttCellFace.
datauser data to pass to func.

Traverses a domain. Calls the given function for each face of the cells of the domain.

If FTT_TRAVERSE_BOUNDARY_FACES is not set in flags, only "double-sided" faces are traversed i.e. the neighbor field of the face is never NULL.

Here is the call graph for this function:

Here is the caller graph for this function:

void gfs_domain_filter ( GfsDomain *  domain,
GfsVariable *  v,
GfsVariable *  fv 
)
Parameters:
domaina #GfsDomain.
va #GfsVariable.
fvthe filtered variable or NULL.

Apply a "corner-averaging" filter to variable v on all leaf cells of domain.

If fv is NULL, v is replaced by its filtered value.

Here is the call graph for this function:

void gfs_domain_forget_boundary ( GfsDomain *  domain,
GfsBoundary *  boundary 
)
Parameters:
domaina #GfsDomain.
boundarya #GfsBoundary belonging to domain.

Makes domain permanently ignore boundary when performing "locate()" queries.

void gfs_domain_free ( GfsDomain *  domain,
guint  i 
)
Parameters:
domaina #GfsDomain.
ia memory location index previously allocated using gfs_domain_alloc().

Frees the memory location of domain defined by i.

GfsVariable* gfs_domain_get_or_add_variable ( GfsDomain *  domain,
const gchar *  name,
const gchar *  description 
)
Parameters:
domaina #GfsDomain.
namethe name of the variable to add or get.
descriptionthe variable description or NULL.

Adds a new variable name to domain or returns the variable of domain with the same name. In either case the description of the variable name is set to description (if it is not NULL).

Returns:
the new or already existing variable or NULL if name is a reserved variable name.

Here is the call graph for this function:

void gfs_domain_homogeneous_bc ( GfsDomain *  domain,
FttTraverseFlags  flags,
gint  max_depth,
GfsVariable *  ov,
GfsVariable *  v 
)
Parameters:
domaina #GfsDomain.
flagsthe traversal flags.
max_depththe maximum depth of the traversal.
ova #GfsVariable.
va #GfsVariable of which ov is an homogeneous version.

Apply the boundary conditions in domain for variable ov using the homogeneous version of the boundary condititons for v.

Here is the call graph for this function:

Here is the caller graph for this function:

void gfs_domain_homogeneous_bc_stencil ( GfsDomain *  domain,
FttTraverseFlags  flags,
gint  max_depth,
GfsVariable *  ov,
GfsVariable *  v,
GfsLinearProblem *  lp 
)
Parameters:
domaina #GfsDomain.
flagsthe traversal flags.
max_depththe maximum depth of the traversal.
ova #GfsVariable.
va #GfsVariable of which ov is an homogeneous version.
lpa #GfsLinearProblem in which to store the stencil.

Gets the stencils corresponding to the homogeneous boundary conditions in domain for variable v.

Here is the caller graph for this function:

FttCell* gfs_domain_locate ( GfsDomain *  domain,
FttVector  target,
gint  max_depth,
GfsBox **  where 
)
Parameters:
domaina #GfsDomain.
targetposition of the point to look for.
max_depthmaximum depth to consider (-1 means no restriction, see below for -2).
wherea pointer to a #GfsBox or NULL.

Locates the cell of domain containing target. This is done efficiently in log(n) operations by using the topology of the cell trees.

If max_depth is set to -2, the finest cell containing target is returned. This cell is not necessarily a leaf-cell in contrast to the case where max_depth is set to -1.

If where is not NULL it is filled with the #GfsBox containing the cell.

Returns:
a #FttCell of domain containing (boundary included) the point defined by target or NULL if target is not contained in any cell of domain.

Here is the call graph for this function:

Here is the caller graph for this function:

void gfs_domain_match ( GfsDomain *  domain)
Parameters:
domaina #GfsDomain.

Match the boundaries of domain.

Here is the call graph for this function:

Here is the caller graph for this function:

GfsNorm gfs_domain_norm_residual ( GfsDomain *  domain,
FttTraverseFlags  flags,
gint  max_depth,
gdouble  dt,
GfsVariable *  res 
)
Parameters:
domainthe domain to obtain the norm from.
flagswhich types of cells are to be visited.
max_depthmaximum depth of the traversal.
dtthe time step.
resthe residual.

Traverses the domain defined by domain using gfs_domain_cell_traverse() and gathers norm statistics about the volume weighted relative residual (i.e. the sum of the residual over the volume defined by each cell divided by the total volume of the cell).

Returns:
a #GfsNorm containing the norm statistics about the volume weighted relative residual.

Here is the call graph for this function:

Here is the caller graph for this function:

GfsNorm gfs_domain_norm_variable ( GfsDomain *  domain,
GfsVariable *  v,
GfsFunction *  w,
FttTraverseFlags  flags,
gint  max_depth,
gboolean(*)(FttCell *, gpointer)  condition,
gpointer  cdata 
)
Parameters:
domainthe domain to obtain norm from.
va #GfsVariable.
wa #GfsFunction or NULL.
flagswhich types of cells are to be visited.
max_depthmaximum depth of the traversal.
conditiona condition or NULL.
cdatauser data to pass to condition.

Traverses the domain defined by domain using gfs_domain_cell_traverse() and gathers norm statistics about variable v.

The norm is weighted by the volume of each cell times the value of function w (if w is not NULL).

Only cells veryfing condition are taken into account (if condition is not NULL). See also gfs_domain_cell_traverse_condition().

Returns:
a #GfsNorm containing the norm statistics about v.

Here is the call graph for this function:

Here is the caller graph for this function:

GfsNorm gfs_domain_norm_velocity ( GfsDomain *  domain,
FttTraverseFlags  flags,
gint  max_depth 
)
Parameters:
domainthe domain to obtain the norm from.
flagswhich types of cells are to be visited.
max_depthmaximum depth of the traversal.

Traverses the domain defined by domain using gfs_domain_cell_traverse() and gathers norm statistics about velocity.

Returns:
a #GfsNorm containing the norm statistics about the velocity.

Here is the call graph for this function:

GfsDomain* gfs_domain_read ( GtsFile *  fp)
Parameters:
fpa #GtsFile.

Reads the graph nodes (#GfsBox) and edges and the corresponding boundaries (#GfsBoundaryMpi if necessary) defined in fp.

Returns:
the #GfsDomain or NULL if an error occured, in which case the corresponding fp fields (pos and error) are set.

Here is the caller graph for this function:

gboolean gfs_domain_remove_derived_variable ( GfsDomain *  domain,
const gchar *  name 
)
Parameters:
domaina #GfsDomain.
namethe name of a #GfsDerivedVariable.

Removes derived variable name from domain.

Returns:
TRUE if the variable was successfully removed from domain or FALSE if a derived variable with the this name does not exist.
void gfs_domain_remove_droplets ( GfsDomain *  domain,
GfsVariable *  c,
GfsVariable *  v,
gint  min,
gdouble  val 
)
Parameters:
domaina #GfsDomain.
ca #GfsVariable.
va #GfsVariable.
minthe minimum size (in cells) of the droplets.
valthe value used to reset v.

Resets the v variable (using val) of all the droplets (defined by the c variable) smaller than min cells if min is positive, or all the droplets but the -$min largest ones if min is negative.

Here is the call graph for this function:

void gfs_domain_remove_ponds ( GfsDomain *  domain,
gint  min,
FttCellCleanupFunc  cleanup,
gpointer  data 
)
Parameters:
domaina #GfsDomain.
minthe minimum size (in cells) of the ponds.
cleanupa #FttCellCleanupFunc or NULL.
datauser data to pass to cleanup.

Removes all the fluid "ponds" of domain smaller than min cells if min is positive, or all the ponds but the -min largest ones if min is negative.

If the domain is modified its boundaries are re"matched" using gfs_domain_match().

Here is the call graph for this function:

void gfs_domain_remove_specks ( GfsDomain *  domain)
Parameters:
domaina #GfsDomain.

Removes all the solid "specks" of domain. Solid specks are islands which do not contain any empty cell.

Note that the domain's boundaries are not "matched" automatically.

Here is the call graph for this function:

guint gfs_domain_size ( GfsDomain *  domain,
FttTraverseFlags  flags,
gint  max_depth 
)
Parameters:
domaina #GfsDomain.
flagswhich types of cells are to be visited.
max_depthmaximum depth of the traversal.
Returns:
the number of cells of domain traversed using flags and max_depth.

Here is the call graph for this function:

void gfs_domain_solid_force ( GfsDomain *  domain,
FttVector *  pf,
FttVector *  vf,
FttVector *  pm,
FttVector *  vm,
GfsFunction *  weight 
)
Parameters:
domaina #GfsDomain.
pfa #FttVector.
vfa #FttVector.
pma #FttVector.
vma #FttVector.
weightan optional weight.

Fills pf and vf (resp. pm and vm) with the components of the net pressure and viscous forces (resp. pressure and viscous moments) applied by the fluid on the solid surface embedded in domain.

The reference point for the moments is the origin of the coordinate system.

Here is the call graph for this function:

void gfs_domain_split ( GfsDomain *  domain,
gboolean  one_box_per_pe 
)
Parameters:
domaina #GfsDomain.
one_box_per_peif TRUE each new box created is assigned to a different process, otherwise the newly created box inherits the pid of its parent.

Splits each box of domain into its (4 in 2D, 8 in 3D) children. The corresponding newly created boxes are added to the graph and the parent boxes are destroyed.

Here is the call graph for this function:

void gfs_domain_stats_balance ( GfsDomain *  domain,
GtsRange *  size,
GtsRange *  boundary,
GtsRange *  mpiwait 
)
Parameters:
domainthe domain to obtain statistics from.
size#GtsRange in which to return stats for the total size of the domain.
boundary#GtsRange in which to return stats for the size of the parallel boundaries of the domain.
mpiwait#GtsRange in which to return stats for the average time spend waiting for MPI calls in each PE.

Gathers statistics about the sizes of the domains, their parallel boundaries and the execution time on each PE.

void gfs_domain_stats_merged ( GfsDomain *  domain,
GtsRange *  solid,
GtsRange *  number 
)
Parameters:
domainthe domain to obtain statistics from.
solid#GtsRange in which to return stats for the total solid volume fraction of merged cells.
number#GtsRange in which to return stats for the number of cells used per merged cell.

Traverses the domain defined by domain using gfs_domain_traverse_merged() and gathers statistics about the total solid volume fraction of merged cells and the number of cells used per merged cell.

Here is the call graph for this function:

GtsRange gfs_domain_stats_solid ( GfsDomain *  domain)
Parameters:
domainthe domain to obtain statistics from.

Traverses the domain defined by domain using gfs_domain_traverse_mixed() and gathers statistics about the solid volume fraction in mixed cells.

Returns:
statistics about the solid volume fraction a in mixed cells.

Here is the call graph for this function:

GtsRange gfs_domain_stats_variable ( GfsDomain *  domain,
GfsVariable *  v,
FttTraverseFlags  flags,
gint  max_depth,
gboolean(*)(FttCell *, gpointer)  condition,
gpointer  cdata 
)
Parameters:
domainthe domain to obtain statistics from.
va #GfsVariable.
flagswhich types of cells are to be visited.
max_depthmaximum depth of the traversal.
conditiona condition or NULL.
cdatauser data to pass to condition.

Traverses the domain defined by domain using gfs_domain_cell_traverse() and gathers statistics about variable v.

Only cells veryfing condition are taken into account (if condition is not NULL). See also gfs_domain_cell_traverse_condition().

Returns:
a #GtsRange containing the statistics about v.

Here is the call graph for this function:

void gfs_domain_sum ( GfsDomain *  domain,
FttDirection  d,
GfsFunction *  f,
GfsVariable *  v 
)
Parameters:
domaina #GfsDomain.
dthe #FttDirection.
fa #GfsFunction.
va #GfsVariable.

Fills variable v of each cell of domain with the sum in direction d of the volume-weighted function f.

Here is the call graph for this function:

void gfs_domain_surface_bc ( GfsDomain *  domain,
GfsVariable *  v 
)
Parameters:
domaina #GfsDomain.
va #GfsVariable.

Apply boundary conditions for variable v on embedded surfaces.

Here is the call graph for this function:

Here is the caller graph for this function:

guint gfs_domain_tag_droplets ( GfsDomain *  domain,
GfsVariable *  c,
GfsVariable *  tag 
)
Parameters:
domaina #GfsDomain.
cthe volume fraction.
taga #GfsVariable.

Fills the tag variable of the cells of domain with the (strictly positive) index of the droplet they belong to. The cells belonging to the background phase have an index of zero.

Note that the volume fraction c must be defined on all levels.

Returns:
the number of droplets.

Here is the call graph for this function:

Here is the caller graph for this function:

void gfs_domain_timer_start ( GfsDomain *  domain,
const gchar *  name 
)
Parameters:
domaina #GfsDomain.
namethe name of the timer.

Starts timer name of domain. If name does not exist it is created first.

Here is the call graph for this function:

Here is the caller graph for this function:

void gfs_domain_timer_stop ( GfsDomain *  domain,
const gchar *  name 
)
Parameters:
domaina #GfsDomain.
namethe name of the timer.

Stops timer name of domain. This function fails if name is not a timer of domain.

Here is the call graph for this function:

Here is the caller graph for this function:

void gfs_domain_traverse_cut ( GfsDomain *  domain,
GfsGenericSurface *  s,
FttTraverseType  order,
FttTraverseFlags  flags,
FttCellTraverseCutFunc  func,
gpointer  data 
)
Parameters:
domaina #GfsDomain.
sa #GfsGenericSurface.
orderthe order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER.
flagswhich types of children are to be visited.
functhe function to call for each visited #FttCell.
datauser data to pass to func.

Calls func for each cell of domain cut by s.

Here is the caller graph for this function:

void gfs_domain_traverse_cut_2D ( GfsDomain *  domain,
GfsGenericSurface *  s,
FttTraverseType  order,
FttTraverseFlags  flags,
FttCellTraverseCutFunc  func,
gpointer  data 
)
Parameters:
domaina #GfsDomain.
sa #GfsGenericSurface.
orderthe order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER.
flagswhich types of children are to be visited.
functhe function to call for each visited #FttCell.
datauser data to pass to func.

Calls func for each cell of domain cut by s.

The cells are flattened in the z-direction.

void gfs_domain_traverse_layers ( GfsDomain *  domain,
FttCellTraverseFunc  func,
gpointer  data 
)
Parameters:
domaina #GfsDomain.
functhe function to call for each visited #FttCell.
datauser data to pass to func.

Traverses the leaf cells of domain for each layer. Calls the given function for each cell visited.

By default it is identical to gfs_domain_traverse_leaves() but can be overloaded for specific (layered) domains.

void gfs_domain_traverse_mixed ( GfsDomain *  domain,
FttTraverseType  order,
FttTraverseFlags  flags,
FttCellTraverseFunc  func,
gpointer  data 
)
Parameters:
domaina #GfsDomain.
orderthe order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER.
flagswhich types of children are to be visited.
functhe function to call for each visited #FttCell.
datauser data to pass to func.

Calls func for each mixed cell of domain.

Here is the caller graph for this function:

GfsVariable** gfs_domain_velocity ( GfsDomain *  domain)
Parameters:
domaina #GfsDomain.
Returns:
the components of the velocity vector for domain or NULL.

Here is the call graph for this function:

Here is the caller graph for this function:

GtsObject* gfs_object_from_name ( GfsDomain *  domain,
const gchar *  name 
)
Parameters:
domaina #GfsDomain.
namethe name.
Returns:
the object of domain called name or NULL.
GSList* gfs_receive_boxes ( GfsDomain *  domain,
int  src 
)
Parameters:
domaina #GfsDomain.
srcthe source processor id.

Receive boxes from src and adds them to domain.

Returns:
the list of boxes received.

Here is the call graph for this function:

GSList* gfs_receive_objects ( GfsDomain *  domain,
int  src 
)
Parameters:
domaina #GfsDomain.
srcthe rank of the source PE.

Receives a list of #GtsObject from PE src of a parallel simulation.

Returns:
a list of newly-allocated objects.

Here is the call graph for this function:

Here is the caller graph for this function:

GfsRequest* gfs_send_boxes ( GfsDomain *  domain,
GSList *  boxes,
int  dest 
)
Parameters:
domaina #GfsDomain.
boxesa list of #GfsBox belonging to domain.
destthe destination processor id.

Send boxes to dest and removes them from domain. This is a non-blocking operation.

Returns:
a #GfsRequest which must be cleared using gfs_wait().

Here is the call graph for this function:

GfsRequest* gfs_send_objects ( GSList *  list,
int  dest 
)
Parameters:
lista list of #GtsObject.
destthe rank of the destination PE.

Sends the objects in list to PE dest of a parallel simulation. This is a non-blocking operation which returns a handler which must be cleared by calling gfs_wait().

Note that this functions assumes that the write() method of the #GtsObject sent begins by writing the object class name.

Returns:
a #GfsRequest.

Here is the call graph for this function:

Here is the caller graph for this function:

void gfs_traverse_and_bc ( GfsDomain *  domain,
FttTraverseType  order,
FttTraverseFlags  flags,
gint  max_depth,
FttCellTraverseFunc  func,
gpointer  data,
GfsVariable *  v,
GfsVariable *  v1 
)
Parameters:
domaina #GfsDomain.
orderthe order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER.
flagswhich types of children are to be visited.
max_depththe maximum depth of the traversal. Cells below this depth will not be traversed. If max_depth is -1 all cells in the tree are visited.
functhe function to call for each visited #FttCell.
datauser data to pass to func.
va #GfsVariable.
v1another #GfsVariable.

gfs_domain_cell_traverse (domain, order, flags, max_depth, func, data); gfs_domain_copy_bc (domain, flags, max_depth, v, v1);

For parallel runs, the communications needed to apply the boundary conditions are overlapped with the calls to func in the bulk of the domain.

Here is the call graph for this function:

Here is the caller graph for this function:

void gfs_traverse_and_homogeneous_bc ( GfsDomain *  domain,
FttTraverseType  order,
FttTraverseFlags  flags,
gint  max_depth,
FttCellTraverseFunc  func,
gpointer  data,
GfsVariable *  ov,
GfsVariable *  v 
)
Parameters:
domaina #GfsDomain.
orderthe order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER.
flagswhich types of children are to be visited.
max_depththe maximum depth of the traversal. Cells below this depth will not be traversed. If max_depth is -1 all cells in the tree are visited.
functhe function to call for each visited #FttCell.
datauser data to pass to func.
ova #GfsVariable.
va #GfsVariable of which ov is an homogeneous version.

gfs_domain_cell_traverse (domain, order, flags, max_depth, func, data); gfs_domain_homogeneous_bc (domain, flags, max_depth, ov, v);

For parallel runs, the communications needed to apply the boundary conditions are overlapped with the calls to func in the bulk of the domain.

Here is the call graph for this function:

void gfs_wait ( GfsRequest *  r)
Parameters:
ra #GfsRequest.

Waits for completion of and deallocates r.

 All Data Structures Files Functions Variables