gmggroup/omf-python

Point based/structured grids?

Opened this issue · 1 comments

I'm just now realizing there isn't exactly support for structured grids (points based grids) in OMF.

For example, take discretize's CurvilinearMesh class and preview a 3D rendering of it here

import discretize
import numpy as np
import pyvista as pv

sz = [16, 16, 16]
curv = discretize.CurvilinearMesh(discretize.utils.exampleLrmGrid(sz, 'rotate'))
vec = np.arange(curv.nC)
data = {'a': vec, 'b': vec + 1}

curv.to_vtk(data).slice_orthogonal().plot(show_edges=True)

ezgif com-video-to-gif-4

@fwkoch: How would one go about serializing this type of structured grid to the OMF format? Are there plans for node-based grids in v2.0?

Relevant to simpeg/discretize#174

Also, the equivalent VTK data structure I have in mind id vtkStructuredGrid (pyvista.StructuredGrid)