Fix integer overflow for large grids
Description
This occurs for large grids and a small number of cores in domain parallelization because an array of size np*stencil_size was allocated and the stencil_size usually is 137 here (because of the cube needed for the interpolation for multigrid routines).
The fix is to first allocate only np points and then to dynamically enlarge the allocation of the array.
News snippet
Fix integer overflow for large grids
Checklist
-
I have checked that my code follows the Octopus coding standards