|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Classes | |
| struct | Block |
Where this block sits in the global grid: o is the global index of inner cell (0,0,0). More... | |
Functions | |
| Block | blockOf (const WyAdvector &a, I3 origin) |
| void | periodicFill (SField f, I3 e, int g, bool px, bool py, bool pz) |
| Periodic wrap of a single-block extended field (serial reference path; the MPI path uses core's GridHalo instead). | |
| void | clampFill (SField f, Block b, I3 gs, bool px, bool py, bool pz) |
| Zero-gradient (Neumann) fill of the ghost cells that lie OUTSIDE the global domain on a non-periodic axis: each such cell takes the value at its globally CLAMPED index. | |
| template<typename F > | |
| void | forEachExtended (Block b, F fn) |
| Visit every cell of the extended block with (local linear index, global cell index). | |
| void | initSphere (SField c, Block b, double h, double cx, double cy, double cz, double r, int levels=4) |
| Sphere of fluid (C = 1 inside), exact to ~5e-7 relative volume at R/h = 16 via the octree helper in plic.hpp. | |
| void | initSlab (SField c, Block b, double h, int axis, double lo, double hi) |
Slab zlo < x < zhi along axis axis, exact fractions (axis-aligned planes). | |
| void | initZalesak (SField c, Block b, double h, double cx, double cy, double r, double sw, double stop, int nsub=64) |
| Zalesak's slotted disk in the (x,y) plane, uniform in z. | |
| void | fillUniform (WyAdvector &a, Block b, double ux, double uy, double uz) |
| Uniform translation. Discrete divergence is EXACTLY zero (identical values differenced). | |
| void | fillRotation (WyAdvector &a, Block b, double h, double cx, double cy, double omega) |
| Solid-body rotation about (cx,cy) in the (x,y) plane, w = 0. | |
| double | lvSin2 (double t) |
| The LeVeque 3D deformation field u = 2 sin^2(pi x) sin(2 pi y) sin(2 pi z) cos(pi t / T) v = - sin(2 pi x) sin^2(pi y) sin(2 pi z) cos(pi t / T) w = - sin(2 pi x) sin(2 pi y) sin^2(pi z) cos(pi t / T) sampled as the discrete curl of the edge vector potential A = ( 0 , -psi2(x,z) sin(2 pi y) , psi1(x,y) sin(2 pi z) ) cos(pi t / T), psi1 = sin^2(pi x) sin^2(pi y) / pi , psi2 = sin^2(pi x) sin^2(pi z) / pi . | |
| double | lvAy (double x, double y, double z, double phase) |
| A_y of the LeVeque vector potential (lives on y-edges: node x, centre y, node z). | |
| double | lvAz (double x, double y, double z, double phase) |
| A_z of the LeVeque vector potential (lives on z-edges: node x, node y, centre z). | |
| void | fillLeVeque (WyAdvector &a, Block b, double h, double phase) |
| double | l1Diff (SField a, SField b, I3 e, I3 n, int g) |
| sum |a - b| over the inner region (cell-fraction units). | |
| double | lInfDiff (SField a, SField b, I3 e, I3 n, int g) |
| max |a - b| over the inner region. | |
| SField | copyOf (SField src, const char *name) |
|
inline |
Definition at line 39 of file vof_advect_scenes.hpp.
|
inline |
Periodic wrap of a single-block extended field (serial reference path; the MPI path uses core's GridHalo instead).
Sequential axis passes, so edges/corners come out right.
Definition at line 47 of file vof_advect_scenes.hpp.
References N.
Zero-gradient (Neumann) fill of the ghost cells that lie OUTSIDE the global domain on a non-periodic axis: each such cell takes the value at its globally CLAMPED index.
The clamp is per axis and global, which is what makes it decomposition-independent. The obvious alternative – sequential zero-gradient axis passes over the block – is NOT: a corner cell that is outside the domain in y but whose x-neighbourhood is an interior halo gets the x-extension of the true row on one decomposition and the x-extension of the y = 0 row on another, and that difference reaches the colour field through the MYC stencil of the inner corner cell. (Which is exactly the "MPI differs at the last bit only in ghost-adjacent cells" symptom the work order lists; it was found by reasoning about the fill, before it could be blamed on the halo.)
The clamped source is always inside the domain, hence either an inner cell of this block or a ghost the exchange has already filled: a ghost at global index < 0 on axis a only exists when origin[a] < g, so index 0 on that axis is inside the block's extended range. Call AFTER the halo exchange / periodic fill.
Definition at line 86 of file vof_advect_scenes.hpp.
Visit every cell of the extended block with (local linear index, global cell index).
Definition at line 112 of file vof_advect_scenes.hpp.
Referenced by fillLeVeque(), fillRotation(), fillUniform(), initSlab(), initSphere(), and initZalesak().
|
inline |
Sphere of fluid (C = 1 inside), exact to ~5e-7 relative volume at R/h = 16 via the octree helper in plic.hpp.
Domain is [0,1]^3 with h = 1/gn.
Definition at line 127 of file vof_advect_scenes.hpp.
References forEachExtended().
|
inline |
Slab zlo < x < zhi along axis axis, exact fractions (axis-aligned planes).
Definition at line 137 of file vof_advect_scenes.hpp.
References forEachExtended().
|
inline |
Zalesak's slotted disk in the (x,y) plane, uniform in z.
Domain [0,1]^3; the disk is a circle of radius r about (cx,cy) with a rectangular slot of half-width sw reaching up to y = stop. Fractions by n x n midpoint subsampling (the metric compares the transported field against THIS field, so the sampling error is common to both and does not enter the error).
Definition at line 151 of file vof_advect_scenes.hpp.
References forEachExtended().
|
inline |
Uniform translation. Discrete divergence is EXACTLY zero (identical values differenced).
Definition at line 176 of file vof_advect_scenes.hpp.
References forEachExtended().
|
inline |
Solid-body rotation about (cx,cy) in the (x,y) plane, w = 0.
Discrete divergence is EXACTLY zero: u does not depend on x and v does not depend on y, so each 1D difference is 0 bitwise.
Definition at line 188 of file vof_advect_scenes.hpp.
References forEachExtended().
| double vofscene::lvSin2 | ( | double | t | ) |
The LeVeque 3D deformation field u = 2 sin^2(pi x) sin(2 pi y) sin(2 pi z) cos(pi t / T) v = - sin(2 pi x) sin^2(pi y) sin(2 pi z) cos(pi t / T) w = - sin(2 pi x) sin(2 pi y) sin^2(pi z) cos(pi t / T) sampled as the discrete curl of the edge vector potential A = ( 0 , -psi2(x,z) sin(2 pi y) , psi1(x,y) sin(2 pi z) ) cos(pi t / T), psi1 = sin^2(pi x) sin^2(pi y) / pi , psi2 = sin^2(pi x) sin^2(pi z) / pi .
(curl A reproduces the field exactly; the discrete curl reproduces it to O(h^2) while making the discrete face divergence identically zero in exact arithmetic.)
Definition at line 207 of file vof_advect_scenes.hpp.
| double vofscene::lvAy | ( | double | x, |
| double | y, | ||
| double | z, | ||
| double | phase | ||
| ) |
A_y of the LeVeque vector potential (lives on y-edges: node x, centre y, node z).
Definition at line 212 of file vof_advect_scenes.hpp.
References lvSin2().
Referenced by fillLeVeque().
| double vofscene::lvAz | ( | double | x, |
| double | y, | ||
| double | z, | ||
| double | phase | ||
| ) |
A_z of the LeVeque vector potential (lives on z-edges: node x, node y, centre z).
Definition at line 217 of file vof_advect_scenes.hpp.
References lvSin2().
Referenced by fillLeVeque().
|
inline |
Definition at line 222 of file vof_advect_scenes.hpp.
References forEachExtended(), lvAy(), and lvAz().
sum |a - b| over the inner region (cell-fraction units).
Definition at line 243 of file vof_advect_scenes.hpp.
max |a - b| over the inner region.
Definition at line 258 of file vof_advect_scenes.hpp.
|
inline |
Definition at line 272 of file vof_advect_scenes.hpp.