77 typedef struct {
int s;
double h; }
HState;
111 for (
int i = 1;
i <= 4;
i++) {
118 if (
S > 0. &&
S < 1.) {
140 else if (
S >= 1. &&
ci <= 0.) {
185 h.x[] =
H + 100.*(1. + (
S >= 1.));
231 for (
int i = -2;
i <= 2;
i++)
258 s.x.boundary[
i] =
c.boundary[
i];
265 for (
int j = -1;
j <= 1;
j += 2) {
304 for (
int i = -2;
i <= 2;
i++)
325 for (
int i = -1;
i <= 1;
i++)
332 for (
int _c = 0;
_c < 4;
_c++)
337 for (
int i = -1;
i <= 1;
i++)
338 for (
int j = -1;
j <= 1;
j++) {
346 2.*H0 + (
H[2][2] +
H[2][0] +
H[0][0] +
H[0][2] +
347 30.*(
H[2][1] +
H[0][1] +
H[1][0] +
H[1][2]))/512.
349 double h1 = (
H[2][2] +
H[2][0] -
H[0][0] -
H[0][2] +
350 30.*(
H[2][1] -
H[0][1]))/128.;
351 double h2 = (
H[2][2] -
H[2][0] -
H[0][0] +
H[0][2] +
352 30.*(
H[1][2] -
H[1][0]))/128.;
353 double h3 = (
H[0][0] +
H[2][2] -
H[0][2] -
H[2][0])/32.;
354 for (
int _c = 0;
_c < 4;
_c++)
371 s.x.boundary[
i] =
c.boundary[
i];
378 for (
int j = -1;
j <= 1;
j += 2) {
384 for (
int _l = 0;
_l < 0;
_l++)
388 for (
int l = 1;
l <=
depth();
l++) {
405 for (
int _l = 0;
_l <
l - 1;
_l++)
#define boundary_iterate(type,...)
define neighbor(o, p, q)((Point)
scalar cs[]
The volume and area fractions are stored in these fields.
*cs[i, 0, 0] a *[i -1, 0, 0] j
static void half_column(Point point, scalar c, vector h, vector cs, int j)
trace void heights(scalar c, vector h)
The heights() function implementation is similar to the multigrid case, but the construction of the s...
static int orientation(double H)
attribute
An attribute is added so that the height function field can be associated to a (VOF) tracer.
int ori
If some children have not been initialised, we first check that the (three in 2D, nine in 3D) coarse ...
static void column_propagation(vector h)
static double height(double H)
void(* restriction)(Point, scalar)
void set_prolongation(scalar s, void(*prolongation)(Point, scalar))
void set_restriction(scalar s, void(*restriction)(Point, scalar))
static void no_restriction(Point point, scalar s)
static void no_data(Point point, scalar s)
def allocated(k, l, n)(mem_allocated(((Tree *) grid) -> L[point.level]->m, point.i+k, point.j+l)) @ @def NEIGHBOR(k, l, n)(((((Tree *) grid) ->L[point.level]->m) ->b[point.i+k][point.j+l])) @ @def PARENT(k, l, n)(((((Tree *) grid) ->L[point.level-1]->m) ->b[(point.i+2)/2+k][(point.j+2)/2+l])) @ @def allocated_child(k, l, n)(level< depth() &&mem_allocated(((Tree *) grid) ->L[point.level+1]->m, 2 *point.i- 2+k, 2 *point.j- 2+l)) @ @def CHILD(k, l, n)(((((Tree *) grid) ->L[point.level+1]->m) ->b[2 *point.i- 2+k][2 *point.j- 2+l])) @ @define CELL(m)(*((Cell *)(m))) @define depth()(grid->depth) @define aparent(k, l, n) CELL(PARENT(k, l, n)) @define child(k, l, n) CELL(CHILD(k, l, n)) @define cell CELL(NEIGHBOR(0, 0, 0)) @define neighbor(k, l, n) CELL(NEIGHBOR(k, l, n)) @def neighborp(l, m, n)(Point)
#define is_prolongation(cell)
#define foreach_halo(type, l)
#define is_boundary(cell)