GEOS-DEV / GEOS

GEOS Simulation Framework
GNU Lesser General Public License v2.1
210 stars 84 forks source link

Adding logLevel documentation #3089

Closed arng40 closed 2 months ago

arng40 commented 5 months ago

This PR aim to document all logLevel in GEOS and to invite the contributors to set descriptions when they enable the logLevel wrapper:

Currently, we have this output in all Group documentation files:

========= ========= ======== ================
Name      Type      Default  Description                                                                             
========= ========= ======== ================
[...]
logLevel  integer   0        Log level     
========= ========= ======== ================

This PR brings more context to all logLevels of GEOS:

I.e. SolidMechanics_LagrangianFEM.rst :

========= ========= ======== ========================================================================================
Name      Type      Default  Description                                                                             
========= ========= ======== ========================================================================================
[...]
logLevel  integer   0        | Sets the level of information to write in the standard output (the console typically).
                             | A level of 0 outputs minimal information, higher levels require more.                 
                             | logLevel >= 1                                                                         
                             |  - Information on line search                                                         
                             |  - Information on global solution scaling factor                                      
                             |  - Information on the timestep                                                        
                             |  - Print residual norm                                                                
                             | logLevel >= 1 and configuration didn't converge                                       
                             |  - Information about testing new configuration and print the time step                
                             | logLevel >= 1 and incorrect solution                                                  
                             |  - Information about line search failed                                               
                             | logLevel >= 1 and linear system                                                       
                             |  - Information on number of iterations and residual reduction                         
                             | logLevel >= 1 and non linear system                                                   
                             |  - Information on each newton Iteration                                               
                             | logLevel >= 1 and residual norm above the max allowed residual norm                   
                             |  - Indicate allowed residual norm                                                     
                             | logLevel >= 2                                                                         
                             |  - Output to screen the assembled linear system and solutions (matrices and vectors)  
                             |  - Infos on residuals values                                                          
                             | logLevel >= 2 and target set is empty                                                 
                             |  - Warning about boundary conditions                                                  
                             | logLevel >= 3                                                                         
                             |  - Output to file the assembled linear system and solutions (matrices and vectors)    
========= ========= ======== ========================================================================================
codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 79.50311% with 33 lines in your changes missing coverage. Please review.

Project coverage is 55.75%. Comparing base (3bf12d2) to head (b47ffe8). Report is 8 commits behind head on develop.

:exclamation: Current head b47ffe8 differs from pull request most recent head c56f007

Please upload reports for the commit c56f007 to get more accurate results.

Files Patch % Lines
...sicsSolvers/surfaceGeneration/SurfaceGenerator.cpp 0.00% 6 Missing :warning:
...hysicsSolvers/multiphysics/HydrofractureSolver.cpp 0.00% 4 Missing :warning:
...s/physicsSolvers/simplePDE/PhaseFieldDamageFEM.cpp 0.00% 3 Missing :warning:
...onstitutive/relativePermeability/RelpermDriver.cpp 0.00% 2 Missing :warning:
...olvers/solidMechanics/SolidMechanicsStateReset.cpp 0.00% 2 Missing :warning:
...ers/surfaceGeneration/EmbeddedSurfaceGenerator.cpp 0.00% 2 Missing :warning:
src/coreComponents/fileIO/Outputs/ChomboIO.cpp 0.00% 1 Missing :warning:
src/coreComponents/fileIO/Outputs/VTKOutput.cpp 0.00% 1 Missing :warning:
...onents/linearAlgebra/interfaces/hypre/HypreMGR.cpp 0.00% 1 Missing :warning:
...mponents/mesh/simpleGeometricObjects/Rectangle.cpp 0.00% 1 Missing :warning:
... and 10 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3089 +/- ## =========================================== + Coverage 55.71% 55.75% +0.03% =========================================== Files 1031 1031 Lines 87698 87823 +125 =========================================== + Hits 48863 48962 +99 - Misses 38835 38861 +26 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

paveltomin commented 3 months ago

How is all that connects with proposal about logLevel labels in https://github.com/GEOS-DEV/GEOS/issues/3014 ?

arng40 commented 3 months ago

This PR is related to the #3179 and not the #3014.

arng40 commented 3 months ago

@TotoGaz Thanks for your feedback, in reply to your suggestion : Would a highly coupled class be an issue? Group would only have 1 attribute & 1 getter for this class. Or is it better to have a purely not coupled class? Group would have 1 attribute, 1 getter, and 1 method (appendLogLevelDescription()).