The version of `Filter::Execute` that takes a policy as an argument is now
deprecated. Filters are now able to specify their own fields and types,
which is often why you want to customize the policy for an execution. The
other reason is that you are compiling VTK-m into some other source that
uses a particular types of storage. However, there is now a mechanism in
the CMake configuration to allow you to provide a header that customizes
the "default" types used in filters. This is a much more convenient way to
compile filters for specific types.
One thing that filters were not able to do was to customize what cell sets
they allowed using. This allows filters to self-select what types of cell
sets they support (beyond simply just structured or unstructured). To
support this, the lists `SupportedCellSets`, `SupportedStructuredCellSets`,
and `SupportedUnstructuredCellSets` have been added to `Filter`. When you
apply a policy to a cell set, you now have to also provide the filter.
VTK-m now provides the following filters with the default policy
as part of the vtkm_filter library:
- CellAverage
- CleanGrid
- ClipWithField
- ClipWithImplicitFunction
- Contour
- ExternalFaces
- ExtractStructured
- PointAverage
- Threshold
- VectorMagnitude
By building these as a library we hope to provide faster compile
times for consumers of VTK-m when using common configurations.
Previously, all the ApplyPolicy functions had the same name and used
template resolution to figure out which one to use. This was pretty
clear at first when there was just one for fields and one for cell sets.
But then it grew to several different types, particularly for fields. It
was hard to look at the code and figure out which form of ApplyPolicy
was being used, and compilers were starting to get confused.
Resolve the problem by giving all the methods unique names to make it
clear which one you expect to be called.
By removing the ability to have multiple CellSets in a DataSet
we can simplify the following things:
- Cell Fields now don't require a CellSet name when being constructed
- Filters don't need to manage what the active cellset is
Now that the dispatcher does its own TryExecute, filters do not need to
do that. This change requires all worklets called by filters to be able
to execute without knowing the device a priori.
This commit removes `vtkm::filter::Result`. All methods that used
`vtkm::filter::Result` simply change to use `vtkm::cont::Dataset` instead.
The utility API on `Result` that was used to add fields to the resulting
dataset is now available via `vtkm::filter::internal::CreateResult`.
Sandia National Laboratories recently changed management from the
Sandia Corporation to the National Technology & Engineering Solutions
of Sandia, LLC (NTESS). The copyright statements need to be updated
accordingly.
The external faces filter and worklet now pass input
PolyData (0D, 1D, and 2D) cells to the output. The external
faces filter has a flag to control this output (PassPolyData).
Added tests to the external faces filter and worklet.
Added new Run method to External Faces worklet to support
uniform and rectilinear grids, taking advantage of the grids
regular strucuture to speed-up computation.
Changed External Faces filter to call the proper Run method
in the External Faces worklet based on cell set type.
Added tests for uniform and rectilinear grids to External Faces
filter unit test.
The ExternalFaces filter should work fine on a CellSetSingleType.
However, the filter was not operating on them because it a templated
method that is a placeholder for "this cell set type not supported" was
matching it. This simple change allows a CellSetSingleType to match the
template for a CellSetExplicit (which is the superclass).
Previously, ExternalFaces really only supported tetrahedral meshes that
have only triangular faces. These changes support all mixes of cells and
their faces.
The CellSetExplicit and CellSetSingleType classes have an ivar that
marks the number of points. There were several instances of code
creating cell sets without specifying the number of points. This can be
very bad if subsequent code needs that information.
Change the VTKM_CONT_EXPORT to VTKM_CONT. (Likewise for EXEC and
EXEC_CONT.) Remove the inline from these macros so that they can be
applied to everything, including implementations in a library.
Because inline is not declared in these modifies, you have to add the
keyword to functions and methods where the implementation is not inlined
in the class.
Certain algorithms like VertexClustering only work on certain cellset types.
It is pointless to generate the code paths for structured data cell sets,
when the algorithm can't operate on those dataset types.
VTK-m style guidelines dictate that all classes part of the API should
be in their own header file. Thus, we have moved the result classes out
of the filter header files and into their own headers.
We have also renamed these clases to ResultField and ResultDataSet to
better match the class naming conventions of VTK-m.
Since we are moving around these result classes, we have also revamped
their structure. They are now in a hierarchy with a common ResultBase
class. Additionally, all result classes have a reference to a complete
DataSet that can be considered the output of the filter. This will make
it easier for users to consistently deal with filter results.
These changes cover issues #60 and #62.
The base classes for all the filters are named with 'Filter' at the end.
Generally the convention in VTK-m is to place the most general
descriptor (in this case Filter) first, which makes it easier to find
items in ordered lists.
This commit resolves issue #59.