90# define sigma_kappa(eta, i) \
91 (sigma_n[i]*(eta[i+1] + eta[i-1] - 2.*eta[i])/sq(Delta))
93# define sigma_kappa(eta, i) \
94 ((sigma_d.x[i]*(0.2*(eta[i+1,1] + eta[i-1,1] - 2.*eta[i,1] + \
95 eta[i+1,-1] + eta[i-1,-1] - 2.*eta[i,-1]) + \
96 eta[i+1] + eta[i-1] - 2.*eta[i])/(1. + 2.*0.2) + \
97 sigma_d.y[i]*(0.2*(eta[i+1,1] + eta[i+1,-1] - 2.*eta[i+1] + \
98 eta[i-1,1] + eta[i-1,-1] - 2.*eta[i-1]) + \
99 eta[i,1] + eta[i,-1] - 2.*eta[i])/(1. + 2.*0.2) + \
100 sigma_n[i]*(eta[i+1,1] + eta[i-1,-1] - \
101 eta[i+1,-1] - eta[i-1,1]))/sq(Delta))
104#define p_baro(eta,i) (- G*eta[i] + sigma_kappa(eta, i))
105#define a_baro(eta, i) \
106 (gmetric(i)*(p_baro (eta, i) - p_baro (eta, i - 1))/Delta)
157 double H = 0.,
um = 0.;
159 double hl =
h[-1] >
dry ?
h[-1] : 0.;
160 double hr =
h[] >
dry ?
h[] : 0.;
164 H += (
h[] +
h[-1])/2.;
vector uf[]
We allocate the (face) velocity field.
double dtmax
The timestep is computed using the CFL condition on the face velocity field.
static number sq(number x)
return hxx pow(1.+sq(hx), 3/2.)
#define dx(s)
We first define some useful macros, following the notations in Bonneton et al, 2011.
void event_pressure(void)
At the end of the timestep we delete the auxilliary fields.
void event_face_fields(void)
The non-linear surface tension coefficient(s) are defined using the surface elevation at the beginnin...
void(* restriction)(Point, scalar)