57#include <Kokkos_Core.hpp>
77 std::fprintf(stderr, "CHECK failed: %s\n at %s:%d\n", #cond, __FILE__, __LINE__); \
82std::size_t idx(
int x,
int y,
int z,
int nx,
int ny) {
83 return (std::size_t)x + (std::size_t)y * nx + (std::size_t)z * (std::size_t)nx * ny;
85double maxAbs(
const std::vector<double>& v) {
88 m = std::fmax(m, std::fabs(x));
91double maxAbsDiff(
const std::vector<double>& a,
const std::vector<double>& b) {
96 for (std::size_t i = 0;
i <
a.size(); ++
i) {
97 const double d = std::fabs(a[i] - b[i]);
106 return std::fmax(std::fmax(
maxAbs(
s.getVelocity(0)),
maxAbs(
s.getVelocity(1))),
110double maxFaceVel(S& s) {
111 return std::fmax(std::fmax(
maxAbs(
s.getFaceVelocity(0)),
maxAbs(
s.getFaceVelocity(1))),
116double checkerboardZ(
const std::vector<double>& f,
int nx,
int ny,
int nz) {
118 const int xc = nx / 2, yc =
ny / 2;
119 for (
int z = 1;
z + 1 < nz; ++
z)
120 m = std::fmax(m, std::fabs(f[idx(xc, yc, z, nx, ny)] - 0.5 * (f[idx(xc, yc, z - 1, nx, ny)] +
121 f[idx(xc, yc, z + 1, nx, ny)])));
132 double cellU = 0, faceU = 0, pErr = 0, cb = 0;
137constexpr int kChebMaxit = 4000;
142HydroResult
hydrostatic(
double ratio,
double mu,
int steps,
bool periodic,
bool throughColour,
143 int bfp = -1,
double chebRtol = -1.0) {
144 const int N = 8,
NZ = 24;
145 const double g = 0.1;
147 s.setAdvection(
false);
151 s.setVelocityResidualTolerance(0.0);
153 s.setDomainBc(4, 1, 0, 0, 0);
154 s.setDomainBc(5, 1, 0, 0, 0);
156 s.setPressureGeometry(std::vector<double>((std::size_t)
N *
N *
NZ, 10.0));
161 auto heavy = [&](
int z) {
return periodic ? (
z >=
NZ / 4 &&
z < 3 *
NZ / 4) : (
z <
NZ / 2); };
162 std::vector<double> fld((std::size_t)
N *
N *
NZ);
163 for (
int z = 0;
z <
NZ; ++
z)
164 for (
int y = 0;
y <
N; ++
y)
165 for (
int x = 0;
x <
N; ++
x)
166 fld[idx(x, y, z,
N,
N)] =
167 heavy(z) ? (throughColour ? 1.0 :
ratio) : (throughColour ? 0.0 : 1.0);
169 for (
int z = 0;
z <
NZ; ++
z)
170 rbar += (heavy(z) ?
ratio : 1.0) /
NZ;
178 s.setField(
"C", fld);
179 s.exchangeField(
"C");
180 s.setPropertyModel(
"rho", ClosureKind::LinearMix,
"C",
"", {1.0,
ratio - 1.0});
183 s.setField(
"rho", fld);
184 s.setDensityMode(
true);
190 s.setPropertyModel(
"force_z", ClosureKind::LinearMix,
"rho",
"", std::vector<double>{0.0, -
g});
192 s.setBodyForce(0.0, 0.0, rbar * g);
194 s.setBalancedForceProjection(bfp == 1);
196 s.setPressureChebyshev(
true, kChebMaxit, chebRtol);
197 for (
int k = 0;
k <
steps; ++
k)
201 r.faceU = maxFaceVel(s);
202 r.iters =
s.lastPressureIterations();
203 r.cb = checkerboardZ(
s.getVelocity(2),
N,
N,
NZ);
204 const auto p =
s.getPressure();
206 for (
int z = 1;
z <
NZ; ++
z) {
207 const double dp =
p[idx(
N / 2,
N / 2, z,
N,
N)] -
p[idx(
N / 2,
N / 2, z - 1,
N,
N)];
208 const double rf = 0.5 * ((heavy(z) ?
ratio : 1.0) + (heavy(z - 1) ?
ratio : 1.0));
209 r.pErr = std::fmax(
r.pErr, std::fabs(dp + g * rf - off) / (g * ratio));
214void gateHydrostatic() {
216 "\n=== T1 hydrostatic at ratio 1000, mu = 0: dP/dz == -rho_f g. Staggered: exact. "
218 " the FACE field at round-off; the balance is an exact fixed point, so the cell "
220 " and dP/dz are the transient from P = 0 -- reported, and required to DECAY.\n");
225 const Case
cases[3] = {{
"periodic, hand-set rho, frozen",
true,
false},
226 {
"walled, hand-set rho ",
false,
false},
227 {
"walled, through C (frozen) ",
false,
true}};
228 for (
const Case& c : cases) {
229 const auto st = hydrostatic<Stag>(1000.0, 0.0, 100,
c.periodic,
c.colour);
233 const double rt =
c.periodic ? -1.0 : 1
e-14;
234 const auto co = hydrostatic<Colo>(1000.0, 0.0, 100,
c.periodic,
c.colour, 0, rt);
235 const auto co4 = hydrostatic<Colo>(1000.0, 0.0, 400,
c.periodic,
c.colour, 0, rt);
236 std::printf(
" %s staggered cell %.3e face %.3e dP/dz %.3e cb %.3e it %ld\n",
c.name,
237 st.cellU,
st.faceU,
st.pErr,
st.cb,
st.iters);
239 " %s COLLOCATED cell %.3e face %.3e dP/dz %.3e cb %.3e it %ld (400 steps: "
240 "cell %.3e dP/dz %.3e)\n",
241 c.name, co.cellU, co.faceU, co.pErr, co.cb, co.iters, co4.cellU, co4.pErr);
250 CHECK(co.faceU < (
c.periodic ? 1.8e-9 : 1e-12));
251 CHECK(co4.cellU < co.cellU);
252 CHECK(co4.pErr < co.pErr);
253 CHECK(co.iters < 200);
255 CHECK(co4.iters < kChebMaxit);
258 "\n The mu sweep (walled, hand-set rho, ratio 1000, 100 steps). The staggered balance is\n"
259 " only approached at mu > 0 (A = rho_f/dt - mu*Lap does not commute with the discrete\n"
260 " gradient at variable rho: WO-P's mu*dt^2 residue).\n");
261 for (
double mu : {0.0, 1
e-3, 1
e-2, 1
e-1}) {
262 const auto st = hydrostatic<Stag>(1000.0, mu, 100,
false,
false);
263 const auto co = hydrostatic<Colo>(1000.0, mu, 100,
false,
false, 0, 1e-14);
265 " mu = %-6g staggered face %.3e dP/dz %.3e | COLLOCATED face %.3e "
267 mu,
st.faceU,
st.pErr, co.faceU, co.pErr);
268 CHECK(co.faceU < 1e-12);
269 CHECK(co.iters < kChebMaxit);
273void gateInvisibleSubspace() {
275 "\n=== T1b the invisible subspace: a CELL checkerboard is annihilated by centerToFace\n"
276 " (1/2(U(i)+U(i-1)) kills the odd-even mode), so the approximate projection cannot\n"
277 " see it and cannot remove it. CONTROL = the VALIDATED constant-density collocated\n"
278 " path with a plain body force, where rung V8 is completely inert. The V8 column's\n"
279 " transient lives largely in that mode, and must decay.\n");
280 const int N = 8,
NZ = 24;
281 const double g = 0.1;
282 for (
double mu : {0.0, 0.01}) {
284 s.setAdvection(
false);
288 s.setVelocityResidualTolerance(0.0);
289 s.setDomainBc(4, 1, 0, 0, 0);
290 s.setDomainBc(5, 1, 0, 0, 0);
291 s.setPressureGeometry(std::vector<double>((std::size_t)
N *
N *
NZ, 10.0));
292 s.setBodyForce(0.0, 0.0, -g);
293 for (
int k = 0;
k < 100; ++
k)
296 " CONTROL constant-rho collocated, body force, mu = %-5g cell |u| %.3e face |uf| %.3e"
298 mu, maxVel(s), maxFaceVel(s), checkerboardZ(
s.getVelocity(2),
N,
N,
NZ));
300 const auto a = hydrostatic<Colo>(1000.0, 0.0, 100,
false,
false, 0);
301 const auto b = hydrostatic<Colo>(1000.0, 0.0, 400,
false,
false, 0);
303 " V8 walled ratio 1000 mu = 0: 100 steps cell %.3e (cb %.3e), 400 steps cell %.3e "
304 "(cb %.3e) -> decayed %.2fx\n",
305 a.cellU,
a.cb,
b.cellU,
b.cb,
a.cellU / std::fmax(
b.cellU, 1e-300));
313std::vector<double> sphereC(
int n,
double R,
double cx,
double cy,
double cz,
int sub = 24) {
314 std::vector<double>
C((std::size_t)n * n * n, 0.0);
315 const double w = 1.0 /
sub;
316 for (
int k = 0;
k <
n; ++
k)
317 for (
int j = 0;
j <
n; ++
j)
318 for (
int i = 0;
i <
n; ++
i) {
320 for (
int b = 0;
b <
sub; ++
b)
321 for (
int a = 0;
a <
sub; ++
a) {
322 const double px =
i + (
a + 0.5) * w, py = j + (b + 0.5) *
w;
323 const double r2 =
R *
R - (px - cx) * (px - cx) - (py - cy) * (py - cy);
326 const double h = std::sqrt(r2);
327 const double lo = std::fmax(cz - h, (
double)k), hi = std::fmin(cz + h, (
double)k + 1);
337std::unique_ptr<S> makeDroplet(
int n,
double R,
double sigma,
double mu,
double rhoG,
double rhoL,
338 double kappa,
double dtFac,
int bfp = -1) {
339 auto s = std::make_unique<S>(n, n, n);
340 s->setAdvection(
false);
344 s->setVelocityResidualTolerance(0.0);
345 s->setPressureGeometry(std::vector<double>((std::size_t)n * n * n, 10.0));
346 s->setPressureChebyshev(
true, 500, 1e-14);
348 s->setVof(sphereC(n,
R, n / 2 + 0.13, n / 2 + 0.27, n / 2 + 0.11));
349 s->setPropertyModel(
"rho", ClosureKind::LinearMix,
"C",
"", {rhoG, rhoL - rhoG});
350 s->setSurfaceTension(sigma);
352 s->setVofKappaConstant(kappa);
353 s->setDt(dtFac *
s->capillaryDt());
355 s->setBalancedForceProjection(bfp == 1);
360 double cellU = 0, faceU = 0, face30 = 0;
367DropResult runDroplet(
int n,
double R,
double sigma,
double mu,
double ratio,
double kappa,
368 double dtFac,
int steps,
int bfp = -1) {
371 auto s = makeDroplet<S>(n,
R, sigma, mu, 1.0, ratio, kappa, dtFac, bfp);
372 for (
int k = 0;
k <
steps; ++
k) {
375 r.face30 = maxFaceVel(*s);
377 r.cellU = maxVel(*s);
378 r.faceU = maxFaceVel(*s);
379 r.iters =
s->lastPressureIterations();
380 }
catch (
const std::exception& e) {
387void gateStaticDroplet() {
389 "\n=== T2 static droplet, CONSTANT kappa: the face force is exactly grad(sigma*kappa*C), "
391 " the balance is an exact fixed point. On the STAGGERED grid the force goes through\n"
392 " A = rho_f/dt - mu*Lap, which does not commute with the discrete gradient at "
394 " rho or near walls, so the balance is only approached (WO-P's mu*dt^2 residue). The\n"
395 " collocated step (balanced-force projection OFF) no longer annihilates "
397 " CSF per step: a decaying transient residue remains (doc §4.6.5 model: 2.2e-4 at\n"
398 " ratio 1 after 30 steps, 1.6e-5 at ratio 1000, decaying to 2.4e-17 / 2.1e-7 in 300\n"
399 " steps; 1-2 decades above staggered at ratio 1000). Exact from step 1 needs the\n"
400 " balanced-force projection. Gated here: no throw, decay 30 -> 90 steps, and the\n"
401 " 30-step face frozen at 10x its WO-V1 value.\n");
405 const double ratios[4] = {1.0, 10.0, 100.0, 1000.0};
406 const double frozen30[4] = {9.99e-4, 2.40e-3, 1.46e-3, 6.22e-4};
407 for (
int q = 0;
q < 4; ++
q) {
409 const auto st = runDroplet<Stag>(32, 8.0, 1.0, 0.1, ratio, 0.25, 0.5, 30);
410 const auto co = runDroplet<Colo>(32, 8.0, 1.0, 0.1, ratio, 0.25, 0.5, 90, 0);
412 std::printf(
" ratio %6g staggered THREW: %.90s\n", ratio,
st.what.c_str());
414 std::printf(
" ratio %6g staggered cell %.4e face %.4e it %ld\n", ratio,
st.cellU,
417 std::printf(
" ratio %6g COLLOCATED THREW: %.90s\n", ratio, co.what.c_str());
420 " ratio %6g COLLOCATED face %.4e (30 steps) -> %.4e (90 steps), cell %.4e "
422 ratio, co.face30, co.faceU, co.cellU, co.iters);
426 CHECK(co.faceU < co.face30);
427 CHECK(co.face30 <= frozen30[q]);
428 CHECK(co.iters < 500);
431 "\n The ratio-1000 mu sweep (the WO-T face-acceleration form went unstable at mu = 0.1,\n"
432 " ~4x per step; the predictor form is stable at every mu dt). Decay 30 -> 90 steps.\n");
435 const double mus[3] = {0.0, 0.01, 0.1};
436 const double frozenMu[3] = {6.74e-4, 6.50e-4, 6.22e-4};
437 for (
int q = 0;
q < 3; ++
q) {
438 const double mu = mus[
q];
439 const auto st = runDroplet<Stag>(32, 8.0, 1.0, mu, 1000.0, 0.25, 0.5, 30);
440 const auto co = runDroplet<Colo>(32, 8.0, 1.0, mu, 1000.0, 0.25, 0.5, 90, 0);
442 " ratio 1000, mu = %-5g staggered face %.4e%s | COLLOCATED face %.4e -> "
444 mu,
st.faceU,
st.threw ?
" (THREW)" :
"", co.face30, co.faceU, co.threw ?
" (THREW)" :
"");
446 CHECK(co.faceU < co.face30);
447 CHECK(co.face30 <= frozenMu[q]);
457void gateBalancedOn() {
458 std::printf(
"\n=== T1/T1b/T2 ON (the V8 default): static balances exact from step 1\n");
463 const Case
cases[3] = {{
"periodic, hand-set rho, frozen",
true,
false},
464 {
"walled, hand-set rho ",
false,
false},
465 {
"walled, through C (frozen) ",
false,
true}};
476 for (
const Case& c : cases)
477 for (
int steps : {1, 100}) {
478 const auto co = hydrostatic<Colo>(1000.0, 0.0, steps,
c.periodic,
c.colour, -1, 1e-14);
479 std::printf(
" T1 %s %3d step(s) cell %.3e face %.3e dP/dz %.3e it %ld\n",
c.name, steps,
480 co.cellU, co.faceU, co.pErr, co.iters);
481 CHECK(co.faceU < 1e-12);
482 CHECK(co.cellU < 1e-10);
483 CHECK(co.pErr < 1e-10);
484 CHECK(co.iters < kChebMaxit);
495 const auto d = hydrostatic<Colo>(1000.0, 0.0, 100,
true,
false, -1, -1.0);
496 std::printf(
" T1 periodic at the default rtol, 100 steps: face %.3e cell %.3e dP/dz %.3e\n",
497 d.faceU,
d.cellU,
d.pErr);
501 const auto a = hydrostatic<Colo>(1000.0, 0.0, 100,
false,
false);
502 std::printf(
" T1b walled ratio 1000, 100 steps: cell %.3e (cb %.3e)\n",
a.cellU,
a.cb);
505 const double ratios[4] = {1.0, 10.0, 100.0, 1000.0};
506 for (
double ratio : ratios) {
507 const auto co = runDroplet<Colo>(32, 8.0, 1.0, 0.1, ratio, 0.25, 0.5, 30);
508 std::printf(
" T2 ratio %6g cell %.4e face %.4e it %ld%s\n", ratio, co.cellU, co.faceU,
509 co.iters, co.threw ?
" THREW" :
"");
510 const double tol = (
ratio == 1.0) ? 1e-14 : 1
e-13;
511 CHECK(!co.threw && co.faceU < tol && co.cellU < tol);
513 for (
double mu : {0.0, 0.01, 0.1}) {
514 const auto st = runDroplet<Stag>(32, 8.0, 1.0, mu, 1000.0, 0.25, 0.5, 30);
515 const auto co = runDroplet<Colo>(32, 8.0, 1.0, mu, 1000.0, 0.25, 0.5, 30);
517 " T2 ratio 1000 mu %-5g staggered (OFF) face %.4e | COLLOCATED face %.4e "
519 mu,
st.faceU, co.faceU, co.cellU);
520 CHECK(!co.threw && co.faceU < 1e-13);
524 CHECK(co.faceU < std::max(
st.faceU, 1e-16));
529void gateUniformReduction() {
531 "\n=== T3 uniform rho, mu = 0: the V8 face-force predictor IS the validated cell-force one\n"
532 " (avg_f(P(i)-P(i-s)) is the central difference) -> agreement at round-off\n");
533 const int N = 16,
NZ = 8;
534 std::vector<std::vector<double>> uu, pp;
535 for (
int var = 0; var < 2; ++var) {
537 s.setAdvection(
false);
541 s.setPressureGeometry(std::vector<double>((std::size_t)
N *
N *
NZ, 10.0));
542 s.setBodyForce(1e-2, 3e-3, 0.0);
545 s.setField(
"rho", std::vector<double>((std::size_t)
N *
N *
NZ, 2.0));
546 s.setDensityMode(
true);
547 s.setPressurePcg(
true, 400, 1e-14);
549 s.setPressurePcg(
true, 400, 1e-14);
551 for (
int k = 0;
k < 30; ++
k)
553 uu.push_back(
s.getVelocity(0));
554 pp.push_back(
s.getPressure());
557 std::printf(
" max|du| %.3e (|u| %.3e) max|dP| %.3e (|P| %.3e)\n", du,
maxAbs(uu[0]), dp,
559 CHECK(du < 1e-13 * std::fmax(
maxAbs(uu[0]), 1e-30));
560 CHECK(dp < 1e-11 * std::fmax(
maxAbs(pp[0]), 1e-30));
566 "\n=== T4 the bridge (G6): the collocated colour transport is the SAME kernel on the SAME\n"
567 " faces. uf_(i) sits at i-1/2 = flow's staggered u(i), so a staggered solver handed\n"
568 " the collocated projected face field must reproduce the colour BITWISE.\n");
570 const int steps = 20;
574 co.setAdvection(
false);
578 co.setPressureGeometry(std::vector<double>((std::size_t)
N *
N *
N, 10.0));
579 co.setPressurePcg(
true, 400, 1e-14);
582 std::vector<double> c0((std::size_t)
N *
N *
N, 0.0);
583 for (
int z = 0;
z <
N; ++
z)
584 for (
int y = 0;
y <
N; ++
y)
585 for (
int x = 0;
x <
N; ++
x) {
586 const double dx =
x + 0.5 - (
N / 2 + 0.13), dy = y + 0.5 - (
N / 2 + 0.27),
587 dz =
z + 0.5 - (
N / 2 + 0.11);
588 c0[idx(x, y, z,
N,
N)] = (
dx *
dx +
dy *
dy +
dz *
dz < 36.0) ? 1.0 : 0.0;
594 std::vector<double>
u((std::size_t)
N *
N *
N),
v(
u.size()),
w(
u.size());
595 const double k = 2.0 * M_PI /
N;
596 for (
int z = 0;
z <
N; ++
z)
597 for (
int y = 0;
y <
N; ++
y)
598 for (
int x = 0;
x <
N; ++
x) {
599 const double X =
x + 0.5,
Y =
y + 0.5,
Z =
z + 0.5;
600 u[idx(x, y, z,
N,
N)] = std::sin(k * Z) + 0.7 * std::cos(k * Y);
601 v[idx(x, y, z,
N,
N)] = std::sin(k * X) + 0.7 * std::cos(k * Z);
602 w[idx(x, y, z,
N,
N)] = std::sin(k * Y) + 0.7 * std::cos(k * X);
609 const std::vector<double> uf = co.getFaceVelocity(0), vf = co.getFaceVelocity(1),
610 wf = co.getFaceVelocity(2);
611 const std::vector<double>
c1 = co.getVof();
612 std::printf(
" collocated max|div(open uf)| after the seeding step = %.3e\n",
613 co.maxOpenDivergence());
614 CHECK(co.maxOpenDivergence() < 1e-10);
618 st.setAdvection(
false);
622 st.setPressureGeometry(std::vector<double>((std::size_t)
N *
N *
N, 10.0));
625 st.setField(
"u", uf);
626 st.setField(
"v", vf);
627 st.setField(
"w", wf);
628 st.setVofStepParity(co.vofStepParity());
630 for (
int k = 0;
k <
steps; ++
k) {
631 co.advectVofKinematic(0.1);
632 st.advectVofKinematic(0.1);
636 " collocated vs staggered on the SAME face field, %d kinematic steps: max|dC| = "
641 std::printf(
" max|C - C0| over the run = %.3e (sum C: collocated %.15e, staggered %.15e)\n",
642 maxAbsDiff(co.getVof(), c1), co.vofDiagnostics().sumC,
st.vofDiagnostics().sumC);
648 std::printf(
"\n=== T5 scope: what the rung refuses, loudly\n");
650 std::vector<double>
solid((std::size_t)
N *
N *
N);
651 for (
int z = 0;
z <
N; ++
z)
652 for (
int y = 0;
y <
N; ++
y)
653 for (
int x = 0;
x <
N; ++
x) {
654 const double dx =
x + 0.5 -
N / 2.0,
dy =
y + 0.5 -
N / 2.0,
dz =
z + 0.5 -
N / 2.0;
655 solid[idx(x, y, z,
N,
N)] = std::sqrt(dx * dx + dy * dy + dz * dz) - 4.0;
659 s.setAdvection(
false);
663 s.setSolid(solid,
true);
667 }
catch (
const std::exception&) {
670 std::printf(
" enable_vof + immersed solid (collocated) -> throws: %s\n",
671 threw ?
"yes" :
"NO");
676 s.setAdvection(
false);
680 s.setSolid(solid,
true);
682 s.setField(
"rho", std::vector<double>((std::size_t)
N *
N *
N, 1.0));
683 s.setDensityMode(
true);
687 }
catch (
const std::exception&) {
690 std::printf(
" set_density_mode + immersed solid -> throws: %s\n",
691 threw ?
"yes" :
"NO");
696 s.setAdvection(
false);
700 s.setPressureGeometry(std::vector<double>((std::size_t)
N *
N *
N, 10.0));
703 s.enableVofMomentum(1.0, 10.0);
704 }
catch (
const std::exception&) {
707 std::printf(
" enable_vof_momentum (collocated) -> throws: %s\n",
708 threw ?
"yes" :
"NO");
713 s.setAdvection(
false);
717 s.setPressureGeometry(std::vector<double>((std::size_t)
N *
N *
N, 10.0));
719 s.setField(
"rho", std::vector<double>((std::size_t)
N *
N *
N, 1.0));
720 s.setDensityMode(
true);
721 s.setRhoFaceHarmonic(
true);
725 }
catch (
const std::exception&) {
728 std::printf(
" set_rho_face_harmonic (collocated) -> throws: %s\n",
729 threw ?
"yes" :
"NO");
734 s.setAdvection(
false);
738 s.setPressureGeometry(std::vector<double>((std::size_t)
N *
N *
N, 10.0));
740 s.setField(
"rho", std::vector<double>((std::size_t)
N *
N *
N, 1.0));
741 s.setDensityMode(
true);
742 s.setIncrementalPressure(
false);
746 }
catch (
const std::exception&) {
749 std::printf(
" non-incremental pressure (collocated V8) -> throws: %s\n",
750 threw ?
"yes" :
"NO");
757int main(
int argc,
char** argv) {
758 Kokkos::initialize(argc, argv);
761 gateInvisibleSubspace();
764 gateUniformReduction();
770 std::fprintf(stderr,
"\n%d CHECK(s) failed\n",
failures);
773 std::printf(
"\nAll rung V8 collocated gates passed.\n");
Weymouth-Yue split advection of a colour field on an extended (inner + ghost) block.
flow — host-facing Kokkos IBM Navier-Stokes solver (drop-in flow-style API).
long L3(int x, int y, int z, I3 e)
hydrostatic(ratio, mu=0.0, steps=100, g=0.1, dt=1.0, N=8, NZ=24)
static double maxAbs(const std::vector< double > &a)
static double maxAbsDiff(const std::vector< double > &a, const std::vector< double > &b)
peclet::flow::Solver< peclet::flow::Staggered > Stag
peclet::flow::Solver< peclet::flow::Colocated > Colo
static constexpr double R
static std::vector< double > colour(int m)