Gerris Flow Solver Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
struct GfsDomain { GtsWGraph parent; int pid; GTimer * timer; GtsRange mac_projection; GtsRange approximate_projection; GtsRange centered_velocity_advection; GtsRange tracer_advection; GtsRange predicted_face_velocities; GtsRange adapt; GtsRange timestep; GtsRange size; GtsRange pressure_bc; GtsRange center_bc; GtsRange face_bc; GtsRange match; gboolean profile_bc; GtsRange mpi_messages; GtsRange mpi_wait; guint rootlevel; FttVector refpos; GfsVariable * variables; gint max_depth_write; }; |
void gfs_domain_cell_traverse (GfsDomain *domain, FttTraverseType order, FttTraverseFlags flags, |
Traverses the cell trees of domain. Calls the given function for each cell visited.
domain : | a GfsDomain. |
order : | the order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER. |
flags : | which types of children are to be visited. |
max_depth : | the 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. |
func : | the function to call for each visited FttCell. |
data : | user data to pass to func. |
void gfs_domain_cell_traverse_boundary (GfsDomain *domain, FttDirection d, FttTraverseType order, FttTraverseFlags flags, |
Traverses the boundary of a domain in direction d. Calls the given function for each cell visited.
domain : | a GfsDomain. |
d : | the direction of the boundary 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. |
max_depth : | the 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. |
func : | the function to call for each visited FttCell. |
data : | user data to pass to func. |
void gfs_domain_cell_traverse_box (GfsDomain *domain, |
Traverses the cell trees of domain. Calls the given function for each cell visited. Only the cells overlapping with box are visited.
domain : | a GfsDomain. |
box : | a |
order : | the order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER. |
flags : | which types of children are to be visited. |
max_depth : | the 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. |
func : | the function to call for each visited FttCell. |
data : | user data to pass to func. |
void gfs_domain_traverse_mixed (GfsDomain *domain, FttCellTraverseFunc func, |
Calls func for each leaf mixed cell of domain.
void gfs_domain_face_traverse (GfsDomain *domain, FttComponent c, FttTraverseType order, FttTraverseFlags flags, |
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.
domain : | a GfsDomain. |
c : | only the faces orthogonal to this component will be traversed - one of FTT_X, FTT_Y, (FTT_Z), FTT_XYZ. |
order : | the order in which the cells are visited - FTT_PRE_ORDER, FTT_POST_ORDER. |
flags : | which types of children and faces are to be visited. |
max_depth : | the 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. |
func : | the function to call for each visited FttCellFace. |
data : | user data to pass to func. |
FttCell* gfs_domain_locate (GfsDomain *domain, FttVector target, |
Locates the cell of domain containing target. This is done efficiently in log(n) operations by using the topology of the cell trees.
void gfs_domain_pressure_bc (GfsDomain *domain, FttTraverseFlags flags, |
Calls the @
domain : | a GfsDomain. |
flags : | the traversal flags. |
max_depth : | the maximum depth of the traversal. |
p : | the GfsVariable to use as pressure. |
void gfs_domain_center_bc (GfsDomain *domain, GfsVariable *v); |
Calls the @
domain : | a GfsDomain. |
v : | a GfsVariable. |
void gfs_domain_face_bc (GfsDomain *domain, FttComponent c, GfsVariable *v); |
Calls the @
domain : | a GfsDomain. |
c : | a component. |
v : | a GfsVariable. |
void gfs_domain_match (GfsDomain *domain); |
Calls the @
domain : | a GfsDomain. |
|
domain : | a 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). |
|
Traverses the domain defined by domain using gfs_domain_cell_traverse() and gathers statistics about variable v.
domain : | the domain to obtain statistics from. |
v : | a GfsVariable. |
flags : | which types of cells are to be visited. |
max_depth : | maximum depth of the traversal. |
Returns : | a |
GfsNorm gfs_domain_norm_variable (GfsDomain *domain, GfsVariable *v, FttTraverseFlags flags, |
Traverses the domain defined by domain using gfs_domain_cell_traverse() and gathers norm statistics about variable v.
domain : | the domain to obtain norm from. |
v : | a GfsVariable. |
flags : | which types of cells are to be visited. |
max_depth : | maximum depth of the traversal. |
Returns : | a GfsNorm containing the norm statistics about v. |
GfsNorm gfs_domain_norm_velocity (GfsDomain *domain, FttTraverseFlags flags, |
Traverses the domain defined by domain using gfs_domain_cell_traverse() and gathers norm statistics about velocity.
domain : | the domain to obtain the norm from. |
flags : | which types of cells are to be visited. |
max_depth : | maximum depth of the traversal. |
Returns : | a GfsNorm containing the norm statistics about the velocity. |
void gfs_domain_stats_balance (GfsDomain *domain, |
Gathers statistics about the sizes of the domains, their parallel boundaries and the execution time on each PE.
domain : | the domain to obtain statistics from. |
size : | |
boundary : | |
mpiwait : | |
|
Traverses the domain defined by domain using gfs_domain_traverse_mixed() and gathers statistics about the solid volume fraction in mixed cells.
domain : | the domain to obtain statistics from. |
Returns : | statistics about the solid volume fraction a in mixed cells. |
|
Adds to domain the graph nodes (GfsBox) and edges and the corresponding boundaries (GfsBoundaryMpi if necessary) defined in fp.
domain : | a GfsDomain. |
fp : | a |
Returns : | 0 on success or the line number at which an error occured, in which case the corresponding fp fields (pos and error) are set. |
void gfs_domain_split (GfsDomain *domain, |
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.
domain : | a GfsDomain. |
one_box_per_pe : | if TRUE each new box created is assigned to a different process, otherwise the newly created box inherits the pid of its parent. |
void gfs_domain_adapt (GfsDomain *domain, |
Adapts the local mesh size according to the criteria defined by refine. Leaf cells for which refine returns TRUE are refined and non-leaf cells for which refine returns FALSE are coarsened. The variables on the refined or coarsened cells are initialized by interpolation from the initial mesh.
domain : | a GfsDomain. |
minlevel : | the minimum level reachable when coarsening. |
maxlevel : | the maximum level reachable when refining. |
refine : | a FttCellRefineFunc used to decide when to refine or coarsen. |
refine_data : | user data to pass to refine. |
void gfs_domain_advect_point (GfsDomain *domain, |
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.
domain : | a GfsDomain. |
p : | a |
dt : | the time step. |
|
domain : | a GfsDomain. |
flags : | which types of cells are to be visited. |
max_depth : | maximum 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. |
|
domain : | a GfsDomain. |
flags : | which types of cells are to be visited. |
max_depth : | maximum depth of the traversal. |
Returns : | the number of cells of domain traversed using flags and max_depth. |