Stand up an exodus session...
... in this repository using cmb/plugins/opencascade-session> as a template.
-
Copy the
cmake
directory from the opencascade session, renamingocXXX.cmake
toexodusXXX.cmake
.- Remove the OpenCascade dependency and require VTK.
-
Copy the files from
smtk/session/opencascade
intosmtk/session/exodus
with the following changes:-
Adapt
Shape.{h,cxx}
to omit OCC headers and a protectedvtkSmartPointer<vtkDataObject>
ivar (so that the node itself owns the data). This node type will serve as a base class forElementBlock
,SideSet
, andNodeSet
classes. The Shape should also have aComponent* m_parent
ivar that stores a raw pointer to its parent group (see below) and anint m_pedigreeId
ivar referencing the block/set ID from the file. -
Create a
Group.{h,cxx}
class similar to Shape that holds raw pointers to children Shapes instead of VTK data. This node type will serve as a base class for grouping allElementBlock
s (andSideSet
s andNodeSet
s) togther. It will also be a base class for aFile
node type that represents an exodus file. An exodus resource may contain multipleFile
s, each of which will reference groups of blocks by type. -
Copy the
arcs/{ParentsAs,ChildrenAs}.h
files (but not the.txx
files). Adapt the.txx
files to provide implementations that use ivars in the shape and group classes to find parents/children. -
Copy the
smtk/session/opencascade/vtk/Geometry.{h,cxx}
intosmtk/session/exodus/Geometry.{h,cxx}
, moving it out of the vtk directory since the exodus session will rely on VTK directly. Add the Geometry registration tosmtk/session/exodus/Registrar
. -
Create new
Import
,Read
, andWrite
operations.-
The Import operation should create a
File
node and arcs that connect it to groups (one for element blocks, one for side sets, one for node sets). TheFile
should have a string property that lists the source Exodus file. TheShape
subclasses should have their pedigreee ID set. - The Write operation should include a JSON object mapping pedigree IDs to UUIDs (as well as JSON for the components, especially the Files so their locations are serialized).
-
The Read operation should use the above to determine what
File
s to load with a vtkExodusIIReader and how to map blocks from its output to the components created by deserializing the JSON.
-
The Import operation should create a
-
Adapt