Dear NGSolve developers,
I recently updated NGSolve to git revision baa43 and found that my older code
for loading a grid function from NGSolve’s binary format doesn’t work anymore.
Below is a minimal working example (the code files and binary function are attached):
from ngsolve import *
import netgen.meshing
from netgen.geom2d import unit_square
# setup the mesh
if mpi_world.rank == 0:
ngmesh = Mesh("mesh_subsquare.vol").ngmesh
ngmesh.Distribute(mpi_world)
else:
ngmesh = netgen.meshing.Mesh.Receive(mpi_world)
ngmesh.SetGeometry(unit_square)
mesh = Mesh(ngmesh)
# load function
gf = GridFunction(H1(mesh, order = 4))
gf.Load("ushape_smooth.ngs", parallel = True)
VTKOutput(ma = mesh, coefs = [gf], names = ["ushape"], filename="ushape_" + str(mpi_world.rank)).Do()
At git revision 6f862 the vtk files show the right function (a phase field with the shape of a u,
somehow I cannot get the corresponding image attached).
At baa43, however, the result is
In non-MPI mode everything is still fine.
I couldn’t find a hint in the documentation. Am I using something wrong?
All the best,
Philipp
Attachment: mwe.tar_2020-09-20-3.zip