Closed Tartenpi0m closed 1 year ago
Very strange. I'll look into it!
So the problem is that each time you call spatial_gradient with type=StaggeredGrid
, the sample points are shifted half a cell to the left. Then, when you call u + dudx2
, there is a full cell shift difference.
You can fix this by putting the left-most cell to the right edge instead using
dudx2 = phi.field.pad(dudx2, {'x': (-1, 1)})
Hope that helps!
Hello ! I have this error :
IncompatibleShapes: Cannot merge shapes [(xˢ=1024), (xˢ=1023)] because dimension 'x' exists with different sizes.
when I try to execute this code :
The error occurs only for bad combination of global_precision and N. For example, it occurs with :
N=64 & prec=32
Thank you !