-
Notifications
You must be signed in to change notification settings - Fork 97
feat: Additonnal context writeStatistics for misappropriate values #3859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the behaviour, when all
is requested but only iteration
or convergence
are allowed, we should have a warning.
src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to implement the comparison between what can be output and the user request in the cleanup()
, because other components can interact with the iteration / convergence output.
Compare *Stats::m_csvOutputOpened
and the user input.
src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp
Outdated
Show resolved
Hide resolved
src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp
Outdated
Show resolved
Hide resolved
Co-authored-by: MelReyCG <[email protected]>
Co-authored-by: MelReyCG <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds warning messages to inform users when statistics output configuration is inappropriate for the solver type. The PR implements validation logic that checks if solvers can properly output the requested statistics type and provides helpful suggestions to users about the correct configuration.
- Adds GEOS_WARNING messages for mismatched statistics output configurations
- Refactors statistics classes to use clearer naming for output request vs. opened state tracking
- Changes default density model type from linear to exponential in schema
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/coreComponents/schema/schema.xsd | Updates default density model type from linear to exponential |
src/coreComponents/physicsSolvers/SolverStatistics.hpp | Refactors member variables and methods for clearer naming and adds documentation |
src/coreComponents/physicsSolvers/SolverStatistics.cpp | Updates implementation to use renamed variables and methods |
src/coreComponents/physicsSolvers/PhysicsSolverBase.hpp | Updates comment documentation for statistics parameter |
src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp | Adds warning logic for inappropriate statistics configurations and improves documentation |
Comments suppressed due to low confidence (1)
src/coreComponents/physicsSolvers/SolverStatistics.cpp:1
- Using insert() instead of assignment operator will not update existing keys. This changes behavior from the original code which used assignment. Use m_residuals[key] = value to maintain the same behavior.
/*
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
integer const newtonIter ); | ||
|
||
/** | ||
* @brief Set a residual value given a key ( column ib the CSV ) |
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'ib' to 'in'.
* @brief Set a residual value given a key ( column ib the CSV ) | |
* @brief Set a residual value given a key ( column in the CSV ) |
Copilot uses AI. Check for mistakes.
|
||
bool wrongIterationCSVOutputRequest = getIterationStats().getCSVOutputRequest() && | ||
!getIterationStats().getCSVOutputOpened(); | ||
bool wrongConvergenceCSVOutputRequest= getConvergenceStats().getCSVOutputRequest() && |
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space before assignment operator. Should be 'wrongConvergenceCSVOutputRequest = ' for consistency with coding style.
bool wrongConvergenceCSVOutputRequest= getConvergenceStats().getCSVOutputRequest() && | |
bool wrongConvergenceCSVOutputRequest = getConvergenceStats().getCSVOutputRequest() && |
Copilot uses AI. Check for mistakes.
Add GEOS_WARNING for the
writeStatistics
attribute in case of misappropriate values.Example with hydrafratureSinglePhase2d.xml
We cannt output iteretion information for both
lagsolve
&SinglePhaseFlow
, here the following warning