Commit Graph

26 Commits

Author SHA1 Message Date
Robert Maynard
d1d61b9ebc vtkm::filter::Filter passes filter policies by value
It now follows the same pattern that all filter implementations use
2019-09-17 13:50:58 -04:00
Allison Vacanti
e8afcfd7d8 Merge topic '405_partitioned_ds'
63050f68f `MultiBlock` renamed to `PartitionedDataSet`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !1821
2019-09-04 07:22:07 -04:00
Allison Vacanti
63050f68fc MultiBlock renamed to PartitionedDataSet
The `MultiBlock` class has been renamed to `PartitionedDataSet`, and its API
has been refactored to refer to "partitions", rather than "blocks".
Additionally, the `AddBlocks` method has been changed to `AppendPartitions` to
more accurately reflect the operation performed. The associated
`AssignerMultiBlock` class has also been renamed to
`AssignerPartitionedDataSet`.

This change is motivated towards unifying VTK-m's data model with VTK. VTK has
started to move away from `vtkMultiBlockDataSet`, which is a hierarchical tree
of nested datasets, to `vtkPartitionedDataSet`, which is always a flat vector
of datasets used to assist geometry distribution in multi-process environments.
This simplifies traversal during processing and clarifies the intent of the
container: The component datasets are partitions for distribution, not
organizational groupings (e.g. materials).

Ref #405
2019-09-03 12:42:23 -04:00
Robert Maynard
89fa2c0293 Remove multiple vtkm::cont::CellSet from vtkm::cont::DataSet
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
2019-09-02 09:04:51 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
9c9c4d2ad9 remove unneeded includes in the vtkm/filter 2019-03-29 17:21:26 -04:00
Haocheng LIU
5c797169ec Use the strong typed enums for vtkm::cont::Field
Since Field association is used either when creating or working
with 'vtkm::cont::Field', it's put in the class itself.
2018-05-22 11:44:51 -04:00
Utkarsh Ayachit
0af0271f59 Filter API enhancements.
This revamps Filter API to improve support for multiblock dataset and
distributed use-cases. Filters now operate on MultiBlock alone thus
`Filter::Execute(MultiBlock&)` is the primary method.
`Filter::Execute(DataSet*)` is only provided as an convenience that
internally puts the dataset into a MultiBlock and calls the primary
method.

Subclasses can provides PreExecute and PostExecute overrides to handle
init/reduction operations for filters with operating on multiple blocks.
Since blocks can be distributed, filters are expected to handle that as
well.

Subclasses can provide `PrepareForExecution(MultiBlock*..)` to customize
behavior for handling multiblock inputs. Default is to simply loop
over blocks.
2018-04-12 16:40:19 -04:00
Utkarsh Ayachit
3da8b5be66 Remove vtkm::filter::Result
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`.
2018-04-03 16:55:03 -04:00
Utkarsh Ayachit
eda68a6fec Make MapFieldOntoOutput private API.
MapFieldOntoOutput is no longer public API. Since `vtkm::cont::Filter`
invokes it when appropriate, we no longer need to keep it public.

Also removes the overload of MapFieldOntoOutput that doesn't take
policy. That is no longer needed since vtkm::cont::Filter always can
provide the current policy being used.
2018-04-02 09:30:58 -04:00
Utkarsh Ayachit
dc474eb475 fix Derived type propagation in filter inheritance.
Filter subclasses were not passing the true derived type up the
hierarchy. Fixed that.
2018-04-02 09:30:57 -04:00
Utkarsh Ayachit
de4e840eae enhance filter API
Filters now support executing on a dataset to produce a result dataset
with automatic mapping of fields to the output dataset. Fields to map
can be selected using `vtkm::filter::FieldSelection` class, which provides
constructors to map all or no fields, along with a selection of fields.

This updates all tests to use the new filter API.
2018-03-07 13:42:23 -05:00
Kenneth Moreland
c3a3184d51 Update copyright for Sandia
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.
2017-09-20 15:33:44 -06:00
Kenneth Moreland
0dd1e7ae69 Make Get/SetActiveCellSetIndex method names match in filter
The filter classes have an internal CellSetIndex member that tracks on
which cell set to operate on. The get accessor is called
GetActiveCellSetIndex (note the descriptive "Index" at the end of the
function name). However, the set accessor was called SetActiveCellSet
(sans "Index"). This discrepancy does not make a lot of sense.

This commit changes SetActiveCellSet to SetActiveCellSetIndex. Not only
do I like the extra descriptor (in case we later want to set cells by
name), it is also used much less than the get method so is less
disruptive.
2017-09-12 10:49:57 -06:00
dongliangchu
a0cdad52e5 reviewed version 1 2017-08-30 10:30:29 -04:00
dongliangchu
424b37ec97 reviewed version 1 2017-08-18 16:28:33 -04:00
Allison Vacanti
565896cc49 Combine ResultField + ResultDataSet into Result. 2017-08-11 08:25:42 -04:00
Robert Maynard
5dd346007b Respect VTK-m convention of parameters all or nothing on a line
clang-format BinPack settings have been disabled to make sure that the
VTK-m style guideline is obeyed.
2017-05-26 13:53:28 -04:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
Kitware Robot
efbde1d54b clang-format: sort include directives 2017-05-18 12:59:33 -04:00
Kenneth Moreland
18c4190d85 Update classes using RuntimeDeviceTracker
They now grab the global runtime device tracker. In some cases, I've
added the ability to set/get the tracker to change it from the global.
In others I just removed the local copy, since it was just hooked into
the global tracker.
2017-02-23 09:54:41 -07:00
Kenneth Moreland
b9d3206ea6 Move RuntimeDeviceTracker to vtkm::cont
Before it was in the vtkm::cont::internal namespace. However, we expect
to be using this feature quite a bit more as we want VTK-m to handle
multiple devices effectively (as in, just figure it out and go).
2017-02-22 13:33:52 -07:00
Kenneth Moreland
fdaccc22db Remove exports for header-only functions/methods
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.
2016-11-15 22:22:13 -07:00
Kenneth Moreland
e488967c8f Use general TryExecute for filter execution
The TryExecute function was based off of the ResolveFieldTypeAnd*
classes made for filters. To reduce the amount of code duplication,
modify these two filter classes to use the more general TryExecute
functionality.
2016-08-17 14:13:51 -06:00
Kenneth Moreland
f4362a4902 Give result classes their own header file.
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.
2016-05-05 15:07:55 -06:00
Kenneth Moreland
e8d3eda84d Rename filter base classes to follow VTK-m naming convention
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.
2016-05-05 12:43:28 -06:00