48 for (
int _s = 0;
_s < 1;
_s++)
61 for (
int _s = 0;
_s < 1;
_s++)
68 display (
"squares (color = 'h > 0 ? zb + h : nodata', spread = -1);");
182 double sum = 0.,
n = 0.;
183 for (
int _c = 0;
_c < 4;
_c++)
201 g.
x = (
s[1] -
s[-1])/2.;
204 else if (
h[-1] >
dry)
213 for (
int _c = 0;
_c < 4;
_c++) {
vector g[]
We store the combined pressure gradient and acceleration field in g*.
double dtmax
The timestep is computed using the CFL condition on the face velocity field.
vector q[]
The primitive variables are the momentum , pressure , density , (face) specific volume ,...
scalar ps[]
The equation of state is defined by the pressure field ps and .
void display(const char *commands, bool overwrite=false)
static number sq(number x)
#define rho(f)
The density and viscosity are defined using arithmetic averages by default.
static void refine_linear(Point point, scalar s)
void event_acceleration(void)
One can check that the prolongation values constructed using these functions verify for a lake-at-re...
void event_stability(void)
Event: stability (i++)
scalar rhoc2v[]
We need fields to store the (varying) state fields , and the acceleration .
scalar zb[]
In addition to the momentum defined by the all Mach solver, we will need the fluid depth h (i....
void event_init(void)
After user initialisation we set the initial pressure and apply boundary conditions.
void eta_prolongation(Point point, scalar s)
Prolongation uses linear interpolation with a cell-centered gradient computed from simple finite-diff...
void eta_restriction(Point point, scalar s)
On trees things are a bit more complicated due to the necessity to verify the "lake-at-rest" conditio...
void event_defaults(void)
Event: defaults (i = 0)
void event_properties(void)
The properties of the fluid are given by the "Saint-Venant equation of state" i.e.
double CFLa
By default the timestep is only limited by the CFL condition on the advection velocity field.
double(* gradient)(double, double, double)
The utility functions in elevation.h need to know which gradient we are using.
scalar * tracers
Here we set the gradient functions for each tracer (as defined in the user-provided tracers list).
double minmod2(double s0, double s1, double s2)