flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
test_vof_blocks_debris_mpi.cpp File Reference
#include <mpi.h>
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <Kokkos_Core.hpp>
#include <vector>
#include "flow_ibm.hpp"
#include "peclet/core/common/types.hpp"
#include "peclet/core/decomp/block_decomposer.hpp"

Go to the source code of this file.

Functions

static double sphereFrac (double cx, int x, int y, int z)
 
static std::vector< double > colour (int m)
 
static void configure (IbmSolver &s, int ox, int oy, int oz, int lnx, int lny, int lnz)
 
static std::vector< double > pairColour (int m)
 
static void configurePair (IbmSolver &s, int lnx, int lny, int lnz, bool bound)
 
static double sphereFrac3 (const double *c, double r, int x, int y, int z)
 
static std::array< int, 6 > wallBox (int m)
 
static std::vector< double > wallColour (int m)
 
static double wallPsi (int x, int y)
 psi on the z-edge (x, y): zero on both walls, periodic in x with an EXACT wrap (x mod NX).
 
static void configureWall (IbmSolver &s, int ox, int oy, int lnx, int lny, int lnz)
 
static std::vector< double > gatherGlobal (const std::vector< double > &local, int ox, int oy, int oz, int lnx, int lny, int lnz, int rank, int size)
 
static std::vector< double > ledger (IbmSolver &s)
 
int main (int argc, char **argv)
 

Variables

static constexpr int NX = 48
 
static constexpr int NY = 32
 
static constexpr int NZ = 32
 
static constexpr std::size_t GCELLS = (std::size_t)NX * NY * NZ
 
static constexpr double R = 5.0
 
static constexpr double SIGMA = 320.0
 
static constexpr double AX = 16.3
 
static constexpr double BX = 32.3
 
static constexpr double CY = 16.2
 
static constexpr double CZ = 16.1
 
static constexpr int SX = 21
 
static constexpr int SY0 = 15
 
static constexpr int SZ = 16
 
static constexpr double SPECK [3] = {1e-5, 1e-2, 3e-3}
 
static constexpr double GAMMA = 0.25
 
static constexpr double DT = 0.05
 
static const std::array< int, 6 > BOX [2] = {{7, 7, 7, 26, 26, 26}, {18, 7, 7, 41, 26, 26}}
 
static constexpr double PAX = 18.3
 
static constexpr double PBX = 26.3
 
static constexpr double RHO_L = 1.0
 
static constexpr double RHO_G = 0.1
 
static const std::array< int, 6 > PBOX [2] = {{9, 7, 7, 28, 26, 26}, {17, 7, 7, 36, 26, 26}}
 
static constexpr double WR [2] = {5.0, 9.0}
 
static constexpr double WC [2][3] = {{40.3, 22.2, 16.1}, {20.3, 3.2, 16.1}}
 
static constexpr double WA = 0.5
 
static constexpr double WDT = 0.5
 
static constexpr int WSTEPS = 40
 
static constexpr int NF = 7
 

Function Documentation

◆ sphereFrac()

static double sphereFrac ( double  cx,
int  x,
int  y,
int  z 
)
static

Definition at line 50 of file test_vof_blocks_debris_mpi.cpp.

References CY, CZ, and R.

Referenced by colour(), gateSolverMetric(), and pairColour().

◆ colour()

static std::vector< double > colour ( int  m)
static

◆ configure()

◆ pairColour()

static std::vector< double > pairColour ( int  m)
static

Definition at line 107 of file test_vof_blocks_debris_mpi.cpp.

References PAX, PBOX, PBX, and sphereFrac().

Referenced by configurePair().

◆ configurePair()

◆ sphereFrac3()

static double sphereFrac3 ( const double *  c,
double  r,
int  x,
int  y,
int  z 
)
static

Definition at line 135 of file test_vof_blocks_debris_mpi.cpp.

Referenced by wallColour().

◆ wallBox()

static std::array< int, 6 > wallBox ( int  m)
static

Definition at line 147 of file test_vof_blocks_debris_mpi.cpp.

References NY, WC, and WR.

Referenced by configureWall(), main(), and wallColour().

◆ wallColour()

static std::vector< double > wallColour ( int  m)
static

Definition at line 157 of file test_vof_blocks_debris_mpi.cpp.

References sphereFrac3(), wallBox(), WC, and WR.

Referenced by configureWall(), and main().

◆ wallPsi()

static double wallPsi ( int  x,
int  y 
)
static

psi on the z-edge (x, y): zero on both walls, periodic in x with an EXACT wrap (x mod NX).

Definition at line 167 of file test_vof_blocks_debris_mpi.cpp.

References NX, NY, and WA.

Referenced by configureWall(), and main().

◆ configureWall()

◆ gatherGlobal()

static std::vector< double > gatherGlobal ( const std::vector< double > &  local,
int  ox,
int  oy,
int  oz,
int  lnx,
int  lny,
int  lnz,
int  rank,
int  size 
)
static

Definition at line 202 of file test_vof_blocks_debris_mpi.cpp.

References GCELLS, NX, and NY.

Referenced by main().

◆ ledger()

static std::vector< double > ledger ( IbmSolver &  s)
static

Definition at line 241 of file test_vof_blocks_debris_mpi.cpp.

