flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
test_scalar_cutcell_solve_mpi.cpp File Reference
#include <mpi.h>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <Kokkos_Core.hpp>
#include <vector>
#include "flow_ibm.hpp"
#include "peclet/core/decomp/block_decomposer.hpp"

Go to the source code of this file.

Classes

struct  Block
struct  Run

Macros

#define CHECK(cond)

Typedefs

using FlowSetup = std::function<void(IbmSolver&)>
using ScalarSetup = std::function<void(IbmSolver&, const Block&)>
using Solve = std::function<Run(IbmSolver&)>
using Post = std::function<void(IbmSolver&, IbmSolver&, const Block&)>

Functions

static bool same (double a, double b)
static std::vector< double > sphereSdf (int n, double cx, double cy, double cz, double R)
static void record (IbmSolver &s, Run &r, bool transient)
static void compare (const char *tag, int n, const std::vector< double > &gsdf, FlowSetup flow, ScalarSetup scalar, Solve solve, bool checkLevels=false, bool gated=true, bool cutcellPressure=false, Post post=nullptr, double identityBound=1e-12)
int main (int argc, char **argv)

Variables

static constexpr int G = IbmSolver::G
static int failures = 0
static int rank_ = 0
static int size_ = 1

Macro Definition Documentation

◆ CHECK

#define CHECK ( cond)
Value:
do { \
if (!(cond)) { \
std::fprintf(stderr, "CHECK failed: %s\n at %s:%d\n", #cond, __FILE__, __LINE__); \
++failures; \
} \
} while (0)

Definition at line 56 of file test_scalar_cutcell_solve_mpi.cpp.

Referenced by compare(), and main().

Typedef Documentation

◆ FlowSetup

using FlowSetup = std::function<void(IbmSolver&)>

Definition at line 80 of file test_scalar_cutcell_solve_mpi.cpp.

◆ ScalarSetup

using ScalarSetup = std::function<void(IbmSolver&, const Block&)>

Definition at line 81 of file test_scalar_cutcell_solve_mpi.cpp.

◆ Solve

using Solve = std::function<Run(IbmSolver&)>

Definition at line 82 of file test_scalar_cutcell_solve_mpi.cpp.

◆ Post

using Post = std::function<void(IbmSolver&, IbmSolver&, const Block&)>

Definition at line 103 of file test_scalar_cutcell_solve_mpi.cpp.

Function Documentation

◆ same()

bool same ( double a,
double b )
static

Definition at line 64 of file test_scalar_cutcell_solve_mpi.cpp.

Referenced by compare(), and main().

◆ sphereSdf()

std::vector< double > sphereSdf ( int n,
double cx,
double cy,
double cz,
double R )
static

Definition at line 84 of file test_scalar_cutcell_solve_mpi.cpp.

References R.

◆ record()

void record ( IbmSolver & s,
Run & r,
bool transient )
static

Definition at line 96 of file test_scalar_cutcell_solve_mpi.cpp.

Referenced by main().

◆ compare()

void compare ( const char * tag,
int n,
const std::vector< double > & gsdf,
FlowSetup flow,
ScalarSetup scalar,
Solve solve,
bool checkLevels = false,
bool gated = true,
bool cutcellPressure = false,
Post post = nullptr,
double identityBound = 1e-12 )
static

◆ main()

Variable Documentation

◆ G

int G = IbmSolver::G
staticconstexpr

Definition at line 53 of file test_scalar_cutcell_solve_mpi.cpp.

◆ failures

int failures = 0
static

Definition at line 55 of file test_scalar_cutcell_solve_mpi.cpp.

◆ rank_

int rank_ = 0
static

◆ size_

int size_ = 1
static

Definition at line 68 of file test_scalar_cutcell_solve_mpi.cpp.

Referenced by compare(), and main().