Dear all,
I try to extract the values of a function h, at some specific positions with the function .at() .
I define a coarse mesh with
Nx_fine = int(Lx/0.4) + 1
Ny_fine = int(Ly/0.4) + 1
coarse_mesh = RectangleMesh(Nx_coarse,Ny_coarse,Lx,Ly,quadrilateral=True)
coarse_V = FunctionSpace(coarse_mesh, "CG", 1)
coarse_h = Function(coarse_V, name="h")
V_vec_c = VectorFunctionSpace(coarse_mesh, "CG", 1)
coarse_points = Function(V_vec_c , name="coarse_points")
coarse_points.interpolate(SpatialCoordinate(coarse_mesh))
Nx_fine = int(Lx/0.1) + 1
Ny_fine = int(Ly/0.1) + 1
fine_mesh = RectangleMesh(Nx_fine,Ny_fine,Lx,Ly,quadrilateral=True)
fine_V = FunctionSpace(fine_mesh, "CG", 1)
fine_h = Function(fine_V, name="h")
Then I load an h5 function into fine_h (defined on the
same function space) with
dumb_file_fine = DumbCheckpoint(save_path+"fine/h_0", mode=FILE_READ)
dumb_file_fine.load(fine_h)
dumb_file_fine.close()
coarse_data_fine = fine_h.at(coarse_points.dat.data_ro)
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run
[0]PETSC ERROR: to get more information on the crash.
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 59.
NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------