Classes |
| GfsAdvection |
| GfsAxi |
| GfsOcean |
| GfsPoisson |
| GfsRiver |
| GfsSimulationMoving |
| GfsWave |
Functions |
void | gfs_advance_tracers (GfsSimulation *sim, gdouble dt) |
void | gfs_simulation_init (GfsSimulation *sim) |
guint | gfs_check_solid_fractions (GfsDomain *domain) |
GSList * | gfs_simulation_get_solids (GfsSimulation *sim) |
void | gfs_simulation_refine (GfsSimulation *sim) |
GfsSimulation * | gfs_simulation_read (GtsFile *fp) |
void | gfs_simulation_write (GfsSimulation *sim, gint max_depth, FILE *fp) |
void | gfs_simulation_union_write (GfsSimulation *sim, gint max_depth, FILE *fp) |
void | gfs_simulation_set_timestep (GfsSimulation *sim) |
void | gfs_time_write (GfsTime *t, FILE *fp) |
void | gfs_time_init (GfsTime *t) |
void | gfs_time_read (GfsTime *t, GtsFile *fp) |
void | gfs_physical_params_write (GfsPhysicalParams *p, FILE *fp) |
void | gfs_physical_params_init (GfsPhysicalParams *p) |
void | gfs_physical_params_read (GfsPhysicalParams *p, GfsDomain *domain, GtsFile *fp) |
void | gfs_simulation_run (GfsSimulation *sim) |
void | gfs_simulation_map (GfsSimulation *sim, FttVector *p) |
void | gfs_simulation_map_inverse (GfsSimulation *sim, FttVector *p) |
void | gfs_simulation_map_vector (GfsSimulation *sim, const FttVector *p, FttVector *v) |
void | gfs_simulation_map_inverse_vector (GfsSimulation *sim, const FttVector *p, FttVector *v) |
void | gfs_simulation_map_inverse_cell (GfsSimulation *sim, FttVector p[4]) |
gdouble | gfs_dimensional_value (GfsVariable *v, gdouble val) |
gboolean | gfs_variable_is_dimensional (GfsVariable *v) |
Detailed Description
The incompressible Euler solver.
- See also:
Syntax reference
Function Documentation
void gfs_advance_tracers |
( |
GfsSimulation * |
sim, |
|
|
gdouble |
dt |
|
) |
| |
- Parameters:
-
sim | a #GfsSimulation. |
dt | the timestep. |
Performs advection/difussion of tracers associated with sim.
guint gfs_check_solid_fractions |
( |
GfsDomain * |
domain | ) |
|
- Parameters:
-
Checks consistency of solid fractions.
- Returns:
- the number of partial fluid faces which do not have two neighbors.
gdouble gfs_dimensional_value |
( |
GfsVariable * |
v, |
|
|
gdouble |
val |
|
) |
| |
- Parameters:
-
v | a #GfsVariable. |
val | a non-dimensional value of v. |
- Returns:
- the dimensional value of val according to the units of v.
void gfs_physical_params_init |
( |
GfsPhysicalParams * |
p | ) |
|
- Parameters:
-
Initializes the physical parameters structure p with default values.
void gfs_physical_params_read |
( |
GfsPhysicalParams * |
p, |
|
|
GfsDomain * |
domain, |
|
|
GtsFile * |
fp |
|
) |
| |
- Parameters:
-
p | the #GfsPhysicalParams. |
domain | a #GfsDomain. |
fp | the #GtsFile. |
Reads a physical parameters structure from fp and puts it in p.
void gfs_physical_params_write |
( |
GfsPhysicalParams * |
p, |
|
|
FILE * |
fp |
|
) |
| |
- Parameters:
-
p | the physical parameters structure. |
fp | a file pointer. |
Writes in fp a text representation of the physical parameters structure p.
GSList* gfs_simulation_get_solids |
( |
GfsSimulation * |
sim | ) |
|
- Parameters:
-
- Returns:
- a new list of #GfsSolid defining the solid boundaries contained in sim.
void gfs_simulation_init |
( |
GfsSimulation * |
sim | ) |
|
- Parameters:
-
Initialises sim: matches boundary conditions, applies boundary conditions and initialises all variables, etc...
void gfs_simulation_map |
( |
GfsSimulation * |
sim, |
|
|
FttVector * |
p |
|
) |
| |
- Parameters:
-
sim | a #GfsSimulation. |
p | a #FttVector. |
Maps the physical space coordinates p into computational space.
void gfs_simulation_map_inverse |
( |
GfsSimulation * |
sim, |
|
|
FttVector * |
p |
|
) |
| |
- Parameters:
-
sim | a #GfsSimulation. |
p | a #FttVector. |
Maps the computational coordinates p into physical space.
void gfs_simulation_map_inverse_cell |
( |
GfsSimulation * |
sim, |
|
|
FttVector |
p[4] |
|
) |
| |
- Parameters:
-
sim | a #GfsSimulation. |
p | an array of #FttVector. |
Array p should contain the (x,y) coordinates of the four corners of a #FttCell. This function will inverse transform these coordinates taking into account any specificity of the mapping (e.g. periodicity).
void gfs_simulation_map_inverse_vector |
( |
GfsSimulation * |
sim, |
|
|
const FttVector * |
p, |
|
|
FttVector * |
v |
|
) |
| |
- Parameters:
-
sim | a #GfsSimulation. |
p | the position. |
v | a #FttVector. |
Applies the inverse mapping transformations associated with sim at location p, to vector v.
void gfs_simulation_map_vector |
( |
GfsSimulation * |
sim, |
|
|
const FttVector * |
p, |
|
|
FttVector * |
v |
|
) |
| |
- Parameters:
-
sim | a #GfsSimulation. |
p | the position. |
v | a #FttVector. |
Applies the mapping transformations associated with sim at location p, to vector v.
GfsSimulation* gfs_simulation_read |
( |
GtsFile * |
fp | ) |
|
- Parameters:
-
Reads a simulation file from fp.
- Returns:
- the #GfsSimulation or NULL if an error occured, in which case the pos and error fields of fp are set.
void gfs_simulation_refine |
( |
GfsSimulation * |
sim | ) |
|
- Parameters:
-
Calls the refine() methods of the #GfsRefine of sim. Initialize the solid fractions by calling gfs_init_solid_fractions(). Matches the boundaries by calling gfs_domain_match().
void gfs_simulation_run |
( |
GfsSimulation * |
sim | ) |
|
void gfs_simulation_set_timestep |
( |
GfsSimulation * |
sim | ) |
|
- Parameters:
-
Sets the time step for the next iteration of sim using the CFL (computed using gfs_domain_cfl()), the stability conditions for source terms and taking into account the timings of the various #GfsEvent associated to sim.
More precisely, the time step is adjusted (if necessary) so that the time of the closest event is exactly reached after the iteration.
void gfs_simulation_union_write |
( |
GfsSimulation * |
sim, |
|
|
gint |
max_depth, |
|
|
FILE * |
fp |
|
) |
| |
- Parameters:
-
sim | a #GfsSimulation. |
max_depth | the maximum depth at which to stop writing cell tree data (-1 means no limit). |
fp | a file pointer. |
Identical to gfs_simulation_write() for serial simulations. For parallel simulations writes the union of the simulations on all processes to fp.
void gfs_simulation_write |
( |
GfsSimulation * |
sim, |
|
|
gint |
max_depth, |
|
|
FILE * |
fp |
|
) |
| |
- Parameters:
-
sim | a #GfsSimulation. |
max_depth | the maximum depth at which to stop writing cell tree data (-1 means no limit). |
fp | a file pointer. |
Writes in fp a text representation of sim. If max_depth is smaller or equal to -2, no cell tree data is written.
void gfs_time_init |
( |
GfsTime * |
t | ) |
|
- Parameters:
-
Initializes the time structure t with default values.
void gfs_time_read |
( |
GfsTime * |
t, |
|
|
GtsFile * |
fp |
|
) |
| |
- Parameters:
-
t | the #GfsTime. |
fp | the #GtsFile. |
Reads a time structure from fp and puts it in t.
void gfs_time_write |
( |
GfsTime * |
t, |
|
|
FILE * |
fp |
|
) |
| |
- Parameters:
-
t | the time structure. |
fp | a file pointer. |
Writes in fp a text representation of the time structure t.
gboolean gfs_variable_is_dimensional |
( |
GfsVariable * |
v | ) |
|
- Parameters:
-
- Returns:
- TRUE if v has dimensions, FALSE otherwise.