diff --git a/docs/examples/howto_logparser/plot_logparser_analyses.py b/docs/examples/howto_logparser/plot_logparser_analyses.py index 66dc4ef10dabc8c9bdba0294b5f2c9340f36b489..339320751744a1adaa2c65480096b88b7eb22eac 100644 --- a/docs/examples/howto_logparser/plot_logparser_analyses.py +++ b/docs/examples/howto_logparser/plot_logparser_analyses.py @@ -40,8 +40,8 @@ df_records = pd.DataFrame(records) df_log = fill_ogs_context(df_records) # %% -# Iterations per time step -# ------------------------ +# Analysis of iterations per time step +# ------------------------------------ # Please see explanation in logparser # :ref:`sphx_glr_auto_examples_howto_logparser_plot_logparser_intro.py`. # (Section: Use predefined analyses) @@ -52,8 +52,8 @@ df_ts_it # noqa: B018 # %% -# Performance in separate parts by time step -# --------------------------------------------- +# Analysis of computational efficiency by time step +# ------------------------------------------------- # The resulting table presents the performance metrics for separate parts of the simulation, # organized by time step. Is uses :py:mod:`ogstools.logparser.analysis_time_step`. # Each row corresponds to a specific time step, displaying metrics such @@ -66,8 +66,6 @@ df_ts = df_ts.loc[0] # - see advanced df_ts # noqa: B018 # %% -# Performance of in separate parts by time step - plot -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # We select only some metrics (3) and use pandas plot function. df_ts[["assembly_time", "dirichlet_time", "linear_solver_time"]].plot( logy=True, grid=True @@ -85,8 +83,8 @@ analysis_convergence_newton_iteration(df_log) # %% -# Staggered -# --------- +# Staggered - Analysis of convergence criteria - Newton iterations +# ---------------------------------------------------------------- # The resulting table provides convergence criteria for staggered coupled processes, # Each row represents convergence metrics such as `global component norm |x|`, `change of global component norm |dx|` (change between 2 iteration of non linear solver) # and `relative change of global component |dx|/|x|` at different time steps and coupling diff --git a/ogstools/logparser/common_ogs_analyses.py b/ogstools/logparser/common_ogs_analyses.py index 1ae1bd007e7fe8c802eff57d635199bf4781bb78..7737884b57ec413b6272c255e5965d231122b62a 100644 --- a/ogstools/logparser/common_ogs_analyses.py +++ b/ogstools/logparser/common_ogs_analyses.py @@ -206,11 +206,13 @@ def fill_ogs_context(df_raw_log: pd.DataFrame) -> pd.DataFrame: Pandas documentation : https://pandas.pydata.org/pandas-docs/stable/user_guide/ Notes: - Some logs do not contain information about time_step and iteration. The information must be collected by context (by surrounding log lines from same mpi_process) - Logs are grouped by mpi_process to get only surrounding log lines from same mpi_process + Some logs do not contain information about time_step and iteration. The + information must be collected by context (by surrounding log lines from same mpi_process). + Logs are grouped by mpi_process to get only surrounding log lines from same mpi_process. There are log lines that give the current time step (when time step starts). - It can be assumed that in all following lines belong to this time steps, until next collected value of time step - Some columns that contain actual integer values are converted to float + It can be assumed that in all following lines belong to this time steps, until next + collected value of time step. + Some columns that contain actual integer values are converted to float. See https://pandas.pydata.org/pandas-docs/stable/user_guide/integer_na.html ToDo list of columns with integer values are known from regular expression