Skip to content

C33 slice 2c part 2: CompKernel.h, VOF/VOF3P, NCLS/NCLS3P take proteus_index_t - #261

Merged
cekees merged 3 commits into
devfrom
c33-s2c-p2
Nov 12, 2026
Merged

cekees merged 3 commits into
devfrom
c33-s2c-p2

Conversation

@cekees

@cekees cekees commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Round: C33 slice 2c, mprans kernel families, part 2 (types only, no numerics). Continues proteustoolkit#1354.

Commit What Checks
b17cca0 CompKernel.h: eN, mesh_l2g, l2g_element -> proteus_index_t; CSR helpers -> proteus_csr_index_t 32/32 build
a356516 VOF + VOF3P (.h, .py) clang -Wshorten 64/32, 64/64, 32/64: 0 warnings (was 851/257); g++ 11.4 clean; vof partition independence + index tests 26 passed
cd010d9 NCLS + NCLS3P (.h, .py) same probes 0 warnings; g++ 11.4 clean; ncls edge partition independence + LS_with_edgeBased_EV + no_bc_dirichlet 14 passed

Retyped by name (c33-tools/declretype.py), not by the narrowing-warning loop. Local face numbers, flags and tags stay int.
Not touched: CLSVOF, MCorr, MCorr3P, SW2DCV (C0 round 11). Not run: a 64-bit-index build, full suite.

🤖 Generated with Claude Code

cekees and others added 3 commits November 11, 2026 17:05
calculateMapping_*, calculateH_element, calculateMappingVelocity_*: eN and the mesh_l2g array (55 signatures);
valFromDOF/gradFromDOF/hessFromDOF/DOFaverage: l2g_element (24); eN_j locals (15). The CSR diffusion helpers
(rowptr, colind, 15 signatures and their `m` loops) take proteus_csr_index_t. Local face numbers (ebN_local*, kb,
*_kb_j) stay int. Types only, no arithmetic changed; includes index_type.h.

At the default 32/32 widths every type is int, so no family changes behaviour. At index 64 the mprans families that
pass int arrays to these helpers no longer compile until their own commit retypes them (VOF/VOF3P and NCLS/NCLS3P
follow in this PR; the rest are listed in HANDOFF_2026-11-11_c33-s2c-p2.md).

Checks: built at 32/32 (macOS arm64, all extensions), VOF/NCLS tests in the family commits below pass on top of it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
VOF.h, VOF3P.h (copy-pasted twins moved together): ArgumentsDict reads of *_l2g, elementBoundaryElementsArray,
exterior/interior/elementBoundariesArray, nElements_global & co, offset_*/stride_*, numDOFs -> proteus_index_t; csr
arrays and NNZ -> proteus_csr_index_t. Locals retyped by name (eN, eN_*, eN2*, ebN, ebNE, ebNE_*, gi, i_global; the
`for i<numDOFs` dof loops; offset/ij/`j` from csrColumnOffsets_DofLoops as csr). std::set/map keys of the cutfem
boundary and DW_Dn_jump maps and the u_u_nz pair map follow. Flags, tags, ebN_local*, *_kb*, eN_side stay int. The
retype is by name (c33-tools/declretype.py), not by the narrowing-warning loop, which over-propagates into local
face numbers. VOF.py/VOF3P.py: internalNodesArray uses cmeshTools.INDEX_DTYPE. Types only, no numerics changed.

Checks:
- clang++ -Wshorten-64-to-32 (probe.sh), VOF.cpp and VOF3P.cpp: index/csr 64/32, 64/64, 32/64 each 0 warnings, 0
  errors (before: 851 and 257 warnings at 64/32).
- g++ 11.4.0 on ceds-model -fsyntax-only (-Wall): clean at 32/32, 64/32, 64/64.
- macOS arm64 build at 32/32; test/test_vof_partition_independence.py + test/test_index_type.py: 26 passed
  (serial vs 2 ranks within 1e-8 for VOF and VOF3P, FCT on/off, controls differ > 1e-3), test/LS_with_edgeBased_EV/VOF
  passed.
- Not run: a 64-bit-index build, the full suite.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…dex_t

Same name-class retype as the VOF commit, on NCLS.h and NCLS3P.h (index arrays and scalars, 59+15 array and 31+11
scalar reads, locals eN*/ebN*/gi, the numDOFs/numOwnedDOFs dof loops, csr offsets and the DofLoops column `j`).
NCLS.py/NCLS3P.py: internalNodesArray uses cmeshTools.INDEX_DTYPE. Flags, tags, ebN_local*, *_kb* stay int.
Types only, no numerics changed.

Checks:
- clang++ -Wshorten-64-to-32, NCLS.cpp and NCLS3P.cpp: index/csr 64/32, 64/64, 32/64 each 0 warnings, 0 errors
  (NCLS.h:1559 missing return is pre-existing).
- g++ 11.4.0 on ceds-model -fsyntax-only (-Wall): clean at 32/32, 64/32, 64/64.
- macOS arm64 build at 32/32; test/test_ncls_edge_partition_independence.py (serial vs 2 ranks within 1e-8 with
  entropy viscosity, 1e-6 with stabilization 1), test/LS_with_edgeBased_EV/NCLS and /VOF,
  test/TwoPhaseFlow/test_ncls_no_bc_dirichlet.py: 14 passed.
- Not run: a 64-bit-index build, the full suite.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant