I updated to a newer code version of Elmer a few days ago and wanted to start optimising my Par-Stokes set-up. With the old version the code runs smoothly, but with the newer version it only works if I comment out the line
in all three solvers. However doing this made the solver significantly slower and in some cases it did not even converge. Even Thomas' course example crashes. Does anyone know if there have been any updates to the ParStokes solver? A quick diff between the version did not indicate any important changes.
The patch below fixes the case. There seems to have been a misunderstaning of the role of the variable initialization statement
in Fortran, which is very different from c/c++. Fortran initializes the variable only once (not at each re-entry) and so the initialization
also implies saving of the variable between calls.