83 for (
int _s = 0;
_s < 1;
_s++) {
111 double Delta,
double *
f,
int len,
114 double fr[len],
fl[len],
er[2],
el[2];
122 for (
int i = 0;
i < len;
i++)
129 for (
int i = 0;
i < len;
i++)
141 for (
int _s = 0;
_s < 1;
_s++) {
159 for (
int _s = 0;
_s < 1;
_s++) {
202 double r[len],
l[len];
216 l[
i++] =
v.x[-1] +
dx*
t.x.x[-1];
218 r[
i] =
v.y[] -
dx*
t.y.x[];
219 l[
i++] =
v.y[-1] +
dx*
t.y.x[-1];
222 r[
i] =
v.z[] -
dx*
t.z.x[];
223 l[
i++] =
v.z[-1] +
dx*
t.z.x[-1];
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.
double zero(double s0, double s1, double s2)
vector * vectors_copy(vector *l)
scalar * list_concat(scalar *l1, scalar *l2)
scalar * list_copy(scalar *l)
int list_len(scalar *list)
tensor * tensors_from_vectors(vector *v)
vector * vectors_from_scalars(scalar *s)
vector * vectors_append(vector *list, vector v)
scalar f[]
The primary fields are:
double update_conservation(scalar *conserved, scalar *updates, double dtmax)
event cleanup(i=end) free(evolving)
At the end of the run we need to free the list (to avoid a memory leak).
scalar * evolving
The generic time-integration scheme in predictor-corrector.h needs to know which fields are updated i...
static double riemann(const double *right, const double *left, double Delta, double *f, int len, double dtmax)
void event_defaults(void)
Event: defaults (i = 0)
event init(i=0)
User initialisation happens here.
#define dx(s)
We first define some useful macros, following the notations in Bonneton et al, 2011.
static void restriction_volume_average(Point point, scalar s)
static void refine_linear(Point point, scalar s)
void set_prolongation(scalar s, void(*prolongation)(Point, scalar))
void set_restriction(scalar s, void(*restriction)(Point, scalar))
double(* update)(scalar *evolving, scalar *updates, double dtmax)
void gradients(scalar *f, vector *g)
Given a list of scalar fields f, this function fills the gradient fields g with the corresponding gra...
double theta
This is the generalised minmod limiter.