flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
test_bodyforce_ghost_mpi.cpp File Reference
#include <mpi.h>
#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.

Classes

struct  Config

Typedefs

using IbmSolver

Functions

static void configure (IbmSolver &s, const Config &c, 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 double maxAbsDiff (const std::vector< double > &a, const std::vector< double > &b)
static double maxAbs (const std::vector< double > &a)
static double pressureGradientError (const std::vector< double > &p, int *worstPlane)
int main (int argc, char **argv)

Variables

static constexpr int NX = 16
static constexpr int NY = 16
static constexpr int NZ = 32
static constexpr int STEPS = 4
static constexpr double RHO0 = 1.0
static constexpr double DT = 1.0
static constexpr double FORCE = 0.25
static constexpr double GRAV = 0.1
static constexpr std::size_t GCELLS = (std::size_t)NX * NY * NZ

Typedef Documentation

◆ IbmSolver

Definition at line 5663 of file flow_ibm.hpp.

Function Documentation

◆ configure()

void configure ( IbmSolver & s,
const Config & c,
int lnx,
int lny,
int lnz )
static

Definition at line 73 of file test_bodyforce_ghost_mpi.cpp.

References DT, FORCE, peclet::flow::LinearMix, and RHO0.

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 95 of file test_bodyforce_ghost_mpi.cpp.

References GCELLS, NX, and NY.

Referenced by main().

◆ maxAbsDiff()

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

Definition at line 131 of file test_bodyforce_ghost_mpi.cpp.

Referenced by main().

◆ maxAbs()

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

Definition at line 144 of file test_bodyforce_ghost_mpi.cpp.

Referenced by main().

◆ pressureGradientError()

double pressureGradientError ( const std::vector< double > & p,
int * worstPlane )
static

Definition at line 154 of file test_bodyforce_ghost_mpi.cpp.

References GRAV, NX, NY, NZ, RHO0, and worstPlane().

Referenced by main().

◆ main()

Variable Documentation

◆ NX

int NX = 16
staticconstexpr

Definition at line 61 of file test_bodyforce_ghost_mpi.cpp.

◆ NY

int NY = 16
static

Definition at line 61 of file test_bodyforce_ghost_mpi.cpp.

◆ NZ

int NZ = 32
static

Definition at line 61 of file test_bodyforce_ghost_mpi.cpp.

◆ STEPS

int STEPS = 4
static

Definition at line 61 of file test_bodyforce_ghost_mpi.cpp.

◆ RHO0

double RHO0 = 1.0
staticconstexpr

Definition at line 62 of file test_bodyforce_ghost_mpi.cpp.

◆ DT

double DT = 1.0
static

Definition at line 62 of file test_bodyforce_ghost_mpi.cpp.

◆ FORCE

double FORCE = 0.25
static

Definition at line 62 of file test_bodyforce_ghost_mpi.cpp.

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

◆ GRAV

double GRAV = 0.1
static

Definition at line 62 of file test_bodyforce_ghost_mpi.cpp.

◆ GCELLS

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

Definition at line 63 of file test_bodyforce_ghost_mpi.cpp.