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

Typedefs

using IbmSolver

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

Typedef Documentation

◆ IbmSolver

Definition at line 5663 of file flow_ibm.hpp.

Function Documentation

◆ muAt()

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

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

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

Definition at line 91 of file test_varmu_mpi.cpp.

References blockOf(), DT, FZ, peclet::flow::LinearMix, MU1, muAt(), RHO, srcAt(), and ULID.

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

Referenced by main().

◆ maxAbs()

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

Definition at line 172 of file test_varmu_mpi.cpp.

Referenced by main().

◆ couetteExact()

double couetteExact ( double yc)
static

Definition at line 181 of file test_varmu_mpi.cpp.

References MU1, MU2, and ULID.

Referenced by couetteError().

◆ couetteError()

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

int NX = 16
staticconstexpr

Definition at line 59 of file test_varmu_mpi.cpp.

◆ NY

int NY = 32
static

Definition at line 59 of file test_varmu_mpi.cpp.

◆ NZ

int NZ = 8
static

Definition at line 59 of file test_varmu_mpi.cpp.

◆ MU1

double MU1 = 1.0
staticconstexpr

Definition at line 60 of file test_varmu_mpi.cpp.

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

◆ MU2

double MU2 = 0.1
static

Definition at line 60 of file test_varmu_mpi.cpp.

Referenced by couetteExact(), and muAt().

◆ ULID

double ULID = 1.0
static

Definition at line 60 of file test_varmu_mpi.cpp.

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

◆ RHO

double RHO = 1.0
static

Definition at line 60 of file test_varmu_mpi.cpp.

◆ DT

double DT = 100.0
static

Definition at line 60 of file test_varmu_mpi.cpp.

◆ STEPS_COUETTE

int STEPS_COUETTE = 80
staticconstexpr

Definition at line 61 of file test_varmu_mpi.cpp.

Referenced by main().

◆ STEPS_PERY

int STEPS_PERY = 40
static

Definition at line 61 of file test_varmu_mpi.cpp.

Referenced by main().

◆ FZ

double FZ = 1e-2
staticconstexpr

Definition at line 62 of file test_varmu_mpi.cpp.

Referenced by configure().

◆ GCELLS

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

Definition at line 63 of file test_varmu_mpi.cpp.