Gerris
Classes | Functions

GfsFunction

Collaboration diagram for GfsFunction:

Classes

 GfsFunctionConstant
 GfsFunctionSpatial

Functions

GString * gfs_function_expression (GtsFile *fp, gboolean *is_expression)
GfsFunction * gfs_function_new (GfsFunctionClass *klass, gdouble val)
void gfs_function_set_units (GfsFunction *f, gdouble units)
gchar * gfs_function_description (GfsFunction *f, gboolean truncate)
gdouble gfs_function_value (GfsFunction *f, FttCell *cell)
gdouble gfs_function_face_value (GfsFunction *f, FttCellFace *fa)
void gfs_function_set_constant_value (GfsFunction *f, gdouble val)
gdouble gfs_function_get_constant_value (GfsFunction *f)
gboolean gfs_function_is_constant (const GfsFunction *f)
GfsVariable * gfs_function_get_variable (GfsFunction *f)
void gfs_function_read (GfsFunction *f, gpointer domain, GtsFile *fp)
void gfs_function_write (GfsFunction *f, FILE *fp)

Detailed Description

Numerical constants and expressions.

See also:

Syntax reference


Function Documentation

gchar* gfs_function_description ( GfsFunction *  f,
gboolean  truncate 
)
Parameters:
fa #GfsFunction.
truncatewhether to truncate long descriptions.
Returns:
a newly allocated string describing f.

Here is the caller graph for this function:

GString* gfs_function_expression ( GtsFile *  fp,
gboolean *  is_expression 
)
Parameters:
fpa #GtsFile.
is_expressiona pointer to a boolean or NULL.

Reads the expression (in which case is_expression is set to TRUE) or function from fp.

Returns:
a newly allocated GString containing the result or NULL in case of error.

Here is the call graph for this function:

gdouble gfs_function_face_value ( GfsFunction *  f,
FttCellFace *  fa 
)
Parameters:
fa #GfsFunction.
faa #FttCellFace.
Returns:
the value of function f at the center of face fa.

Here is the call graph for this function:

gdouble gfs_function_get_constant_value ( GfsFunction *  f)
Parameters:
fa #GfsFunction.
Returns:
the value of function f if f is constant, G_MAXDOUBLE otherwise.

Here is the caller graph for this function:

GfsVariable* gfs_function_get_variable ( GfsFunction *  f)
Parameters:
fa #GfsFunction.
Returns:
the variable containing the value of f if f is a simple variable, NULL otherwise.
gboolean gfs_function_is_constant ( const GfsFunction *  f)
Parameters:
fa #GfsFunction.
Returns:
TRUE if f is a constant, FALSE otherwise.
GfsFunction* gfs_function_new ( GfsFunctionClass *  klass,
gdouble  val 
)
Parameters:
klassa #GfsFunctionClass.
vala value.
Returns:
a new #GfsFunction with constant value val.

Here is the caller graph for this function:

void gfs_function_read ( GfsFunction *  f,
gpointer  domain,
GtsFile *  fp 
)
Parameters:
fa #GfsFunction.
domaina #GfsDomain.
fpa #GtsFile.

Calls the read() method of f.

Here is the caller graph for this function:

void gfs_function_set_constant_value ( GfsFunction *  f,
gdouble  val 
)
Parameters:
fa #GfsFunction.
valthe value.

Sets the value of the constant function f to val.

void gfs_function_set_units ( GfsFunction *  f,
gdouble  units 
)
Parameters:
fa #GfsFunction.
unitsthe units of f.

Sets the units of f.

Here is the caller graph for this function:

gdouble gfs_function_value ( GfsFunction *  f,
FttCell *  cell 
)
Parameters:
fa #GfsFunction.
cella #FttCell or NULL.
Returns:
the value of function f in cell.

Here is the call graph for this function:

void gfs_function_write ( GfsFunction *  f,
FILE *  fp 
)
Parameters:
fa #GfsFunction.
fpa file pointer.

Calls the write() method of f.

Here is the caller graph for this function:

 All Data Structures Files Functions Variables