The major improvements under this release can be grouped into the following areas:
- New Project Support
- Changes in ParaView Pipeline Creation
- Graph Resource Improvements
New Project Support in SMTK
SMTK’s project system provides data management capabilities to assist end users with creating, aggregating, and organizing the SMTK resources and operations used to carry out simulation tasks and workflows. The Project System simplifies the loading and saving of a workflow by treating all of the necessary resources and operations atomically.
In previous non-project workflows, the user was responsible for loading all of the resources required to implement the workflow, and for explicitly saving those resources and tracking them on disk.
In the new design, SMTK Project is derived from Resource and consequently can be the input of a SMTK Operation. As in the case of other SMTK Resources, new classes of Projects, each with their own set of operations/behavior, can be defined and exposed to applications such as CMB’s ModelBuilder either via a plugin or by directly linking to the new library. New Project types can be created using C++ or Python.
The new Project design also introduces the concepts of roles. The role mechanism provides a more conceptual way of accessing a Project’s Resources. When an SMTK Resource is added to a project, it is assigned a role. Figure 1 shows an example of a Project for a casting workflow.
The three models used in the Project have been assigned different roles that are needed by the workflow. Model 1 represents the mold being used, Model 2 represents the mold along with the cavity that will be filled by the molten material, and Model 3 represents the induction heater.
In addition, the project contains the specifications for four simulations. The View Factor Spec is used to calculate the radiation view factors associated with the mold. The Preheat Spec is used to preheat the mold using an optional induction heater. The Pour Spec is used to simulate the material being poured into the mold & casting geometry. And, finally, the Solidification Spec controls how the mold & casting is cooled using an optional induction heater.
A getting-started tutorial using the new Project Feature can be found at https://smtk.readthedocs.io/en/latest/tutorials/create_a_project/index.html.
ParaView Pipeline Creation Changes
We have moved responsibility for creating pqSMTKResource proxies (which are ParaView pqPipelineSource subclasses) from consumers like the VisibilityBadge and operation panel to pqSMTKRenderResourceBehavior. This fixed an issue where duplicate pipelines were being created and, in general, is more consistent since it does not require the resource panel in order to cause new resources to appear. However, it changes some initialization since proxies will not have an SMTK resource assigned to them at the time many signals are emitted.
This change also adds storage to pqSMTKBehavior to avoid O(n2) computational complexity when many resource-proxies are added to a paraview/modelbuilder client.
Graph Resource Changes
The graph resource now provides a custom subclass of TypeMap named smtk::graph::ArcMap. This subclass deletes the copy and assignment constructors to prevent modifications to accidental copies of arcs rather than to the resource’s arc container.