Skip to content

Resolve "Remove implicit saved variable"

Martin Lueders requested to merge 1222-remove-implicit-saved-variable into main

Description

There are a few places in the code, were we define initial values of a local variable in subroutines/functions. These have an implied 'save' attribute, which means the definition happens only at compile time, not every time the routine is entered. (see https://fortran-lang.org/learn/quickstart/gotchas/#implied-save). In the case of the output of the pressure, this created a real bug.

News snippet

Avoid implied 'save' attribute for local variables.

Checklist

  • I have checked that my code follows the Octopus coding standards
  • I have added tests for all the new features added in this request.

Closes #1222 (closed)

Merge request reports

Loading