Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
fractions.h
Go to the documentation of this file.
1/** @file fractions.h
2 */
3/**
4# Volume fractions
5
6These functions are used to maintain or define volume and surface
7fractions either from an initial geometric definition or from an
8existing volume fraction field.
9
10We will use basic geometric functions for square cut cells and the
11"Mixed-Youngs-Centered" (MYC) normal approximation of Ruben
12Scardovelli. */
13
14#include "geometry.h"
15#if dimension == 1
17 return (coord){sign(c[-1] - c[1])};
18}
19#elif dimension == 2
20# include "myc2d.h"
21#else // dimension == 3
22# include "myc.h"
23#endif
24
25/**
26By default the interface normal is computed using the MYC
27approximation. This can be overloaded by redefining this macro. */
28
30 return mycs (p, c);
31}
32
33/**
34## Coarsening and refinement of a volume fraction field
35
36On trees, we need to define how to coarsen (i.e. "restrict") or
37refine (i.e. "prolongate") interface definitions (see [geometry.h]()
38for a basic explanation of how interfaces are defined). */
39
40#if TREE
41
43{
44
45 /**
46 If the parent cell is empty or full, we just use the same value for
47 the fine cell. */
48
49 double cc = c[];
50 if (cc <= 0. || cc >= 1.)
51 for (int _c = 0; _c < 4; _c++) /* foreach_child */
52 c[] = cc;
53 else {
54
55 /**
56 Otherwise, we reconstruct the interface in the parent cell. */
57
58 coord n = mycs (point, c);
59 double alpha = plane_alpha (cc, n);
60
61 /**
62 And compute the volume fraction in the quadrant of the coarse cell
63 matching the fine cells. We use symmetries to simplify the
64 combinations. */
65
66 for (int _c = 0; _c < 4; _c++) /* foreach_child */ {
67 static const coord a = {0.,0.,0.}, b = {.5,.5,.5};
68 coord nc;
69 for (int _d = 0; _d < dimension; _d++)
70 nc.x = child.x*n.x;
71 c[] = rectangle_fraction (nc, alpha, a, b);
72 }
73 }
74}
75
76/**
77Finally, we also need to prolongate the reconstructed value of
78\f$\alpha\f$. This is done with the simple formula below. We add an
79attribute so that we can access the normal from the refinement
80function. */
81
83 vector n;
84}
85
87{
88 vector n = alpha.n;
89 double alphac = 2.*alpha[];
90 coord m;
91 for (int _d = 0; _d < dimension; _d++)
92 m.x = n.x[];
93 for (int _c = 0; _c < 4; _c++) /* foreach_child */ {
94 alpha[] = alphac;
95 for (int _d = 0; _d < dimension; _d++)
96 alpha[] -= child.x*m.x/2.;
97 }
98}
99
100#endif // TREE
101
102/**
103## Computing volume fractions from a "levelset" function
104
105Initialising a volume fraction field representing an interface is not
106trivial since it involves the numerical evaluation of surface
107integrals.
108
109Here we define a function which allows the approximation of these
110surface integrals in the case of an interface defined by a "levelset"
111function \f$\Phi\f$ sampled on the *vertices* of the grid.
112
113By convention the "inside" of the interface corresponds to \f$\Phi > 0\f$.
114
115The function takes the scalar field \f$\Phi\f$ as input and fills
116`c` with the volume fraction and, optionally if it is given, `s`
117with the surface fractions i.e. the fractions of the faces of the cell
118which are inside the interface.
119
120![Volume and surface fractions](/src/figures/fractions.svg) */
121
122trace
124 vector s = {0}, double val = 0.)
125{
126#if dimension > 1
127 vector as = automatic (s);
128
129 /**
130 We store the positions of the intersections of the surface with the
131 edges of the cell in vector field `p`. In two dimensions, this field
132 is just the transpose of the *line fractions* `s`, in 3D we need to
133 allocate a new field. */
134
135#if dimension == 3
136 vector p[];
137#else // dimension == 2
138 vector p;
139 p.x = as.y; p.y = as.x;
140#endif
141
142 /**
143 ### Line fraction computation
144
145 We start by computing the *line fractions* i.e. the (normalised)
146 lengths of the edges of the cell within the surface. */
147
148 foreach_edge() {
149
150 /**
151 If the values of \f$\Phi\f$ on the vertices of the edge have opposite
152 signs, we know that the edge is cut by the interface. */
153
154 if ((Phi[] - val)*(Phi[1] - val) < 0.) {
155
156 /**
157 In that case we can find an approximation of the interface position by
158 simple linear interpolation. We also check the sign of one of the
159 vertices to orient the interface properly. */
160
161 p.x[] = (Phi[] - val)/(Phi[] - Phi[1]);
162 if (Phi[] < val)
163 p.x[] = 1. - p.x[];
164 }
165
166 /**
167 If the values of \f$\Phi\f$ on the vertices of the edge have the same sign
168 (or are zero), then the edge is either entirely outside or entirely
169 inside the interface. We check the sign of both vertices to treat
170 limit cases properly (when the interface intersects the edge exactly
171 on one of the vertices). */
172
173 else
174 p.x[] = (Phi[] > val || Phi[1] > val);
175 }
176
177 /**
178 ### Surface fraction computation
179
180 We can now compute the surface fractions. In 3D they will be
181 computed for each face (in the z, x and y directions) and stored in
182 the face field `s`. In 2D the surface fraction in the z-direction is
183 the *volume fraction* `c`. */
184
185#if dimension == 3
186
187 /**
188 In 3D we need to prevent boundary conditions, since this would
189 impose vertex field BCs which are not (apparently) consistent for
190 the edge intersection coordinates. This can probably be improved. */
191
192 for (int _d = 0; _d < dimension; _d++)
193 p.x.stencil.bc |= s_centered|s_face;
194
195 scalar s_x = as.x, s_y = as.y, s_z = as.z;
196 for (int _i = 0; _i < _N; _i++) /* foreach_face */
197#else // dimension == 2
198 scalar s_z = c;
199 for (int _i = 0; _i < _N; _i++) /* foreach */
200#endif
201 {
202
203 /**
204 We first compute the normal to the interface. This can be done easily
205 using the line fractions. The idea is to compute the circulation of
206 the normal along the boundary \f$\partial\Omega\f$ of the fraction of the
207 cell \f$\Omega\f$ inside the interface. Since this is a closed curve, we
208 have
209 \f[
210 \oint_{\partial\Omega}\mathbf{n}\;dl = 0
211 \f]
212 We can further decompose the integral into its parts along the edges
213 of the square and the part along the interface. For the case pictured
214 above, we get for one component (and similarly for the other)
215 \f[
216 - s_x[] + \oint_{\Phi=0}n_x\;dl = 0
217 \f]
218 If we now define the *average normal* to the interface as
219 \f[
220 \overline{\mathbf{n}} = \oint_{\Phi=0}\mathbf{n}\;dl
221 \f]
222 We have in the general case
223 \f[
224 \overline{\mathbf{n}}_x = s_x[] - s_x[1,0]
225 \f]
226 and
227 \f[
228 |\overline{\mathbf{n}}| = \oint_{\Phi=0}\;dl
229 \f]
230 Note also that this average normal is exact in the case of a linear
231 interface. */
232
233 coord n;
234 double nn = 0.;
236 n.x = p.y[] - p.y[1];
237 nn += fabs(n.x);
238 }
239
240 /**
241 If the norm is zero, the cell is full or empty and the surface fraction
242 is identical to one of the line fractions. */
243
244 if (nn == 0.)
245 s_z[] = p.x[];
246 else {
247
248 /**
249 Otherwise we are in a cell containing the interface. We first
250 normalise the normal. */
251
253 n.x /= nn;
254
255 /**
256 To find the intercept \f$\alpha\f$, we look for edges which are cut by the
257 interface, find the coordinate \f$a\f$ of the intersection and use it to
258 derive \f$\alpha\f$. We take the average of \f$\alpha\f$ for all intersections. */
259
260 double alpha = 0., ni = 0.;
261 for (int i = 0; i <= 1; i++)
263 if (p.x[0,i] > 0. && p.x[0,i] < 1.) {
264 double a = sign(Phi[0,i] - val)*(p.x[0,i] - 0.5);
265 alpha += n.x*a + n.y*(i - 0.5);
266 ni++;
267 }
268
269 /**
270 Once we have \f$\mathbf{n}\f$ and \f$\alpha\f$, the (linear) interface
271 is fully defined and we can compute the surface fraction using
272 our pre-defined function. For marginal cases, the cell is full
273 or empty (*ni == 0*) and we look at the line fractions to
274 decide. */
275
276 if (ni == 0)
277 s_z[] = max (p.x[], p.y[]);
278 else if (ni != 4)
279 s_z[] = line_area (n.x, n.y, alpha/ni);
280 else {
281#if dimension == 3
282 s_z[] = (p.x[] + p.x[0,1] + p.y[] + p.y[1] > 2.);
283#else
284 s_z[] = 0.;
285#endif
286 }
287 }
288 }
289
290 /**
291 ### Volume fraction computation
292
293 To compute the volume fraction in 3D, we use the same approach. */
294
295#if dimension == 3
296 for (int _i = 0; _i < _N; _i++) /* foreach */ {
297
298 /**
299 Estimation of the average normal from the surface fractions. */
300
301 coord n;
302 double nn = 0.;
304 n.x = as.x[] - as.x[1];
305 nn += fabs(n.x);
306 }
307 if (nn == 0.)
308 c[] = as.x[];
309 else {
311 n.x /= nn;
312
313 /**
314 We compute the average value of *alpha* by looking at the
315 intersections of the surface with the twelve edges of the
316 cube. */
317
318 double alpha = 0., ni = 0.;
319 for (int i = 0; i <= 1; i++)
320 for (int j = 0; j <= 1; j++)
322 if (p.x[0,i,j] > 0. && p.x[0,i,j] < 1.) {
323 double a = sign(Phi[0,i,j] - val)*(p.x[0,i,j] - 0.5);
324 alpha += n.x*a + n.y*(i - 0.5) + n.z*(j - 0.5);
325 ni++;
326 }
327
328 /**
329 Finally we compute the volume fraction. */
330
331 if (ni == 0)
332 c[] = as.x[];
333 else if (ni < 3 || ni > 6)
334 c[] = 0.; // this is important for robustness of embedded boundaries
335 else
336 c[] = plane_volume (n, alpha/ni);
337 }
338 }
339#endif // dimension == 3
340#else // dimension == 1
341 if (s.x.i)
342 for (int _i = 0; _i < _N; _i++) /* foreach_face */
343 s.x[] = Phi[] > 0.;
344 for (int _i = 0; _i < _N; _i++) /* foreach */
345 if ((Phi[] - val)*(Phi[1] - val) < 0.) {
346 c[] = (Phi[] - val)/(Phi[] - Phi[1]);
347 if (Phi[] < val)
348 c[] = 1. - c[];
349 }
350 else
351 c[] = (Phi[] > val || Phi[1] > val);
352#endif
353}
354
355/**
356The convenience macros below can be used to define volume and surface
357fraction fields directly from a function. */
358
360{
361 {
362 scalar phi[];
363 for (int _i = 0; _i < _N; _i++) /* foreach_vertex */
364 phi[] = func;
365 fractions (phi, f);
366 }
367}
368
370{
371 {
372 scalar phi[];
373 for (int _i = 0; _i < _N; _i++) /* foreach_vertex */
374 phi[] = func;
375 fractions (phi, cs, fs);
376 }
377}
378
379/**
380### Boolean operations
381
382Implicit surface representations have the advantage of allowing simple
383[constructive solid
384geometry](https://en.wikipedia.org/wiki/Constructive_solid_geometry)
385operations. */
386
387#define intersection(a,b) min(a,b)
388#define union(a,b) max(a,b)
389#define difference(a,b) min(a,-(b))
390
391/**
392## Interface reconstruction from volume fractions
393
394The reconstruction of the interface geometry from the volume fraction
395field requires computing an approximation to the interface normal.
396
397### Youngs normal approximation
398
399This a simple, but relatively inaccurate way of approximating the
400normal. It is simply a weighted average of centered volume fraction
401gradients. We include it as an example but it is not used. */
402
404{
405 coord n;
406 double nn = 0.;
407 assert (dimension == 2);
408 for (int _d = 0; _d < dimension; _d++) {
409 n.x = (c[-1,1] + 2.*c[-1,0] + c[-1,-1] -
410 c[+1,1] - 2.*c[+1,0] - c[+1,-1]);
411 nn += fabs(n.x);
412 }
413 // normalize
414 if (nn > 0.)
415 for (int _d = 0; _d < dimension; _d++)
416 n.x /= nn;
417 else // this is a small fragment
418 n.x = 1.;
419 return n;
420}
421
422/**
423### Normal approximation using MYC or face fractions
424*/
425
427{
428 if (s.x.i >= 0) { // compute normal from face fractions
429 coord n;
430 double nn = 0.;
431 for (int _d = 0; _d < dimension; _d++) {
432 n.x = s.x[] - s.x[1];
433 nn += fabs(n.x);
434 }
435 if (nn > 0.)
436 for (int _d = 0; _d < dimension; _d++)
437 n.x /= nn;
438 else
439 for (int _d = 0; _d < dimension; _d++)
440 n.x = 1./dimension;
441 return n;
442 }
443 return interface_normal (point, c);
444}
445
446/**
447### Interface reconstruction
448
449The reconstruction function takes a volume fraction field `c` and
450returns the corresponding normal vector field `n` and intercept field
451\f$\alpha\f$. */
452
453trace
455{
456 for (int _i = 0; _i < _N; _i++) /* foreach */ {
457
458 /**
459 If the cell is empty or full, we set \f$\mathbf{n}\f$ and \f$\alpha\f$ only to
460 avoid using uninitialised values in `alpha_refine()`. */
461
462 if (c[] <= 0. || c[] >= 1.) {
463 alpha[] = 0.;
464 for (int _d = 0; _d < dimension; _d++)
465 n.x[] = 0.;
466 }
467 else {
468
469 /**
470 Otherwise, we compute the interface normal using the
471 Mixed-Youngs-Centered scheme, copy the result into the normal field
472 and compute the intercept \f$\alpha\f$ using our predefined function. */
473
475 for (int _d = 0; _d < dimension; _d++)
476 n.x[] = m.x;
477 alpha[] = plane_alpha (c[], m);
478 }
479 }
480
481#if TREE
482
483 /**
484 On a tree grid, for the normal to the interface, we don't use
485 any interpolation from coarse to fine i.e. we use straight
486 "injection". */
487
488 for (int _d = 0; _d < dimension; _d++)
489 n.x.refine = n.x.prolongation = refine_injection;
490
491 /**
492 We set our refinement function for *alpha*. */
493
494 alpha.n = n;
495 alpha.refine = alpha.prolongation = alpha_refine;
496#endif
497}
498
499/**
500## Interface output
501
502This function "draws" interface facets in a file. The segment
503endpoints are defined by pairs of coordinates. Each pair of endpoints
504is separated from the next pair by a newline, so that the resulting
505file is directly visualisable with gnuplot.
506
507The input parameters are a volume fraction field `c`, an optional file
508pointer `fp` (which defaults to stdout) and an optional face
509vector field `s` containing the surface fractions.
510
511If `s` is specified, the surface fractions are used to compute the
512interface normals which leads to a continuous interface representation
513in most cases. Otherwise the interface normals are approximated from
514the volume fraction field, which results in a piecewise continuous
515(i.e. geometric VOF) interface representation. */
516
517trace
518void output_facets (scalar c, FILE * fp = stdout, vector s = {{-1}})
519{
520 foreach (serial)
521 if (c[] > 1e-6 && c[] < 1. - 1e-6) {
522 coord n = facet_normal (point, c, s);
523 double alpha = plane_alpha (c[], n);
524#if dimension == 1
525 fprintf (fp, "%g\n", x + Delta*alpha/n.x);
526#elif dimension == 2
527 coord segment[2];
528 if (facets (n, alpha, segment) == 2)
529 fprintf (fp, "%g %g\n%g %g\n\n",
530 x + segment[0].x*Delta, y + segment[0].y*Delta,
531 x + segment[1].x*Delta, y + segment[1].y*Delta);
532#else // dimension == 3
533 coord v[12];
534 int m = facets (n, alpha, v, 1.);
535 for (int i = 0; i < m; i++)
536 fprintf (fp, "%g %g %g\n",
537 x + v[i].x*Delta, y + v[i].y*Delta, z + v[i].z*Delta);
538 if (m > 0)
539 fputc ('\n', fp);
540#endif
541 }
542
543 fflush (fp);
544}
545
546/**
547## Interfacial area
548
549This function returns the surface area of the interface as estimated
550using its VOF reconstruction. */
551
552trace
554{
555 double area = 0.;
556 foreach (reduction(+:area))
557 if (c[] > 1e-6 && c[] < 1. - 1e-6) {
559 double alpha = plane_alpha (c[], n);
561 }
562 return area;
563}
564
565/**
566## Face fraction
567
568We wish to calculate the fraction of face surface occupied by a phase defined
569by a volume fraction field. This operation can be useful in different contexts,
570for example the solution of the diffusion equation in a specific phase.
571
572The surface fraction is computed as the intersection between the face of the
573cell under investigation and the PLIC interface fragment. The problem boils down
574to the calculation of the intersection between the interfacial plane and the
575coordinate of the cell face (\f$x = x_o\f$). In 2D:
576
577\f[
578 y = \frac{\alpha - m_x x_o}{m_y}
579\f]
580
581after shifting the reference frame and handling degenerate cases (\f$m_y = 0\f$).
582In 3D, this concept is extended by computing the area occupied by the phase.
583The plane is considered either on the left or on the right side of the face, as
584controlled using the boolean `right`. */
585
586for (int _d = 0; _d < dimension; _d++)
587static double interface_fraction_x (coord m, double alpha, bool right) {
588#if dimension == 1
589 return 1;
590#elif dimension == 2
591 if (fabs (m.y) < 1e-4) // degenerate case
592 return right ? (m.x < 0. ? 1. : 0.)
593 : (m.x > 0. ? 1. : 0.);
594
595 alpha += 0.5*(m.x + m.y);
596 if (m.y < 0.) {
597 alpha -= m.y;
598 m.y *= -1;
599 }
600 double xo = right ? 1. : 0.;
601 return clamp ((alpha - m.x*xo)/m.y, 0., 1.);
602#elif dimension == 3
603 if (fabs (m.y) < 1e-4 && fabs (m.z) < 1e-4) // degenerate case
604 return right ? (m.x < 0. ? 1. : 0.)
605 : (m.x > 0. ? 1. : 0.);
606
607 double n1 = m.y/(fabs (m.y) + fabs (m.z));
608 double n2 = m.z/(fabs (m.y) + fabs (m.z));
609 double j = right ? 0.5 : -0.5;
610 alpha -= j*m.x;
611 alpha /= (fabs(m.y) + fabs(m.z));
612 return clamp (line_area (n1, n2, alpha), 0., 1.);
613#endif
614}
615
616/**
617This function calculates a single surface fraction value in a given face. The
618PLIC interface representation cannot guarantee the continuity of the planar
619segments across the faces. Therefore, we obtain a single value using a geometric
620mean between the left and right sides. The tolerance defines the interfacial
621cells and it can be modified.
622
623Note that adaptation of the face fraction `s` is currently not performed through
624a dedicated refinement procedure. Consequently, `s` must be recalculated after
625each grid adaptation and update of the volume fraction. */
626
627trace
628void face_fraction (scalar f, vector s, double tol = 1.e-6) {
629
630 /**
631 We calculate the interface normal field. */
632
633 vector n[];
634 for (int _i = 0; _i < _N; _i++) /* foreach */ {
635 coord m = mycs (point, f);
636 for (int _d = 0; _d < dimension; _d++)
637 n.x[] = m.x;
638 }
639
640 for (int _i = 0; _i < _N; _i++) /* foreach_face */ {
641
642 /**
643 Case 1: the face is shared between a full and an empty cell. The surface
644 fraction is null. */
645
646 if (f[-1] < tol || f[] < tol)
647 s.x[] = 0.;
648
649 /**
650 Case 2: if both cells are full, the surface fraction is unitary. */
651
652 else if (f[-1] > 1. - tol && f[] > 1. - tol)
653 s.x[] = 1.;
654
655 /**
656 Case 3: if both cells are interfacial, the face contains the interface, and
657 we proceed with the calculation of the surface fraction. */
658
659 else {
660 double vleft = 1., vright = 1.;
661 if (f[] < 1. - tol) {
662 coord m = {0};
663 m.x = n.x[];
664#if dimension > 1
665 m.y = n.y[];
666#endif
667#if dimension > 2
668 m.z = n.z[];
669#endif
670 double alpha = plane_alpha (f[], m);
671 vleft = interface_fraction_x (m, alpha, false);
672 }
673 if (f[-1] < 1. - tol) {
674 coord m = {0};
675 m.x = n.x[-1];
676#if dimension > 1
677 m.y = n.y[-1];
678#endif
679#if dimension > 2
680 m.z = n.z[-1];
681#endif
682 double alpha = plane_alpha (f[-1], m);
684 }
685 s.x[] = sqrt (vleft*vright);
686 }
687 }
688}
689
const vector a
Definition all-mach.h:59
if TRASH define &&NewPid *& val(newpid, 0, 0, 0)) -> pid > 0) @else @ define is_newpid()(((NewPid *)&val(newpid, 0, 0, 0)) ->pid > 0) @endif Array *linear_tree(size_t size, scalar newpid)
Definition balance.h:13
#define dimension
Definition bitree.h:3
define m((k)==0 &&(l)==0 &&(m)==0) macro2 foreach_point(double _x=0.
#define foreach_edge()
Definition cartesian.h:77
int y
Definition common.h:76
int x
Definition common.h:76
int z
Definition common.h:76
static int sign(number x)
Definition common.h:13
scalar f[]
The primary fields are:
Definition two-phase.h:56
#define p
Definition tree.h:320
define sysmalloc malloc define syscalloc calloc define sysrealloc realloc define sysfree free define systrdup strdup define func
Definition config.h:120
#define assert(a)
Definition config.h:107
Point point
Definition conserving.h:86
return hxx pow(1.+sq(hx), 3/2.)
else return n
Definition curvature.h:101
double nn
Definition curvature.h:102
scalar phi[]
The electric potential and the volume charge density are scalars while the permittivity and conductiv...
Definition implicit.h:34
scalar s
Definition embed-tree.h:56
scalar cs[]
The volume and area fractions are stored in these fields.
Definition embed.h:21
*cs[i, 0, 0] a *[i -1, 0, 0] j
Definition embed.h:88
double v[2]
Definition embed.h:383
vector fs[]
Definition embed.h:22
scalar int i
Definition embed.h:74
return clamp((alpha - m.x *xo)/m.y, 0., 1.)
double bool right
Definition fractions.h:587
coord youngs_normal(Point point, scalar c)
Definition fractions.h:403
macro fraction(scalar f, double func)
The convenience macros below can be used to define volume and surface fraction fields directly from a...
Definition fractions.h:359
void fraction_refine(Point point, scalar c)
Definition fractions.h:42
trace double interface_area(scalar c)
Definition fractions.h:553
double xo
Definition fractions.h:600
if(m.y< 0.)
Definition fractions.h:596
macro solid(scalar cs, vector fs, double func)
Definition fractions.h:369
double alpha
Definition fractions.h:587
trace void reconstruction(const scalar c, vector n, scalar alpha)
Definition fractions.h:454
attribute
Finally, we also need to prolongate the reconstructed value of .
Definition fractions.h:82
trace void output_facets(scalar c, FILE *fp=stdout, vector s={{-1}})
Definition fractions.h:518
trace void face_fraction(scalar f, vector s, double tol=1.e-6)
This function calculates a single surface fraction value in a given face.
Definition fractions.h:628
for(int _d=0;_d< 2;_d++) static double interface_fraction_x(coord m
static void alpha_refine(Point point, scalar alpha)
Definition fractions.h:86
coord facet_normal(Point point, scalar c, vector s)
Definition fractions.h:426
trace void fractions(scalar Phi, scalar c, vector s={0}, double val=0.)
Definition fractions.h:123
auto macro coord interface_normal(Point p, scalar c)
By default the interface normal is computed using the MYC approximation.
Definition fractions.h:29
double rectangle_fraction(coord n, double alpha, coord a, coord b)
VOF algorithms require the computation of volume fractions on (rectangular) parts of the initial squa...
Definition geometry.h:269
#define plane_alpha
Definition geometry.h:133
#define plane_area_center(m, a, p)
Definition geometry.h:438
int facets(coord n, double alpha, coord p[2])
From the interface definition, it is also possible to compute the coordinates of the segment in 2D,...
Definition geometry.h:294
#define plane_volume(n, alpha)
Definition geometry.h:257
double line_area(double nx, double ny, double alpha)
Conversely there is a unique function computing as a function of and .
Definition geometry.h:165
static float area(const KdtRect rect)
Definition kdt.c:439
macro
We also redefine the "per field" (inner) traversal.
Definition layers.h:18
size_t max
Definition mtrace.h:8
FILE * fp
Definition mtrace.h:7
static void refine_injection(Point point, scalar v)
size *double * b
coord mycs(Point point, scalar c)
Definition myc.h:18
def _i
Definition stencils.h:405
@ s_centered
Definition stencils.h:19
@ s_face
Definition stencils.h:20
Definition linear.h:21
Definition common.h:78
double x
Definition common.h:79
int i
Definition common.h:44
scalar x
Definition common.h:47
scalar y
Definition common.h:49
long nc
Definition utils.h:17
double cc
Definition vof.h:60
scalar c
Definition vof.h:57
src vof fflush(ferr)