Gerris
Classes | Functions

GfsGenericSurface

Collaboration diagram for GfsGenericSurface:

Classes

 GfsSurface

Functions

GfsGenericSurface * gfs_cell_is_cut (FttCell *cell, GfsGenericSurface *s, gboolean flatten, gint maxlevel)
void gfs_cell_traverse_cut (FttCell *root, GfsGenericSurface *s, FttTraverseType order, FttTraverseFlags flags, FttCellTraverseCutFunc func, gpointer data)
void gfs_cell_traverse_cut_2D (FttCell *root, GfsGenericSurface *s, FttTraverseType order, FttTraverseFlags flags, FttCellTraverseCutFunc func, gpointer data)
void gfs_generic_surface_read (GfsGenericSurface *s, gpointer sim, GtsFile *fp)
void gfs_generic_surface_write (GfsGenericSurface *s, gpointer sim, FILE *fp)
guint gfs_surface_segment_intersection (GfsGenericSurface *s, FttCell *cell, GfsSegment *I)
void gfs_surface_segment_normal (GfsGenericSurface *s, FttCell *cell, GfsSegment *I, GtsVector n)
gint gfs_surface_point_is_inside (GfsGenericSurface *s, FttVector *p)

Detailed Description

Abstract class for surfaces (an oriented surface (in 3D) or an oriented curve (in 2D)).

See also:

Syntax reference


Function Documentation

GfsGenericSurface* gfs_cell_is_cut ( FttCell *  cell,
GfsGenericSurface *  s,
gboolean  flatten,
gint  maxlevel 
)
Parameters:
cella #FttCell.
sa #GfsGenericSurface.
flattenif set to TRUE, cell is flattened in the z direction.
maxlevelthe maximum (virtual) cell level to consider.
Returns:
a (possibly new) #GfsGenericSurface containing a subset of s which may intersect cell or NULL if s does not intersect cell.
void gfs_cell_traverse_cut ( FttCell *  root,
GfsGenericSurface *  s,
FttTraverseType  order,
FttTraverseFlags  flags,
FttCellTraverseCutFunc  func,
gpointer  data 
)
Parameters:
rootthe root #FttCell of the tree to traverse.
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.

Traverses a cell tree starting at the given root #FttCell. Calls the given function for each cell cut by s.

void gfs_cell_traverse_cut_2D ( FttCell *  root,
GfsGenericSurface *  s,
FttTraverseType  order,
FttTraverseFlags  flags,
FttCellTraverseCutFunc  func,
gpointer  data 
)
Parameters:
rootthe root #FttCell of the tree to traverse.
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.

Traverses a cell tree starting at the given root #FttCell. Calls the given function for each cell cut by s.

The cells are "flattened" in the z-direction.

void gfs_generic_surface_read ( GfsGenericSurface *  s,
gpointer  sim,
GtsFile *  fp 
)
Parameters:
sa #GfsGenericSurface.
sima #GfsSimulation.
fpa #GtsFile.

Calls the read() method of s.

void gfs_generic_surface_write ( GfsGenericSurface *  s,
gpointer  sim,
FILE *  fp 
)
Parameters:
sa #GfsGenericSurface.
sima #GfsSimulation.
fpa file pointer.

Calls the write() method of s.

gint gfs_surface_point_is_inside ( GfsGenericSurface *  s,
FttVector *  p 
)
Parameters:
sa #GfsGenericSurface.
pa #FttVector.
Returns:
1 if p is inside s, 0 if p lies on the boundary of s, -1 otherwise.
guint gfs_surface_segment_intersection ( GfsGenericSurface *  s,
FttCell *  cell,
GfsSegment *  I 
)
Parameters:
sa #GfsGenericSurface.
cella #FttCell containing I.
Ia GfsSegment.

Fills I with the intersection of s and I.

Returns:
the number of times s intersects I.
void gfs_surface_segment_normal ( GfsGenericSurface *  s,
FttCell *  cell,
GfsSegment *  I,
GtsVector  n 
)
Parameters:
sa #GfsGenericSurface.
cella #FttCell containing I.
Ia GfsSegment.
na #GtsVector.

Fills n with the normal to s at the intersection of s and I.

 All Data Structures Files Functions Variables