18 for (
int _c = 0;
_c < 4;
_c++)
32 long len =
a->len/
sizeof(
double);
33 double *
p = (
double *)
a->p;
36 if (
tag ==
p[len - 1])
39 long s = 0,
e = len - 1;
53 const double *
a =
p1, *
b =
p2;
134 for (
int _n = 0;
_n < 1;
_n++)
135 if (
t[] &&
t[] <
min)
144 for (
int i = -1;
i <= 2;
i += 3)
146 for (
int j = 0;
j <= 1;
j++)
147 for (
int k = 0;
k <= 1;
k++)
181 double tag =
t[], *
ap = (
double *)
a->p;
183 if (
a->len == 0 ||
tag >
ap[
a->len/
sizeof(
double) - 1])
185 else if (
tag <
ap[0])
205 for (
int i =
a->len/
sizeof(
double) - 1;
i >
s;
i--)
233 for (
int i =
a->len/
sizeof(
double);
i <
lmax;
i++)
273 return *(
const long *)
a < *(
const long *)
b;
297 for (
int i = 0;
i <
n;
i++)
vector q[]
The primitive variables are the momentum , pressure , density , (face) specific volume ,...
void array_free(Array *a)
void * array_append(Array *a, void *elem, size_t size)
void(* boundary_level)(scalar *, int l)
define m((k)==0 &&(l)==0 &&(m)==0) macro2 foreach_point(double _x=0.
define neighbor(o, p, q)((Point)
scalar f[]
The primary fields are:
define sysmalloc malloc define syscalloc calloc define sysrealloc realloc define sysfree free define systrdup strdup define line line realloc(p, s) @ define pfree(p
return hxx pow(1.+sq(hx), 3/2.)
*cs[i, 0, 0] a *[i -1, 0, 0] j
void(* restriction)(Point, scalar)
static void refine_injection(Point point, scalar v)
void set_prolongation(scalar s, void(*prolongation)(Point, scalar))
trace double z_indexing(scalar index, bool leaves)
static int sort_long(const void *a, const void *b)
static long lookup_tag(Array *a, double tag)
We also need a few helper functions.
void remove_droplets(scalar f, int minsize=3, double threshold=1e-4, bool bubbles=false)
static void restriction_tag(Point point, scalar t)
define n n define coarse(a, k, p, n)((double *)(PARENT(k