flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
test_vof_momentum_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 double colourAt (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 maxAbsDev (const std::vector< double > &a, double r)
static std::vector< double > demean (std::vector< double > v)
static double sumOf (const std::vector< double > &a)
static double phaseU (int, int y, int z)
static double phaseV (int, int, int z)
static double phaseW (int x, int, int)
static void configurePhase (IbmSolver &s, const char *scheme, int ox, int oy, int oz, int lnx, int lny, int lnz)
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 const double UNIF [3] = {1.0, 0.6, -0.4}

Typedef Documentation

◆ IbmSolver

Definition at line 5663 of file flow_ibm.hpp.

Function Documentation

◆ colourAt()

double colourAt ( int x,
int y,
int z )
static

Definition at line 56 of file test_vof_momentum_mpi.cpp.

References NX, NY, and NZ.

◆ forceXAt()

double forceXAt ( int ,
int ,
int z )
static

Definition at line 64 of file test_vof_momentum_mpi.cpp.

References NZ.

◆ 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 69 of file test_vof_momentum_mpi.cpp.

Referenced by configure(), and configurePhase().

◆ configure()

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

Definition at line 79 of file test_vof_momentum_mpi.cpp.

References blockOf(), colourAt(), forceXAt(), peclet::flow::LinearMix, and UNIF.

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 103 of file test_vof_momentum_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 139 of file test_vof_momentum_mpi.cpp.

Referenced by main().

◆ maxAbs()

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

Definition at line 152 of file test_vof_momentum_mpi.cpp.

Referenced by main().

◆ maxAbsDev()

double maxAbsDev ( const std::vector< double > & a,
double r )
static

Definition at line 158 of file test_vof_momentum_mpi.cpp.

Referenced by main().

◆ demean()

std::vector< double > demean ( std::vector< double > v)
static

Definition at line 168 of file test_vof_momentum_mpi.cpp.

Referenced by main().

◆ sumOf()

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

Definition at line 177 of file test_vof_momentum_mpi.cpp.

Referenced by main().

◆ phaseU()

double phaseU ( int ,
int y,
int z )
static

Definition at line 191 of file test_vof_momentum_mpi.cpp.

References NY, and NZ.

Referenced by configurePhase().

◆ phaseV()

double phaseV ( int ,
int ,
int z )
static

Definition at line 194 of file test_vof_momentum_mpi.cpp.

References NZ.

Referenced by configurePhase().

◆ phaseW()

double phaseW ( int x,
int ,
int  )
static

Definition at line 197 of file test_vof_momentum_mpi.cpp.

References NX.

Referenced by configurePhase().

◆ configurePhase()

void configurePhase ( IbmSolver & s,
const char * scheme,
int ox,
int oy,
int oz,
int lnx,
int lny,
int lnz )
static

Definition at line 200 of file test_vof_momentum_mpi.cpp.

References blockOf(), colourAt(), peclet::flow::LinearMix, phaseU(), phaseV(), and phaseW().

Referenced by main().

◆ main()

Variable Documentation

◆ NX

int NX = 16
staticconstexpr

Definition at line 40 of file test_vof_momentum_mpi.cpp.

◆ NY

int NY = 16
static

Definition at line 40 of file test_vof_momentum_mpi.cpp.

◆ NZ

int NZ = 32
static

Definition at line 40 of file test_vof_momentum_mpi.cpp.

◆ GCELLS

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

Definition at line 41 of file test_vof_momentum_mpi.cpp.

◆ UNIF

const double UNIF[3] = {1.0, 0.6, -0.4}
static

Definition at line 51 of file test_vof_momentum_mpi.cpp.

Referenced by configure(), and main().