rtx-cfd 3D Stage 1 item 1: three_d::{Grid3, poisson} — the 2D Poisson stack transcribed to a seven-point operator (sanitised coefficients, 2×2×2 Galerkin aggregation, (i+j+k)%2 colouring, periodic z, run_pcg line for line, PcgCache3); gate 1 HELD: nz=1 bit-identical to the 2D solver (solution + iterations, lex + red-black, cached/uncached); extrusion z-invariant to the solve's accuracy (bit-identical planes for lexicographic decoupled); probes for the aggregation/colouring interaction
CI / Test (macos-latest) (push) Blocked by required conditions
CI / Test (ubuntu-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (macos-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / WASM Build + Size Check (push) Blocked by required conditions
CI / Distributed Training Tests (push) Blocked by required conditions
CI / CI Success (push) Blocked by required conditions
CI / Build (macos-latest) (push) Waiting to run
Documentation / Build API Documentation (push) Failing after 4s
CI / Build (ubuntu-latest) (push) Failing after 4s
Documentation / Build User Guide (push) Successful in 5s
CI / Format Check (push) Failing after 10s
CI / Build CPU-Only (Explicit) (push) Failing after 1m38s
CI / Clippy Check (push) Failing after 2m43s
Performance Benchmarks / Run Benchmarks (push) Successful in 6m24s
CI / Test (macos-latest) (push) Blocked by required conditions
CI / Test (ubuntu-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (macos-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / WASM Build + Size Check (push) Blocked by required conditions
CI / Distributed Training Tests (push) Blocked by required conditions
CI / CI Success (push) Blocked by required conditions
CI / Build (macos-latest) (push) Waiting to run
Documentation / Build API Documentation (push) Failing after 4s
CI / Build (ubuntu-latest) (push) Failing after 4s
Documentation / Build User Guide (push) Successful in 5s
CI / Format Check (push) Failing after 10s
CI / Build CPU-Only (Explicit) (push) Failing after 1m38s
CI / Clippy Check (push) Failing after 2m43s
Performance Benchmarks / Run Benchmarks (push) Successful in 6m24s
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
7e135893a2
commit
0794e1b6db
@@ -38,6 +38,7 @@ pub mod simple;
|
||||
pub mod simple_gpu;
|
||||
/// CSR matrix + Jacobi-BiCGSTAB for the curvilinear pressure equation
|
||||
pub mod sparse_bicgstab;
|
||||
pub mod three_d;
|
||||
|
||||
// Re-export main types
|
||||
pub use ale::{
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
//! The three-dimensional embedded solver (omni-cortex
|
||||
//! `docs/three_d_stage1_campaign.md`): a sharp-interface embedded wall on a
|
||||
//! Cartesian grid, device-resident. Stage 1 = the core (this module tree),
|
||||
//! the smooth wall and the DFG 3D-2Z gate. The 2D solver is NOT touched:
|
||||
//! at `nz = 1` the code here must reproduce its digits, which is the first
|
||||
//! gate of every piece.
|
||||
//!
|
||||
//! Layout: cells are `(k, j, i)` row-major, `cell = (k * ny + j) * nx + i`.
|
||||
|
||||
pub mod poisson;
|
||||
|
||||
/// A uniform Cartesian grid.
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct Grid3 {
|
||||
pub nx: usize,
|
||||
pub ny: usize,
|
||||
pub nz: usize,
|
||||
pub dx: f64,
|
||||
pub dy: f64,
|
||||
pub dz: f64,
|
||||
}
|
||||
|
||||
impl Grid3 {
|
||||
/// Cells in the domain.
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub fn cells(&self) -> usize {
|
||||
self.nx * self.ny * self.nz
|
||||
}
|
||||
|
||||
/// Row-major cell index of `(k, j, i)`.
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub fn cell(&self, k: usize, j: usize, i: usize) -> usize {
|
||||
(k * self.ny + j) * self.nx + i
|
||||
}
|
||||
|
||||
/// `(k, j, i)` of a cell index.
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub fn kji(&self, idx: usize) -> (usize, usize, usize) {
|
||||
let nxy = self.nx * self.ny;
|
||||
(idx / nxy, (idx % nxy) / self.nx, idx % self.nx)
|
||||
}
|
||||
|
||||
/// Index of the u face west of cell `(k, j, i)` on the `(nx + 1) × ny × nz`
|
||||
/// staggered array (`i = nx` is the east face of the last cell).
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub fn uface(&self, k: usize, j: usize, i: usize) -> usize {
|
||||
(k * self.ny + j) * (self.nx + 1) + i
|
||||
}
|
||||
|
||||
/// Index of the v face south of cell `(k, j, i)` on `nx × (ny + 1) × nz`.
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub fn vface(&self, k: usize, j: usize, i: usize) -> usize {
|
||||
(k * (self.ny + 1) + j) * self.nx + i
|
||||
}
|
||||
|
||||
/// Index of the w face below cell `(k, j, i)` on `nx × ny × (nz + 1)`.
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub fn wface(&self, k: usize, j: usize, i: usize) -> usize {
|
||||
(k * self.ny + j) * self.nx + i
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user