References peclet::flow::Solver< Grid >::vofBlockStats().

Referenced by main().

◆ main()

Variable Documentation

◆ NX

constexpr int NX = 48
staticconstexpr

Definition at line 42 of file test_vof_blocks_debris_mpi.cpp.

Referenced by gatherGlobal(), main(), and wallPsi().

◆ NY

constexpr int NY = 32
static

Definition at line 42 of file test_vof_blocks_debris_mpi.cpp.

Referenced by gatherGlobal(), main(), wallBox(), and wallPsi().

◆ NZ

constexpr int NZ = 32
static

Definition at line 42 of file test_vof_blocks_debris_mpi.cpp.

Referenced by main().

◆ GCELLS

constexpr std::size_t GCELLS = (std::size_t)NX * NY * NZ
staticconstexpr

Definition at line 43 of file test_vof_blocks_debris_mpi.cpp.

Referenced by gatherGlobal(), and main().

◆ R

constexpr double R = 5.0
staticconstexpr

Definition at line 44 of file test_vof_blocks_debris_mpi.cpp.

Referenced by sphereFrac().

◆ SIGMA

constexpr double SIGMA = 320.0
static

◆ AX

constexpr double AX = 16.3
static

Definition at line 44 of file test_vof_blocks_debris_mpi.cpp.

Referenced by colour().

◆ BX

constexpr double BX = 32.3
static

Definition at line 44 of file test_vof_blocks_debris_mpi.cpp.

Referenced by colour().

◆ CY

constexpr double CY = 16.2
static

Definition at line 44 of file test_vof_blocks_debris_mpi.cpp.

Referenced by configure(), and sphereFrac().

◆ CZ

constexpr double CZ = 16.1
static

Definition at line 44 of file test_vof_blocks_debris_mpi.cpp.

Referenced by sphereFrac().

◆ SX

constexpr int SX = 21
staticconstexpr

Definition at line 45 of file test_vof_blocks_debris_mpi.cpp.

Referenced by colour().

◆ SY0

constexpr int SY0 = 15
static

Definition at line 45 of file test_vof_blocks_debris_mpi.cpp.

Referenced by colour().

◆ SZ

constexpr int SZ = 16
static

Definition at line 45 of file test_vof_blocks_debris_mpi.cpp.

Referenced by colour().

◆ SPECK

constexpr double SPECK[3] = {1e-5, 1e-2, 3e-3}
staticconstexpr

Definition at line 46 of file test_vof_blocks_debris_mpi.cpp.

Referenced by colour(), and main().

◆ GAMMA

constexpr double GAMMA = 0.25
staticconstexpr

Definition at line 47 of file test_vof_blocks_debris_mpi.cpp.

Referenced by configure().

◆ DT

constexpr double DT = 0.05
static

Definition at line 47 of file test_vof_blocks_debris_mpi.cpp.

Referenced by main().

◆ BOX

const std::array<int, 6> BOX[2] = {{7, 7, 7, 26, 26, 26}, {18, 7, 7, 41, 26, 26}}
static

Definition at line 48 of file test_vof_blocks_debris_mpi.cpp.

Referenced by colour(), configure(), and main().

◆ PAX

constexpr double PAX = 18.3
staticconstexpr

Definition at line 105 of file test_vof_blocks_debris_mpi.cpp.

Referenced by pairColour().

◆ PBX

constexpr double PBX = 26.3
static

Definition at line 105 of file test_vof_blocks_debris_mpi.cpp.

Referenced by pairColour().

◆ RHO_L

constexpr double RHO_L = 1.0
static

Definition at line 105 of file test_vof_blocks_debris_mpi.cpp.

Referenced by configurePair(), and main().

◆ RHO_G

constexpr double RHO_G = 0.1
static

Definition at line 105 of file test_vof_blocks_debris_mpi.cpp.

Referenced by configurePair(), and main().

◆ PBOX

const std::array<int, 6> PBOX[2] = {{9, 7, 7, 28, 26, 26}, {17, 7, 7, 36, 26, 26}}
static

Definition at line 106 of file test_vof_blocks_debris_mpi.cpp.

Referenced by configurePair(), and pairColour().

◆ WR

constexpr double WR[2] = {5.0, 9.0}
staticconstexpr

Definition at line 132 of file test_vof_blocks_debris_mpi.cpp.

Referenced by wallBox(), and wallColour().

◆ WC

constexpr double WC[2][3] = {{40.3, 22.2, 16.1}, {20.3, 3.2, 16.1}}
static

Definition at line 132 of file test_vof_blocks_debris_mpi.cpp.

Referenced by wallBox(), and wallColour().

◆ WA

constexpr double WA = 0.5
staticconstexpr

Definition at line 133 of file test_vof_blocks_debris_mpi.cpp.

Referenced by wallPsi().

◆ WDT

constexpr double WDT = 0.5
static

Definition at line 133 of file test_vof_blocks_debris_mpi.cpp.

Referenced by main().

◆ WSTEPS

constexpr int WSTEPS = 40
staticconstexpr

Definition at line 134 of file test_vof_blocks_debris_mpi.cpp.

Referenced by main().

◆ NF

constexpr int NF = 7
staticconstexpr

Definition at line 240 of file test_vof_blocks_debris_mpi.cpp.

Referenced by main().