Commit Graph

76 Commits

Author SHA1 Message Date
Kenneth Moreland
1f07b0ecf6 Consolidate WarpScalar and WarpVector filter
In reflection, the `WarpScalar` filter is surprisingly a superset of the
`WarpVector` features. `WarpScalar` has the ability to displace in the
directions of the mesh normals. In VTK, there is a distinction of normals
to vectors, but in VTK-m it is a matter of selecting the correct one. As
such, it makes little sense to have two separate implementations for the
same operation. The filters have been combined and the interface names have
been generalized for general warping (e.g., "normal" or "vector" becomes
"direction").

In addition to consolidating the implementation, the `Warp` filter
implementation has been updated to use the modern features of VTK-m's
filter base classes. In particular, when the `Warp` filters were originally
implemented, the filter base classes did not support more than one active
scalar field, so filters like `Warp` had to manage multiple fields
themselves. The `FilterField` base class now allows specifying multiple,
indexed active fields, and the updated implementation uses this to manage
the input vectors and scalars.

The `Warp` filters have also been updated to directly support constant
vectors and scalars, which is common for `WarpScalar` and `WarpVector`,
respectively. Previously, to implement a constant field, you had to add a
field containing an `ArrayHandleConstant`. This is still supported, but an
easier method of just selecting constant vectors or scalars makes this
easier.

