flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
test_balanced_force_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 Colo = peclet::flow::Solver<peclet::flow::Colocated>
using Stag = peclet::flow::Solver<peclet::flow::Staggered>

Functions

static double colourAt (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)
template<class S>
static void configure (S &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)
template<class S>
static int runCase (const Config &c, const peclet::core::decomp::BlockDecomposer< 3 > &dec, int rank, int size)
int main (int argc, char **argv)

Variables

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

Typedef Documentation

◆ Colo

◆ Stag

Function Documentation

◆ colourAt()

double colourAt ( int ,
int ,
int z )
static

Definition at line 59 of file test_balanced_force_mpi.cpp.

References NZ.

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

◆ 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 64 of file test_balanced_force_mpi.cpp.

Referenced by configure().

◆ configure()

template<class S>
void configure ( S & s,
const Config & c,
int ox,
int oy,
int oz,
int lnx,
int lny,
int lnz )
static

Definition at line 75 of file test_balanced_force_mpi.cpp.

References blockOf(), colourAt(), DT, GRAV, peclet::flow::LinearMix, and RHO0.

Referenced by runCase().

◆ 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 105 of file test_balanced_force_mpi.cpp.

References GCELLS, NX, and NY.

Referenced by runCase().

◆ maxAbsDiff()

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

Definition at line 141 of file test_balanced_force_mpi.cpp.

Referenced by runCase().

◆ maxAbs()

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

Definition at line 151 of file test_balanced_force_mpi.cpp.

Referenced by main(), runCase(), and runDropletAniso().

◆ runCase()

template<class S>
int runCase ( const Config & c,
const peclet::core::decomp::BlockDecomposer< 3 > & dec,
int rank,
int size )
static

Definition at line 159 of file test_balanced_force_mpi.cpp.

References configure(), DT, gatherGlobal(), GCELLS, GRAV, maxAbs(), maxAbsDiff(), NX, NY, and NZ.

Referenced by main().

◆ main()

int main ( int argc,
char ** argv )

Definition at line 260 of file test_balanced_force_mpi.cpp.

References NX, NY, NZ, and runCase().

Variable Documentation

◆ NX

int NX = 16
staticconstexpr

Definition at line 45 of file test_balanced_force_mpi.cpp.

◆ NY

int NY = 16
static

Definition at line 45 of file test_balanced_force_mpi.cpp.

◆ NZ

int NZ = 32
static

Definition at line 45 of file test_balanced_force_mpi.cpp.

◆ GRAV

◆ DT

◆ RHO0

◆ GCELLS

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

Definition at line 47 of file test_balanced_force_mpi.cpp.