Repository navigation
Initialize PBSAM inputs and pass surface file count - #324
Merged
Merged
Conversation
solvePBSAM left the PBAMInput struct uninitialized, only set gridPts_ when the input explicitly specified it, and never copied surfct, so PBSAM ignored any surf files. Zero-initialize the struct, always pass the grid-point count (which defaults to 15), and set surfct_. Supersedes the routines.c portion of #311; its CMake change already landed in #322. Co-authored-by: Copilot <[email protected]> Copilot-Session: 3eaf20ea-3ac0-4701-958f-28527bf641fc
This was referenced Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes two input-setup bugs in
solvePBSAMthat are still onmain.PBAMInput pbamInwas uninitialized, andgridPts_was only set when the input file specifiedpts, so PBSAM otherwise received an indeterminate grid-point count and other unset fields.pbsamIn.surfct_was never set, so PBSAM ignored anysurffiles listed in the input.Changes:
pbamIn.parm->gridpt, which defaults to 15 inPBAMparm_ctor2.samparm->surfctintopbsamIn.surfct_.This supersedes the
routines.cportion of draft #311.Its CMake
mclinking change already landed in #322.The
pbsam-barn_barsexample data problem from #298 is not addressed here.Validation: a local macOS build with
ENABLE_PBAM=ONandENABLE_PBSAM=ONpassespbam_testandpbsam_testwith no compiler warnings inroutines.c.The PR's
pb-solversCI job runs the same tests on Linux.Refs #321, #311.