Trim species_names in equilibrium.f90 messages - #33
Merged
Conversation
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.
Summary
species_namesischaracter(snl)withsnl = species_name_len = 15, so concatenating it directly into a message pads short species names out to the full 15-character width with trailing spaces. This wraps every remaining untrimmed use ofspecies_namesinequilibrium.f90intrim(...), matching the pattern already used correctly elsewhere in the same file.#9
Changes
Wrapped
species_namesintrim(...)at 13 sites insource/equilibrium.f90:log_info: lines 1720, 1798, 1894, 1943, 2022, 2049, 4200, 5331log_debug: line 1773abort()message: line 1947write(*,*)verbose finite-difference derivative debug dump: lines 3937, 3941, 3946No solver logic, convergence criteria, or numerical output changed — purely string formatting in diagnostic/logging/error messages.
Testing
test/main_interface/example*.inpcases plussamples/rp1311_examples.inpthroughcea.exe -d(debug logging). Confirmed clean (no trailing padding) output at 9 of the 13 fixed sites, including short single/two-character species names (e.g.Inserting BeO(L),Adding AL2O3(L),Phase change: replace BeO(L) with BeO(b),Species F not found in transport database).write(*,*)finite-difference debug dump (lines 3937/3941/3946) isn't reachable from the CLI — only the C/Pythoncompute_fd(verbose=true)API exposes it, and no existing sample/test calls it withverbose=true. Wrote a small standalone C program against the builtcea_bindclibrary to call it directly; confirmed clean output for single-character species names (e.g.dnj/dstate1 (H): abs=..., no padding).EqSolver_correct_singular/test_condensed's error-recovery paths) require the solver to hit an actual ill-conditioned Jacobian mid-iteration; none of the 15 standard example problems came close (nolog_warningabout singular matrices appeared in any run), and I didn't attempt to force these deliberately since it would mean constructing an adversarial degenerate mixture with no guarantee of success. These sites use the identicaltrim(...)wrap already verified correct at the other 9.Compatibility / Numerical behavior
Drafted with Claude's assistance
equilibrium.f90.