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

Functions

 scene ()
 
 compare ()
 
 main ()
 

Variables

 OUT = os.path.dirname(os.path.abspath(__file__))
 
 N
 
 STEPS
 
 RHO
 
 MU
 
 F
 
 DT
 
float RF = 0.18
 
float R = RF * N
 
list CEN
 
 KN_R
 
 KI_I
 
 KI_R
 

Detailed Description

Layer 2 (MPI scene demo) + Layer 4 rung 4 (replicated instances) gate.

An analytic scene is REPLICATED on every rank, so a rank derives its own block's geometry from it
with no communication at all -- that, and not any new exchange, is what lifts the single-rank
restriction the Python override path carried (set_exact_crossings / set_openness_override are
single-rank only). This script checks that claim end to end at np=1,2,4:

  1. GEOMETRY. The scene-sampled SDF and the per-cell cut OWNER on each rank's block must equal the
     single-rank global fields restricted to that block -- exactly, since every rank evaluates the
     same replicated scene at global coordinates.
  2. PHYSICS. The permeability k = mu<u>/f from a scene-driven solve must agree across np.
  3. RESOLVED LOADS (L4-R4). The per-instance hydrodynamic force, which each rank integrates over
     the wall cells inside its OWN block and which is summed across ranks, must agree across np.
     Atomics over an unordered traversal make this tolerance-reproducible, not bitwise.

Run:
  PYTHONPATH=<build_mpi> mpirun -np 1 python tests/study/sdf_campaign/mpi_scene_gate.py
  PYTHONPATH=<build_mpi> mpirun -np 2 python tests/study/sdf_campaign/mpi_scene_gate.py
  PYTHONPATH=<build_mpi> mpirun -np 4 python tests/study/sdf_campaign/mpi_scene_gate.py
Each run writes np<N>.npz; compare with `python mpi_scene_gate.py --compare`.

Function Documentation

◆ scene()

mpi_scene_gate.scene ( )

Definition at line 36 of file mpi_scene_gate.py.

Referenced by main().

◆ compare()

mpi_scene_gate.compare ( )

Definition at line 46 of file mpi_scene_gate.py.

Referenced by main().

◆ main()

mpi_scene_gate.main ( )

Definition at line 71 of file mpi_scene_gate.py.

References compare(), main(), and scene().

Referenced by main().

Variable Documentation

◆ OUT

mpi_scene_gate.OUT = os.path.dirname(os.path.abspath(__file__))

Definition at line 26 of file mpi_scene_gate.py.

◆ N

mpi_scene_gate.N

Definition at line 27 of file mpi_scene_gate.py.

◆ STEPS

mpi_scene_gate.STEPS

Definition at line 27 of file mpi_scene_gate.py.

◆ RHO

mpi_scene_gate.RHO

Definition at line 28 of file mpi_scene_gate.py.

◆ MU

mpi_scene_gate.MU

Definition at line 28 of file mpi_scene_gate.py.

◆ F

mpi_scene_gate.F

Definition at line 28 of file mpi_scene_gate.py.

◆ DT

mpi_scene_gate.DT

Definition at line 28 of file mpi_scene_gate.py.

◆ RF

float mpi_scene_gate.RF = 0.18

Definition at line 29 of file mpi_scene_gate.py.

◆ R

float mpi_scene_gate.R = RF * N

Definition at line 30 of file mpi_scene_gate.py.

◆ CEN

list mpi_scene_gate.CEN
Initial value:
1= [(0.25*N, 0.25*N, 0.25*N), (0.75*N, 0.75*N, 0.25*N),
2 (0.75*N, 0.25*N, 0.75*N), (0.25*N, 0.75*N, 0.75*N)]

Definition at line 31 of file mpi_scene_gate.py.

◆ KN_R

mpi_scene_gate.KN_R

Definition at line 33 of file mpi_scene_gate.py.

◆ KI_I

mpi_scene_gate.KI_I

Definition at line 33 of file mpi_scene_gate.py.

◆ KI_R

mpi_scene_gate.KI_R

Definition at line 33 of file mpi_scene_gate.py.