flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
test_varmu_mpi.cpp File Reference
#include <mpi.h>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <Kokkos_Core.hpp>
#include <string>
#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 muAt (const Config &, int, int y, int)
 
static double srcAt (int, int y, int)
 
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 couetteExact (double yc)
 
static double couetteError (const std::vector< double > &u)
 
int main (int argc, char **argv)
 

Variables

static constexpr int NX = 16
 
static constexpr int NY = 32
 
static constexpr int NZ = 8
 
static constexpr double MU1 = 1.0
 
static constexpr double MU2 = 0.1
 
static constexpr double ULID = 1.0
 
static constexpr double RHO = 1.0
 
static constexpr double DT = 100.0
 
static constexpr int STEPS_COUETTE = 80
 
static constexpr int STEPS_PERY = 40
 
static constexpr double FZ = 1e-2
 
static constexpr std::size_t GCELLS = (std::size_t)NX * NY * NZ
 

Function Documentation

◆ muAt()

static double muAt ( const Config &  ,
int  ,
int  y,
int   
)
static

Definition at line 73 of file test_varmu_mpi.cpp.

References MU1, MU2, and NY.

Referenced by configure().

◆ srcAt()

static double srcAt ( int  ,
int  y,
int   
)
static

Definition at line 76 of file test_varmu_mpi.cpp.

References NY.

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 81 of file test_varmu_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 123 of file test_varmu_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 159 of file test_varmu_mpi.cpp.

Referenced by main().

◆ maxAbs()

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

Definition at line 172 of file test_varmu_mpi.cpp.

Referenced by main().

◆ couetteExact()

static double couetteExact ( double  yc)
static

Definition at line 181 of file test_varmu_mpi.cpp.

References MU1, MU2, and ULID.

Referenced by couetteError().

◆ couetteError()

static double couetteError ( const std::vector< double > &  u)
static

Definition at line 187 of file test_varmu_mpi.cpp.

References couetteExact(), NX, NY, NZ, and ULID.

Referenced by main().

◆ main()

Variable Documentation

◆ NX

constexpr int NX = 16
staticconstexpr

Definition at line 59 of file test_varmu_mpi.cpp.

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

◆ NY

constexpr int NY = 32
static

Definition at line 59 of file test_varmu_mpi.cpp.

Referenced by couetteError(), gatherGlobal(), main(), muAt(), and srcAt().

◆ NZ

constexpr int NZ = 8
static

Definition at line 59 of file test_varmu_mpi.cpp.

Referenced by couetteError(), and main().

◆ MU1

constexpr double MU1 = 1.0
staticconstexpr

Definition at line 60 of file test_varmu_mpi.cpp.

Referenced by configure(), couetteExact(), and muAt().

◆ MU2

constexpr double MU2 = 0.1
static

Definition at line 60 of file test_varmu_mpi.cpp.

Referenced by couetteExact(), and muAt().

◆ ULID

constexpr double ULID = 1.0
static

Definition at line 60 of file test_varmu_mpi.cpp.

Referenced by configure(), couetteError(), and couetteExact().

◆ RHO

constexpr double RHO = 1.0
static

Definition at line 60 of file test_varmu_mpi.cpp.

Referenced by configure().

◆ DT

constexpr double DT = 100.0
static

Definition at line 60 of file test_varmu_mpi.cpp.

Referenced by configure().

◆ STEPS_COUETTE

constexpr int STEPS_COUETTE = 80
staticconstexpr

Definition at line 61 of file test_varmu_mpi.cpp.

Referenced by main().

◆ STEPS_PERY

constexpr int STEPS_PERY = 40
static

Definition at line 61 of file test_varmu_mpi.cpp.

Referenced by main().

◆ FZ

constexpr double FZ = 1e-2
staticconstexpr

Definition at line 62 of file test_varmu_mpi.cpp.

Referenced by configure().

◆ GCELLS

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

Definition at line 63 of file test_varmu_mpi.cpp.

Referenced by gatherGlobal().