flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
test_vof_twophase_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
 

Functions

static double colourAt (const Config &c, int x, int y, int z)
 
static double forceXAt (int, int, int z)
 
template<class Fn >
static std::vector< double > blockOf (Fn f, int ox, int oy, int oz, int lnx, int lny, int lnz)
 
static void configure (IbmSolver &s, const Config &c, int ox, int oy, int oz, 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 sumOf (const std::vector< double > &a)
 
static double pressureGradientError (const std::vector< double > &p, const std::vector< double > &c, double ratio)
 
int main (int argc, char **argv)
 

Variables

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

Function Documentation

◆ colourAt()

static double colourAt ( const Config &  c,
int  x,
int  y,
int  z 
)
static

Definition at line 70 of file test_vof_twophase_mpi.cpp.

References NX, NY, and NZ.

Referenced by configure().

◆ forceXAt()

static double forceXAt ( int  ,
int  ,
int  z 
)
static

Definition at line 77 of file test_vof_twophase_mpi.cpp.

References NZ.

Referenced by configure().

◆ blockOf()

template<class Fn >
static std::vector< double > blockOf ( Fn  f,
int  ox,
int  oy,
int  oz,
int  lnx,
int  lny,
int  lnz 
)
static

Definition at line 82 of file test_vof_twophase_mpi.cpp.

Referenced by configure().

◆ configure()

◆ 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 117 of file test_vof_twophase_mpi.cpp.

References GCELLS, NX, and NY.

Referenced by main().

◆ maxAbsDiff()

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

Definition at line 153 of file test_vof_twophase_mpi.cpp.

Referenced by main().

◆ maxAbs()

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

Definition at line 166 of file test_vof_twophase_mpi.cpp.

Referenced by main().

◆ sumOf()

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

Definition at line 172 of file test_vof_twophase_mpi.cpp.

Referenced by main().

◆ pressureGradientError()

static double pressureGradientError ( const std::vector< double > &  p,
const std::vector< double > &  c,
double  ratio 
)
static

Definition at line 180 of file test_vof_twophase_mpi.cpp.

References GRAV, NX, NY, and NZ.

Referenced by main().

◆ main()

Variable Documentation

◆ NX

constexpr int NX = 16
staticconstexpr

Definition at line 56 of file test_vof_twophase_mpi.cpp.

Referenced by colourAt(), gatherGlobal(), main(), and pressureGradientError().

◆ NY

constexpr int NY = 16
static

Definition at line 56 of file test_vof_twophase_mpi.cpp.

Referenced by colourAt(), gatherGlobal(), main(), and pressureGradientError().

◆ NZ

constexpr int NZ = 32
static

Definition at line 56 of file test_vof_twophase_mpi.cpp.

Referenced by colourAt(), forceXAt(), main(), and pressureGradientError().

◆ GCELLS

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

Definition at line 57 of file test_vof_twophase_mpi.cpp.

Referenced by gatherGlobal().

◆ GRAV

constexpr double GRAV = 0.1
staticconstexpr

Definition at line 58 of file test_vof_twophase_mpi.cpp.

Referenced by configure(), and pressureGradientError().

◆ RHO0

constexpr double RHO0 = 1.0
static

Definition at line 58 of file test_vof_twophase_mpi.cpp.

Referenced by configure().