PERF-2 P1.2: the overlap map's cell classification skips the point location for background cells outside the patch's node bounding box (no patch cell can contain them and the body lies inside the patch: Active, the class the search returns); PatchMesh::bounding_box
CI / Build (macos-latest) (push) Waiting to run
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 / Format Check (push) Failing after 6s
Performance Benchmarks / Run Benchmarks (push) Failing after 6s
CI / Clippy Check (push) Failing after 5s
CI / Build (ubuntu-latest) (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 7s
Documentation / Build API Documentation (push) Failing after 25s
CI / Build CPU-Only (Explicit) (push) Failing after 1m30s
CI / Build (macos-latest) (push) Waiting to run
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 / Format Check (push) Failing after 6s
Performance Benchmarks / Run Benchmarks (push) Failing after 6s
CI / Clippy Check (push) Failing after 5s
CI / Build (ubuntu-latest) (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 7s
Documentation / Build API Documentation (push) Failing after 25s
CI / Build CPU-Only (Explicit) (push) Failing after 1m30s
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01YJPeT6WA2e7YvAnS875AHL
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
79c18def32
commit
e0b5983436
@@ -173,6 +173,23 @@ impl PatchMesh {
|
|||||||
k * (self.ns + 1) + i
|
k * (self.ns + 1) + i
|
||||||
}
|
}
|
||||||
/// Node coordinates.
|
/// Node coordinates.
|
||||||
|
/// `[x_min, x_max, y_min, y_max]` over the nodes.
|
||||||
|
pub fn bounding_box(&self) -> [f64; 4] {
|
||||||
|
let (mut b, mut first) = ([0.0; 4], true);
|
||||||
|
for (&x, &y) in self.x.iter().zip(&self.y) {
|
||||||
|
if first {
|
||||||
|
b = [x, x, y, y];
|
||||||
|
first = false;
|
||||||
|
} else {
|
||||||
|
b[0] = b[0].min(x);
|
||||||
|
b[1] = b[1].max(x);
|
||||||
|
b[2] = b[2].min(y);
|
||||||
|
b[3] = b[3].max(y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
b
|
||||||
|
}
|
||||||
|
|
||||||
pub fn node_xy(&self, n: usize) -> [f64; 2] {
|
pub fn node_xy(&self, n: usize) -> [f64; 2] {
|
||||||
[self.x[n], self.y[n]]
|
[self.x[n], self.y[n]]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,13 +162,20 @@ impl OverlapMap {
|
|||||||
let primal = QuadIndex::primal(patch);
|
let primal = QuadIndex::primal(patch);
|
||||||
let body = body_polygon(patch);
|
let body = body_polygon(patch);
|
||||||
|
|
||||||
// 1. Cells.
|
// 1. Cells. A centre outside the patch's node bounding box lies in
|
||||||
|
// no patch cell and outside the body (which the patch encloses):
|
||||||
|
// Active without a point location (PERF-2 P1.2, the same class
|
||||||
|
// the search would return).
|
||||||
|
let bbox = patch.bounding_box();
|
||||||
let mut class = vec![CellClass::Active; nx * ny];
|
let mut class = vec![CellClass::Active; nx * ny];
|
||||||
let mut hole_cells = 0;
|
let mut hole_cells = 0;
|
||||||
for j in 0..ny {
|
for j in 0..ny {
|
||||||
for i in 0..nx {
|
for i in 0..nx {
|
||||||
let x = (i as f64 + 0.5) * dx;
|
let x = (i as f64 + 0.5) * dx;
|
||||||
let y = (j as f64 + 0.5) * dy;
|
let y = (j as f64 + 0.5) * dy;
|
||||||
|
if x < bbox[0] || x > bbox[1] || y < bbox[2] || y > bbox[3] {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
let in_hole = match primal.locate(patch, x, y) {
|
let in_hole = match primal.locate(patch, x, y) {
|
||||||
Some(c) => patch.cell_ki(c).0 <= hole_row_max,
|
Some(c) => patch.cell_ki(c).0 <= hole_row_max,
|
||||||
None => body
|
None => body
|
||||||
|
|||||||
Reference in New Issue
Block a user