flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
test_units.cpp File Reference
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <Kokkos_Core.hpp>
#include <string>
#include <vector>
#include "flow_ibm.hpp"

Go to the source code of this file.

Classes

struct  AnisoDrop
 

Macros

#define CHECK(cond)
 

Functions

double sphereFracBox (double cx, double cy, double cz, double R, double x0, double y0, double z0, const double h[3], int sub=24)
 Exact liquid fraction of the box cell [x0,x0+hx] x ... inside a sphere: midpoint-subsampled in x and y, integrated ANALYTICALLY in z.
 
AnisoDrop runDropletAniso (const int n[3], const double h[3], double R, bool constantKappa, int steps)
 n cells per axis on a box mesh of cell size h (physical). R is the PHYSICAL radius.
 
void gateVofAniso ()
 
int main (int argc, char **argv)
 

Macro Definition Documentation

◆ CHECK

#define CHECK (   cond)
Value:
do { \
if (!(cond)) { \
std::fprintf(stderr, "CHECK failed: %s\n at %s:%d\n", #cond, __FILE__, __LINE__); \
++failures; \
} \
} while (0)

Definition at line 77 of file test_units.cpp.

Function Documentation

◆ sphereFracBox()

double sphereFracBox ( double  cx,
double  cy,
double  cz,
double  R,
double  x0,
double  y0,
double  z0,
const double  h[3],
int  sub = 24 
)

Exact liquid fraction of the box cell [x0,x0+hx] x ... inside a sphere: midpoint-subsampled in x and y, integrated ANALYTICALLY in z.

Independent of every kernel under test.

Definition at line 1089 of file test_units.cpp.

Referenced by runDropletAniso().

◆ runDropletAniso()

AnisoDrop runDropletAniso ( const int  n[3],
const double  h[3],
double  R,
bool  constantKappa,
int  steps 
)

n cells per axis on a box mesh of cell size h (physical). R is the PHYSICAL radius.

Definition at line 1108 of file test_units.cpp.

References peclet::flow::LinearMix, maxAbs(), MU, RHO, SIGMA, and sphereFracBox().

Referenced by gateVofAniso().

◆ gateVofAniso()

void gateVofAniso ( )

Definition at line 1155 of file test_units.cpp.

References CHECK, AnisoDrop::dtCap, AnisoDrop::maxU, and runDropletAniso().

Referenced by main().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1690 of file test_units.cpp.

References failures, and gateVofAniso().