flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
vof_advect_scenes.hpp File Reference
#include <cmath>
#include <Kokkos_Core.hpp>
#include "vof/advect_wy.hpp"
#include "vof/plic.hpp"

Go to the source code of this file.

Classes

struct  vofscene::Block
 Where this block sits in the global grid: o is the global index of inner cell (0,0,0). More...
 

Namespaces

namespace  vofscene
 

Functions

Block vofscene::blockOf (const WyAdvector &a, I3 origin)
 
void vofscene::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 vofscene::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 vofscene::forEachExtended (Block b, F fn)
 Visit every cell of the extended block with (local linear index, global cell index).
 
void vofscene::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 vofscene::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 vofscene::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 vofscene::fillUniform (WyAdvector &a, Block b, double ux, double uy, double uz)
 Uniform translation. Discrete divergence is EXACTLY zero (identical values differenced).
 
void vofscene::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 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 .
 
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).
 
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).
 
void vofscene::fillLeVeque (WyAdvector &a, Block b, double h, double phase)
 
double vofscene::l1Diff (SField a, SField b, I3 e, I3 n, int g)
 sum |a - b| over the inner region (cell-fraction units).
 
double vofscene::lInfDiff (SField a, SField b, I3 e, I3 n, int g)
 max |a - b| over the inner region.
 
SField vofscene::copyOf (SField src, const char *name)