omf-python icon indicating copy to clipboard operation
omf-python copied to clipboard

Point based/structured grids?

Open banesullivan opened this issue 6 years ago • 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 https://github.com/simpeg/discretize/pull/174

banesullivan avatar May 31 '19 18:05 banesullivan

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

banesullivan avatar May 31 '19 18:05 banesullivan