Skip to content

Stand up an exodus session...

... in this repository using cmb/plugins/opencascade-session> as a template.

  • Copy the cmake directory from the opencascade session, renaming ocXXX.cmake to exodusXXX.cmake.
    • Remove the OpenCascade dependency and require VTK.
  • Copy the files from smtk/session/opencascade into smtk/session/exodus with the following changes:
    • Adapt Shape.{h,cxx} to omit OCC headers and a protected vtkSmartPointer<vtkDataObject> ivar (so that the node itself owns the data). This node type will serve as a base class for ElementBlock, SideSet, and NodeSet classes. The Shape should also have a Component* m_parent ivar that stores a raw pointer to its parent group (see below) and an int 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 all ElementBlocks (and SideSets and NodeSets) togther. It will also be a base class for a File node type that represents an exodus file. An exodus resource may contain multiple Files, 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} into smtk/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 to smtk/session/exodus/Registrar.
    • Create new Import, Read, and Write 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). The File should have a string property that lists the source Exodus file. The Shape 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 Files to load with a vtkExodusIIReader and how to map blocks from its output to the components created by deserializing the JSON.