Skip to content

fix(trackcvg): dynamic x-axis label based on residuals header#159

Open
florian-simvia wants to merge 1 commit intocode-saturne:masterfrom
florian-simvia:fix/trackcvg-xlabel
Open

fix(trackcvg): dynamic x-axis label based on residuals header#159
florian-simvia wants to merge 1 commit intocode-saturne:masterfrom
florian-simvia:fix/trackcvg-xlabel

Conversation

@florian-simvia
Copy link
Copy Markdown

Summary :

The x-axis label in trackcvg was hardcoded to time (s) for all subplots. When local time stepping is used, the first column of residuals.csv is iteration, not t, so the label was incorrect.

This patch reads the first column of the residuals CSV/DAT header to detect the mode and sets the x-axis label per subplot:

  • Residuals subplots: Iteration number or Time (s) depending on the header
  • Probes subplots: always Time (s)

Changes:

  • Add detectXLabelCsv / detectXLabelDat methods to detect x-axis type from file header
  • Replace hardcoded time (s) in drawFigure with per-subplot labels
  • Track which subplots contain residuals in updateView to assign the correct label

Test:

Tested manually with:

  • Local time stepping case (header iteration) → displays Iteration number on residuals subplot, Time (s) on probes subplot
  • For other time integration (header t) → displays Time (s) on residuals and probes subplot

The x-axis label was hardcoded to "time (s)" for all subplots.
When local time stepping is used, residuals are indexed by
iteration number, not physical time. This reads the first column
of the residuals CSV/DAT header to detect the mode and sets the
label per subplot: "Iteration number" for residuals in iteration
mode, "Time (s)" otherwise. Probes and profiles always default
to "Time (s)".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant