When I try to save a MeshFunction with MPI with parameters['ghost_mode'] = 'shared_facet'
it gives me some error. May I know how to solve this? and what is the problem here?
I am using dolfin
2018.2.0.
from dolfin import *
from os import path
parameters['ghost_mode'] = 'shared_facet'
# Create a mesh
mesh = UnitSquareMesh(32, 32)
class rectangle(SubDomain):
def inside(self,x, on_boundary):
return between(x[0],(0.25,0.75)) and between(x[1],(0.25,0.75))
Rec = rectangle()
# Define domain indicator function
domainindicator = MeshFunction('size_t', mesh, mesh.topology().dim())
domainindicator.set_all(1)
Rec.mark(domainindicator,0)
my_filed = XDMFFile(MPI.comm_world, "domainindicator.xdmf")
my_filed.write(domainindicator)
Above is the MWE and it gives this error:
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) MPI-process 1:
#000: ../../../src/H5Dio.c line 263 in H5Dwrite(): file selection+offset not within extent
major: Dataspace
minor: Out of range