Details
GFS_SIMULATION_CLASS()
#define GFS_SIMULATION_CLASS(klass) |
GFS_SIMULATION()
#define GFS_SIMULATION(obj) |
GFS_IS_SIMULATION()
#define GFS_IS_SIMULATION(obj) |
struct GfsSimulationClass
struct GfsSimulationClass; |
struct GfsSimulation
struct GfsSimulation {
GfsDomain parent;
GfsTime time;
GfsPhysicalParams physical_params;
GfsProjectionParams projection_params;
GfsProjectionParams approx_projection_params;
GfsAdvectionParams advection_params;
GfsAdvectionParams tracer_advection_params;
GtsSurface * surface;
GNode * stree;
gboolean is_open;
GtsSListContainer * refines;
GtsSListContainer * adapts;
GtsSListContainer * events;
GSList * modules;
gdouble tnext;
}; |
struct GfsTime
struct GfsTime {
gdouble t, start, end;
guint i, istart, iend;
}; |
struct GfsPhysicalParams
struct GfsPhysicalParams {
gdouble rho;
}; |
gfs_init ()
void gfs_init (int *argc,
char ***argv); |
Initializes the Gerris library. This function must be called before
any other function of the library.
gfs_simulation_read ()
Read a simulation file from fp in sim.
gfs_simulation_refine ()
Calls the @refine() methods of the GfsRefine of sim. Matches the
boundaries by calling gfs_domain_match().
gfs_simulation_event_init ()
void gfs_simulation_event_init (GfsSimulation *sim,
GSList *events); |
Initalizes the events associated with sim. In particular, all the
"init" events are activated by this function.
gfs_simulation_set_timestep ()
Sets the time step for the next iteration of sim using the CFL
(computed using gfs_domain_cfl()) 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.
gfs_simulation_event ()
Checks if any event associated with sim must be activated and
activates it if necessary.
gfs_simulation_adapt ()
Checks if any mesh adaptation is necessary and adapts the mesh
using an OR combination of all the criteria defined in
simulation->adapts.
gfs_simulation_write ()
void gfs_simulation_write (GfsSimulation *sim,
gint max_depth,
FILE *fp); |
Writes in fp a text representation of sim. If max_depth is
smaller or equal to -2, no cell tree data is written.
gfs_simulation_run ()
Runs sim.
gfs_object_simulation()
#define gfs_object_simulation(o) (GTS_OBJECT (o)->reserved) |
gfs_time_init ()
Initializes the time structure t with default values.
gfs_time_read ()
void gfs_time_read (GfsTime *t,
GtsFile *fp); |
Reads a time structure from fp and puts it in t.
gfs_time_write ()
void gfs_time_write (GfsTime *t,
FILE *fp); |
Writes in fp a text representation of the time structure t.
gfs_physical_params_init ()
Initializes the physical parameters structure p with default values.
gfs_physical_params_read ()
Reads a physical parameters structure from fp and puts it in p.
gfs_physical_params_write ()
Writes in fp a text representation of the physical parameters
structure p.