simpeg / discretize

Discretization tools for finite volume and inverse problems.
http://discretize.simpeg.xyz/
MIT License
165 stars 34 forks source link

3D Slicer Bug #363

Closed prisae closed 1 week ago

prisae commented 1 month ago

Confusing stuff.

In here, #261, we fixed this:

import discretize
import numpy as np
mesh = discretize.TensorMesh(([1, 1], [1, 1], [1, 1]), (0, 0, 0))
mesh.plot_3d_slicer(np.ones(mesh.n_cells))

However, the following still gives a wrong result:

import discretize
import numpy as np
mesh = discretize.TensorMesh(([1, 1], [1, 1], [1, 1]), (0, 0, 0))
mesh.plot_3d_slicer(np.zeros(mesh.n_edges_z), v_type='Ez')

Figure_1

prisae commented 1 month ago

Ah, no, the problem is not CC vs (Ex, Ey, Ez), but 0's vs 1's.

This works

import discretize
import numpy as np
mesh = discretize.TensorMesh(([1, 1], [1, 1], [1, 1]), (0, 0, 0))
mesh.plot_3d_slicer(np.ones(mesh.n_cells))

This does not

import discretize
import numpy as np
mesh = discretize.TensorMesh(([1, 1], [1, 1], [1, 1]), (0, 0, 0))
mesh.plot_3d_slicer(np.zeros(mesh.n_cells))