Remove GFortran left-hand side reallocations.
Description
Compiling with -Wrealloc-lhs
shows where GFortran is introducing reallocation (even if some might not happen in practice due to optimization).
While this is something we don't really care, I am still changing the code in multiple cases, to reduce the number of occurrences of these reallocations. This is done using explicit shape of the array to avoid left-hand side reallocations, as suggested by the compiler documentation.
This has the advantage that we know when we manipulation arrays, and thus allows more easily to find where some expansive copies can be replaced by BLAS calls.
This merge request replaces some of these calls by BLAS copies.
News snippet
Minor optimization
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.