Internally, the implementation now uses tricks with extracting array
components to support many different array types (including
`ArrayHandleConstant`. This allows it to simultaneously interact with
coordinates, directions, and scalars without creating too many template
instances.
2023-09-26 07:20:09 -04:00
Louis Gombert
dcdda3065a Split flying edges and marching cells into separate filters
In order to compile the contour filter more efficiently, we split the contour filter into two separate translation units, corresponding to the new filters ContourFlyingEdges and ContourMarchingCells. The API for Contour filter is left totally unchanged, and tries to use flying edges if the dataset is structured and uniform.
All three contour filters inherit from the `AbstractContour` class, providing utility methods used in the implementations.
2023-05-04 15:20:20 +02:00
Kenneth Moreland
ff68e44d63 Make array component checking safer
One of the checks for `BenchmarkFilters` is to test the number of
components in field arrays. It did this by using a `CastAndCall` to get
the base `ArrayHandle` and check the type. This is unnecessarily
complicated and fragile in the case where the base array type cannot be
resolved by `CastAndCall`. Instead, just query the `UnknownArrayHandle`
for the number of components.
2023-03-21 14:11:15 -06:00
Kenneth Moreland
7742df7556 Split up the filters benchmark tests
This should help catch regressions that only affect a single filter. It
also allows us to set up a partitioned test that has many small blocks.
It also fixes an issue we were seeing on the dashboard where the
contour benchmark was apparently running out of resources.
2022-12-05 13:20:22 -07:00
Dave Pugmire
a4435a6b20 Change wavelet dim to 256 and numPart to 1. 2022-11-29 13:42:53 -05:00
Dave Pugmire
fecc703a01 Add header for vtkm::cont::PartitionedDataSet 2022-11-28 20:52:04 -05:00
Dave Pugmire
90586d36df Change default waveletdim back to 256. 2022-11-28 16:37:17 -05:00
Dave Pugmire
b7605689ac Add multiblock benchmarks for filters. 2022-11-28 16:35:28 -05:00
Kenneth Moreland
de2f2b59ba Deprecate old filter base classes and supporting classes 2022-09-27 06:52:44 -06:00
Mark Bolstad
6222baa758 Fix filter benchmark
After the rebase, the filter benchmark was in a weird half state with some of the old code, and some of the updated code.
2022-03-30 09:18:00 -06:00
Mark Bolstad
19f90b96e0 Replace static datasets with dynamically allocated versions.
The static datasets were wreaking havoc on order of destructors at exit and causing kokkos to throw an exception. This change dynamically allocates a dataset, copies the read/sourced data into it, and explicitly frees the data.
2022-03-30 09:18:00 -06:00
Kenneth Moreland
08e6826017 Remove deprecated use of old unscoped enums in FieldSelection 2022-03-18 13:16:55 -06:00
Kenneth Moreland
f8f41e0ef5 Update use of field association enumerations
The enumerations in `vtkm::cont::Field::Association` were renamed in the
previous commit. The old names still exist, but are deprecated. Change
the rest of the code to use the new names.
2022-03-17 11:02:37 -06:00
Li-Ta Lo
f09032aaaf migrate geometry refinement filters 2022-02-11 20:52:43 -07:00
Li-Ta Lo
455c204373 Migrate field_transform 2022-02-01 11:51:01 -07:00
Li-Ta Lo
8113d15ef7 Merge branch 'master' into field_conversion
# Conflicts:
#	benchmarking/BenchmarkFilters.cxx
#	vtkm/filter/CMakeLists.txt
#	vtkm/filter/testing/UnitTestSplitSharpEdgesFilter.cxx
2022-01-31 14:08:02 -07:00
Li-Ta Lo
cdc4c29c5f renamve vector_calculus -> vector_analysis 2022-01-31 08:58:38 -07:00
Li-Ta Lo
c60d9e64dd migrate SurfaceNormal, VectorMagnitude 2022-01-30 14:31:52 -07:00
Li-Ta Lo
59cc8cbaeb Migrate Gradient filter 2022-01-30 12:18:22 -07:00
Li-Ta Lo
f08a3185f8 Migrate FieldConversion filters 2022-01-29 13:12:01 -07:00
Li-Ta Lo
175f9010a5 Merge branch 'master' into new_contour 2022-01-26 13:43:46 -07:00
Li-Ta Lo
e8278094f9 migrate Mask
tidy up language and library usage

update benchmark
2022-01-20 15:14:37 -07:00
Li-Ta Lo
679f1b00e9 migrate GhostCellRemove and Threshold 2022-01-20 15:10:22 -07:00
Li-Ta Lo
fa0905e3e5 migrate clean_grid and extract_entity filters 2022-01-13 11:14:48 -07:00
Li-Ta Lo
1c9fe90806 update benchmark 2022-01-11 08:30:42 -07:00
Li-Ta Lo
3c700259a1 migrate Contour, ClipWithField and Slice 2022-01-10 20:39:43 -07:00
Li-Ta Lo
d159efde53 add namespace 2022-01-06 16:29:30 -07:00
Li-Ta Lo
f5bbc6fc83 migrate clean_grid and extract_entity filters 2022-01-06 14:52:27 -07:00
Kenneth Moreland
4650a1da96 Deprecate old methods from DynamicCellSet
The `DynamicCellSet` (and the related `DynamicCellSetBase`) are
deprecated and replaced with `UnknownCellSet` (and `UncertainCellSet`).
Thus, `UnknownCellSet` has some methods inherited from `DynamicCellSet`
but replaced with other functionality. These methods are now marked as
deprecated and their use is removed.
2022-01-05 08:18:17 -07:00
Vicente Adolfo Bolea Sanchez
46b0268825 CI: add ubuntu2004 with tbb 2020 build 2021-09-28 19:46:11 +00:00
Nickolas Davis
9baa7cd9fa Implement tbb runtime device configuration and update vtkm to use it 2021-09-20 10:24:23 -06:00
Nickolas Davis
1c4d6810aa implement openmp runtime device configuration and update code to use it 2021-09-15 14:22:59 -06:00
Kenneth Moreland
c17a5569f5 Do not try to use ArrayGetValue on arrays of non-basic types
This is no longer supported.
2021-08-11 07:56:32 -06:00
Kenneth Moreland
218429fd6b Make benchmarks work with most recent TBB 2021-06-15 10:48:48 -06:00
Kenneth Moreland
9d5d9e38a1 Remove testing headers from benchmarking
The code in `vtkm/cont/Testing.h` now requires a library, which is not
built if testing is not built. Thus, the benchmarking code was giving a
compile error if benchmarking was on but testing was off.

Change the benchmarking to not rely on anything in the Testing
framework. This means using classes in `vtkm/source` instead of
`MakeTestData`. Also avoid using the `TestValue` defined for the tests.
(In one case, we have a simple replacement.) Also had to fix a problem
with a header file not defining everything it needed to compile.
2021-06-10 09:41:26 -06:00
Kenneth Moreland
68f39b86a8 Deprecate VariantArrayHandle
`VaraintArrayHandle` has been replaced by `UnknownArrayHandle` and
`UncertainArrayHandle`. Officially make it deprecated and point users to
the new implementations.
2021-04-07 16:12:38 -06:00
Kenneth Moreland
e0e24090a4 Correct argument check for benchmark --file argument
The condition was completely backwards so no file could ever be loaded.
2020-12-21 15:56:45 -07:00
Vicente Adolfo Bolea Sanchez
1add731eff BenchmarkFilters: Add Unstructured bench for Contour 2020-10-21 19:12:51 -04:00
Vicente Adolfo Bolea Sanchez
b22823a547 Contour: Zero-init arrays in Flying Edges
- It fixes a lingering error triggered with BenchContour
- It reenables BenchContour

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-10-21 19:12:51 -04:00
Vicente Adolfo Bolea Sanchez
a290de5bcc BenchmarkFilters: adds unstructured Dataset for some filters
- It also remove termination on bench error
- It disables passing fields in Countour to skip an error.

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-10-07 18:46:36 -04:00
Kitware Robot
cf0cdcf7d1 clang-format: reformat the repository with clang-format-9 2020-08-24 14:01:08 -04:00
Kenneth Moreland
fbeea75f32 Print out all options to BenchmarkFilters
Previously, if you used the `--help` option, you would get VTK-m's
initialize options and Google benchmark's options, but you would not get
the special options for the algorithms in this benchmark. Now, all the
potential options should be printed when `--help` is added to the
command line.
2020-07-13 10:20:19 -06:00
Kenneth Moreland
56bec1dd7b Replace basic ArrayHandle implementation to use Buffers
This encapsulates a lot of the required memory management into the
Buffer object and related code.

Many now unneeded classes were deleted.
2020-06-25 14:02:26 -06:00
Kenneth Moreland
a20ec03d0b Disable proxies in filter benchmark
This is going to increase the compile time for the filter benchmark, but
the overall goal is to move this code into libraries. When that happens,
the benchmark will not have to compile any of the filter code and should
ultimately go much faster.
2020-05-18 13:03:14 -06:00
NAThompson
697369fc14 Remove deprecation warnings throughout the project. 2020-04-30 08:12:04 -04:00
Vicente Adolfo Bolea Sanchez
b05bd33d3c benchmarks: pass unparsed args to Google benchmark
- It also adds Google's benchmarch compare.py script
  - It is installed to the build directory.

- It add a wrapper script called compare-benchmarks.py which:
  - Let you run each of the benchmarks with different devices

- It adds a README.md explaining how to run the benchmarks

- BenchmarkDeviceAdapter input size range parametrized at compile time

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-04-21 10:52:31 -04:00
Kenneth Moreland
ad0a53af71 Convert execution preparation to use tokens
Marked the old versions of PrepareFor* that do not use tokens as
deprecated and moved all of the code to use the new versions that
require a token. This makes the scope of the execution object more
explicit so that it will be kept while in use and can potentially be
reclaimed afterward.
2020-02-25 09:39:19 -07:00
Allison Vacanti
539f6e5ad7 Port benchmarking framework to Google Benchmark. 2020-01-08 10:58:51 -05:00
Kenneth Moreland
d5fe4046c5 Remove instances of ListTag in favor of List 2019-12-06 21:32:36 -07:00
Kenneth Moreland
92db376236 Convert uses of ListTagBase to List 2019-12-06 15:37:46 -07:00