flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
cmp Namespace Reference

Variables

 a
 
 b
 
bool all_same = True
 
float worst = 0.0
 
 x
 
 y
 
 same = y.tobytes()
 
 d = y.shape else float('nan')
 
float sc = float(np.max(np.abs(x))) or 1.0
 

Detailed Description

Compare two prof.py --dump files array by array (the VoF step-performance harness, WO-0).

Usage:  python tests/study/vof_perf/cmp.py a.npz b.npz

One line per array (u, v, w, p, C, dts, iters, and every block colour col<id>): bitwise
equality, max|a-b| and max|a-b|/max|a|. An array present in only one file prints bitwise=False.
The last line is max over u, v, w, p, C of the relative difference -- N50_rtol when a is the
rtol 1e-10 dump and b the 1e-9 one (doc/vof_step_performance_design.md sec. 8, G-NUM item 1).
Exit status 0 only if every array is bitwise equal (G-BIT item 2), 1 otherwise.

Variable Documentation

◆ a

cmp.a

Definition at line 16 of file cmp.py.

◆ b

cmp.b

Definition at line 16 of file cmp.py.

◆ all_same

bool cmp.all_same = True

Definition at line 17 of file cmp.py.

◆ worst

cmp.worst = 0.0

Definition at line 18 of file cmp.py.

◆ x

cmp.x

Definition at line 24 of file cmp.py.

◆ y

cmp.y

Definition at line 24 of file cmp.py.

◆ same

cmp.same = y.tobytes()

Definition at line 25 of file cmp.py.

◆ d

cmp.d = y.shape else float('nan')

Definition at line 26 of file cmp.py.

◆ sc

float cmp.sc = float(np.max(np.abs(x))) or 1.0

Definition at line 27 of file cmp.py.