correct fake_state in initActiveControl()#603
correct fake_state in initActiveControl()#603baperry2 merged 3 commits intoAMReX-Combustion:developmentfrom
Conversation
AMREX_D_DECL(0, 0, 0) only expands to 2 values in 2D, leaving z uninitialized and causing the warning
There was a problem hiding this comment.
Pull request overview
This PR fixes a debug mode runtime issue in the initActiveControl() function by properly initializing the fake_state Array4 object. The previous default constructor initialization was incomplete and caused failures when running in debug mode. The new initialization explicitly provides the necessary bounds and component count parameters to the Array4 constructor.
Key changes:
- Replace default Array4 constructor with explicit parameter-based constructor
- Add Dim3 begin and end bounds for the fake Array4 object
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
baperry2
left a comment
There was a problem hiding this comment.
This is a bit sketchy because it gives the Array4 valid bounds when the underlying data is still null, but it's needed given the limitations of the CellData class, and we never actually access the underlying data anyway because the s_in parameter isn't used in the relevant bcnormal for TripleFlame where this gets used.
* Point PelePhysics to development branch for GCM * Add compilation flag for SPRAY_GCM * Update PelePhysics * Update PelePhysics * Update PelePhysics * Revert PelePhysics to 22d8cd3 * Formatting from PelePhysics * Rename var from PelePhysics * Rebase PelePhysics to delete merge with development * Remove extra rho_part from Drag.H for LMeX formatting * merge PelePhysics AMReX-Combustion#603 into gcm-dev * Update PelePhysics to 8f9a39f * Update PelePhysics to AMReX-Combustion#602 * First working GCM in Pele * Test GCM vs. PeleMP * Update PP * Change compile flag for GCM * Point PP to AMReX-Combustion/PelePhysics * Point to PP dev * Point to latest PP dev * Add GCM test for mixture JP8, make Validate.py more user friendly * Python formatting * Revert .gitmodules * Add GCM case to CI test, requires SPRAY_GCM in CMake, cleanup RegTest/SingleDropEvap * Update input file in Tests/CMakeLists.txt * Update CMake for CI test * Add input file for CI test * Revert Tests/CMakeLists.txt * Update PelePhysics * Change to PELE_PHYSICS_SPRAY_GCM, point to latest PelePhysics dev
impossible to run in debug mode due to the incomplete declaration of fake_state in initActiveControl(), propose a solution to be able to run in debug mode with a proper declaration of fake_state variable