I have just started familiarising myself with SimPEG and looking at its FDEM forward modelling capabilities. I have been exploring examples that use a cylindrical mesh for such problems (thank you for those!). I am now looking at using tree meshes because it seems to provide greater flexibility in mesh structure. I came across the function ‘mesh_builder_xyz’ in the discretize utils package, which builds a tensor mesh based on the input points. When I change the mesh_type to ‘tree’, it throws an error. I realised this error occurred because the resulting mesh has no cell centres or cell faces (when printing
mesh.nF). Would anyone be able to shed some light on what the reason could be?
import discretize import matplotlib.pyplot as plt import numpy as np xyLoc = np.random.randn(8,2) mesh = discretize.utils.meshutils.mesh_builder_xyz( xyLoc, [0.1, 0.1], depth_core=0.5, padding_distance=[[1,2], [1,0]], mesh_type='tree', ) print(mesh.nC,mesh.nF) axs = plt.subplot() mesh.plotImage(mesh.vol, grid=True, ax=axs) axs.scatter(xyLoc[:,0], xyLoc[:,1], 15, c='w', zorder=3) axs.set_aspect('equal') plt.show()