flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
test_movingscene_advect_mpi.cpp File Reference
#include <mpi.h>
#include <array>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#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"
#include "peclet/core/geom/scene_builder.hpp"

Go to the source code of this file.

Functions

static double gShift ()
 
static double X0 ()
 
static double Y0 ()
 
static void sphereScene (std::vector< int > &ni, std::vector< double > &nr, std::vector< int > &ii, std::vector< double > &ir)
 
static bool envOn (const char *k)
 
static void configure (IbmSolver &s)
 
static void towStep (IbmSolver &s, int it)
 
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 double maxAbsDiff (const std::vector< double > &a, const std::vector< double > &b)
 
static double maxAbs (const std::vector< double > &a)
 
int main (int argc, char **argv)
 

Variables

static constexpr int N = 48
 
static constexpr int STEPS = 60
 
static constexpr std::size_t GCELLS = (std::size_t)N * N * N
 
static constexpr double DIAM = 8.0
 
static constexpr double U = 0.05
 
static constexpr double RE = 20.0
 
static constexpr double MU = U * DIAM / RE
 
static constexpr double RHO = 1.0
 
static constexpr double DT = 4.0
 
static constexpr double OFF = 0.3
 
static constexpr double DIRX = 0.6
 
static constexpr double DIRY = 0.8
 
static constexpr double X0C = 0.60 * N + OFF
 
static constexpr double Y0C = 0.57 * N + OFF
 
static constexpr double Z0 = 0.50 * N + OFF
 

Function Documentation

◆ gShift()

static double gShift ( )
static

Definition at line 105 of file test_movingscene_advect_mpi.cpp.

Referenced by main(), X0(), and Y0().

◆ X0()

static double X0 ( )
static

Definition at line 109 of file test_movingscene_advect_mpi.cpp.

References gShift(), and X0C.

Referenced by main(), sphereScene(), and towStep().

◆ Y0()

static double Y0 ( )
static

Definition at line 112 of file test_movingscene_advect_mpi.cpp.

References gShift(), and Y0C.

Referenced by main(), sphereScene(), and towStep().

◆ sphereScene()

static void sphereScene ( std::vector< int > &  ni,
std::vector< double > &  nr,
std::vector< int > &  ii,
std::vector< double > &  ir 
)
static

Definition at line 117 of file test_movingscene_advect_mpi.cpp.

References DIAM, X0(), Y0(), and Z0.

Referenced by configure().

◆ envOn()

static bool envOn ( const char *  k)
static

Definition at line 139 of file test_movingscene_advect_mpi.cpp.

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

◆ configure()

◆ towStep()

◆ 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 177 of file test_movingscene_advect_mpi.cpp.

References GCELLS, and N.

Referenced by main().

◆ maxAbsDiff()

static double maxAbsDiff ( const std::vector< double > &  a,
const std::vector< double > &  b 
)
static

Definition at line 213 of file test_movingscene_advect_mpi.cpp.

Referenced by main().

◆ maxAbs()

static double maxAbs ( const std::vector< double > &  a)
static

Definition at line 219 of file test_movingscene_advect_mpi.cpp.

Referenced by main().

◆ main()

Variable Documentation

◆ N

constexpr int N = 48
staticconstexpr

Definition at line 89 of file test_movingscene_advect_mpi.cpp.

Referenced by gatherGlobal(), and main().

◆ STEPS

constexpr int STEPS = 60
static

Definition at line 89 of file test_movingscene_advect_mpi.cpp.

Referenced by main().

◆ GCELLS

constexpr std::size_t GCELLS = (std::size_t)N * N * N
staticconstexpr

Definition at line 90 of file test_movingscene_advect_mpi.cpp.

Referenced by gatherGlobal().

◆ DIAM

constexpr double DIAM = 8.0
staticconstexpr

Definition at line 91 of file test_movingscene_advect_mpi.cpp.

Referenced by main(), and sphereScene().

◆ U

constexpr double U = 0.05
staticconstexpr

◆ RE

constexpr double RE = 20.0
staticconstexpr

Definition at line 93 of file test_movingscene_advect_mpi.cpp.

Referenced by main().

◆ MU

constexpr double MU = U * DIAM / RE
staticconstexpr

Definition at line 94 of file test_movingscene_advect_mpi.cpp.

Referenced by configure(), and main().

◆ RHO

constexpr double RHO = 1.0
staticconstexpr

Definition at line 95 of file test_movingscene_advect_mpi.cpp.

Referenced by configure().

◆ DT

constexpr double DT = 4.0
staticconstexpr

Definition at line 96 of file test_movingscene_advect_mpi.cpp.

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

◆ OFF

constexpr double OFF = 0.3
staticconstexpr

Definition at line 97 of file test_movingscene_advect_mpi.cpp.

◆ DIRX

constexpr double DIRX = 0.6
staticconstexpr

Definition at line 99 of file test_movingscene_advect_mpi.cpp.

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

◆ DIRY

constexpr double DIRY = 0.8
static

Definition at line 99 of file test_movingscene_advect_mpi.cpp.

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

◆ X0C

constexpr double X0C = 0.60 * N + OFF
staticconstexpr

Definition at line 101 of file test_movingscene_advect_mpi.cpp.

Referenced by X0().

◆ Y0C

constexpr double Y0C = 0.57 * N + OFF
static

Definition at line 101 of file test_movingscene_advect_mpi.cpp.

Referenced by Y0().

◆ Z0

constexpr double Z0 = 0.50 * N + OFF
static

Definition at line 101 of file test_movingscene_advect_mpi.cpp.

Referenced by sphereScene(), and towStep().