| Gerris Flow Solver Reference Manual |
|---|
#include <gfs.h>void gfs_diffusion_rhs (FttCell *cell, GfsVariable *v);void gfs_diffusion_residual (FttCell *cell, GfsVariable *v);void gfs_diffusion_coefficients (GfsDomain *domain,GfsSourceDiffusion *d,gdouble dt);void gfs_diffusion_cycle (GfsDomain *domain,guint levelmin,guint depth,guint nrelax, GfsVariable *u);
void gfs_diffusion_rhs (FttCell *cell, GfsVariable *v);
Adds to the div variable of cell the right-hand side of the diffusion equation for variable v.
The diffusion coefficients must have been already set using
gfs_diffusion_coefficients().
| cell : | a FttCell. |
| v : | a GfsVariable. |
void gfs_diffusion_residual (FttCell *cell, GfsVariable *v);
Sets the res variable of cell to the residual of the diffusion equation for v.
The diffusion coefficients must have been set using
gfs_diffusion_coefficients() and the right-hand side using
gfs_diffusion_rhs().
| cell : | a FttCell. |
| v : | a GfsVariable. |
void gfs_diffusion_coefficients (GfsDomain *domain,GfsSourceDiffusion *d,gdouble dt);
Initializes the face coefficients for the diffusion equation.
| domain : | a GfsDomain. |
| d : | a |
| dt : | the time-step. |
void gfs_diffusion_cycle (GfsDomain *domain,guint levelmin,guint depth,guint nrelax, GfsVariable *u);
Apply one multigrid iteration to the diffusion equation for u.
The initial value of GFS_RES on the leaves of root must be set to
the residual of the diffusion equation using gfs_diffusion_residual().
The diffusion coefficients must be set using gfs_diffusion_coefficients().
The values of u on the leaf cells are updated as well as the values of GFS_RES (i.e. the cell tree is ready for another iteration).
| domain : | the domain on which to solve the diffusion equation. |
| levelmin : | the top level of the multigrid hierarchy. |
| depth : | the total depth of the domain. |
| nrelax : | the number of relaxations to apply at each level. |
| u : | the variable to use as left-hand side. |
| <<< Poisson solver | Simulations, initialisations, events >>> |