flow 1.4.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.

Typedefs

using IbmSolver

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

Typedef Documentation

◆ IbmSolver

Definition at line 5663 of file flow_ibm.hpp.

Function Documentation

◆ gShift()

double gShift ( )
static

Definition at line 105 of file test_movingscene_advect_mpi.cpp.

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

◆ X0()

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()

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()

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()

bool envOn ( const char * k)
static

Definition at line 139 of file test_movingscene_advect_mpi.cpp.

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

◆ configure()

void configure ( IbmSolver & s)
static

Definition at line 144 of file test_movingscene_advect_mpi.cpp.

References DIRX, DIRY, DT, envOn(), MU, RHO, sphereScene(), and U.

Referenced by main().

◆ towStep()

void towStep ( IbmSolver & s,
int it )
static

Definition at line 166 of file test_movingscene_advect_mpi.cpp.

References DIRX, DIRY, DT, envOn(), U, X0(), Y0(), and Z0.

Referenced by main().

◆ gatherGlobal()

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()

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()

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

int N = 48
staticconstexpr

Definition at line 89 of file test_movingscene_advect_mpi.cpp.

◆ STEPS

int STEPS = 60
static

Definition at line 89 of file test_movingscene_advect_mpi.cpp.

◆ GCELLS

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

Definition at line 90 of file test_movingscene_advect_mpi.cpp.

◆ DIAM

double DIAM = 8.0
staticconstexpr

Definition at line 91 of file test_movingscene_advect_mpi.cpp.

Referenced by main(), and sphereScene().

◆ U

double U = 0.05
staticconstexpr

◆ RE

double RE = 20.0
staticconstexpr

Definition at line 93 of file test_movingscene_advect_mpi.cpp.

Referenced by main().

◆ MU

double MU = U * DIAM / RE
staticconstexpr

Definition at line 94 of file test_movingscene_advect_mpi.cpp.

◆ RHO

double RHO = 1.0
staticconstexpr

Definition at line 95 of file test_movingscene_advect_mpi.cpp.

◆ DT

double DT = 4.0
staticconstexpr

Definition at line 96 of file test_movingscene_advect_mpi.cpp.

◆ OFF

double OFF = 0.3
staticconstexpr

Definition at line 97 of file test_movingscene_advect_mpi.cpp.

◆ DIRX

double DIRX = 0.6
staticconstexpr

Definition at line 99 of file test_movingscene_advect_mpi.cpp.

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

◆ DIRY

double DIRY = 0.8
static

Definition at line 99 of file test_movingscene_advect_mpi.cpp.

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

◆ X0C

double X0C = 0.60 * N + OFF
staticconstexpr

Definition at line 101 of file test_movingscene_advect_mpi.cpp.

Referenced by X0().

◆ Y0C

double Y0C = 0.57 * N + OFF
static

Definition at line 101 of file test_movingscene_advect_mpi.cpp.

Referenced by Y0().

◆ Z0

double Z0 = 0.50 * N + OFF
static

Definition at line 101 of file test_movingscene_advect_mpi.cpp.

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