Phases do not believe in ghost (points)
Description
We should never apply the phase to the ghost points, as these are point which might be uninitialized and will be anyway replace later on. This also makes the code faster in domain parallelization for periodic systems.
This problem was leading in some cases to arithmetic floating point exceptions is one initializes floats with NaNs, and valgrind was complaining about this problem too.
At the moment, the GPU case is not treated. Also, there are many parts in the code where the phases are also added on ghost points and a similar logic should be applied for these points.
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.
Edited by Nicolas Tancogne-Dejean