From eeb38916b30da083a4d2f34daab5a9ddae600ec1 Mon Sep 17 00:00:00 2001 From: Frederik Hennig <frederik.hennig@fau.de> Date: Fri, 28 Mar 2025 10:57:47 +0100 Subject: [PATCH] notes on inclusivity of cell intervals --- .../reference/PystencilsLanguageExtensions.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/user_manual/reference/PystencilsLanguageExtensions.md b/user_manual/reference/PystencilsLanguageExtensions.md index df1d863..ebcd12e 100644 --- a/user_manual/reference/PystencilsLanguageExtensions.md +++ b/user_manual/reference/PystencilsLanguageExtensions.md @@ -29,13 +29,20 @@ All Python APIs are listed relative to `walberla.codegen.symbolic`. - Symbolic Functions - C++ API * - Domain Axis-Aligned Bounding Box - - `domain.[xyz]_min()`, `domain.[xyz]_max()` + - `domain.[x|y|z]_min()`, `domain.[x|y|z]_max()` - `StructuredBlockForest::getDomain()` * - Domain Cell Bounding Box (Current Refinement Level) - - `domain_cell_bb.[xyz]_min()`, `domain_cell_bb.[xyz]_max()` + - `domain_cell_bb.[x|y|z]_min()`, `domain_cell_bb.[x|y|z]_max()` - `StructuredBlockStorage::getDomainCellBB()` ::: +:::{note} +Similar to `CellInterval::max()` in the C++ API, +`domain_cell_bb.[x|y|z]_max()` refers to the largest valid cell index in the domain. +Therefore, a comparison with `<=` (instead of `<`) is necessary +in order to check if a cell is inside the domain. +::: + ### Block Geometry :::{list-table} @@ -50,6 +57,10 @@ All Python APIs are listed relative to `walberla.codegen.symbolic`. - `StructuredBlockForest::getBlockCellBB()` ::: +:::{note} +`block_cell_bb.[x|y|z]_max()` is *inclusive* to the block's cell bounding box; +to check if a cell lies inside the block, use `<=` as a comparison operator. +::: ### Cell Geometry -- GitLab