Commit Graph

58 Commits

Author SHA1 Message Date
Ben Boeckel
b99920d47b Oscillator: use a type of the right size for oIdx 2023-12-01 07:01:11 -05:00
Kenneth Moreland
3e7cde8ecb Change auto seed behavior in PerlinNoise source
The PerlinNoise source has a mode where if a seed is not set, it will
choose a new seed every time it is executed. It did this by using the
value 0 as an indicator to do this (and initializing the Seed to 0).
However, there was a problem with one of the benchmarks that was
specifically setting the seed to 0 and getting unexpected results.

Fix the problem by adding a separate, hidden member of the PerlinNoise
class that keeps track of whether to generate new seeds or not.
2022-12-06 12:21:04 -07:00
Kenneth Moreland
22e2e5ff32 Merge topic 'source-point-dims'
aa7b83bb2 Handle random seed generation better for PerlinNoise
84bc72312 Make source parameters more clear

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2933
2022-12-04 09:27:21 -05:00
Kenneth Moreland
405643ddbb Rename NewFilter base classes to Filter
During the VTK-m 1.8 and 1.9 development, the filter infrastructure was
overhauled. Part of this created a completely new set of base classes. To
avoid confusion with the original filter base classes and ease transition,
the new filter base classes were named `NewFilter*`. Eventually after all
filters were transitioned, the old filter base classes were deprecated.

With the release of VTK-m 2.0, the old filter base classes are removed. The
"new" filter base classes are no longer new. Thus, they have been renamed
simply `Filter` (and `FilterField`).
2022-12-01 13:07:56 -07:00
Kenneth Moreland
aa7b83bb2c Handle random seed generation better for PerlinNoise
Before, the result of `time` was used for the RNG. This change uses
`std::random_device` for a better seed when possible.
2022-12-01 08:53:54 -07:00
Kenneth Moreland
84bc723121 Make source parameters more clear
Originally, most of the sources used constructor parameters to set the
various options of the source. Although convenient, it was difficult to
keep track of what each parameter meant. To make the code more clear,
source parameters are now set with accessor functions (e.g.
`SetPointDimensions`). Although this makes code more verbose, it helps
prevent mistakes and makes the changes more resilient to future changes.
2022-12-01 08:13:58 -07:00
Kenneth Moreland
2945813755 Removed ExecutionWholeArray class
`ExecutionWholeArray` is an archaic class in VTK-m that is a thin wrapper
around an array portal. In the early days of VTK-m, this class was used to
transfer whole arrays to the execution environment. However, now the
supported method is to use `WholeArray*` tags in the `ControlSignature` of
a worklet.

Nevertheless, the `WholeArray*` tags caused the array portal transferred to
the worklet to be wrapped inside of an `ExecutionWholeArray` class. This
is unnecessary and can cause confusion about the types of data being used.

Most code is unaffected by this change. Some code that had to work around
the issue of the portal wrapped in another class used the `GetPortal`
method which is no longer needed (for obvious reasons). One extra feature
that `ExecutionWholeArray` had was that it provided an subscript operator
(somewhat incorrectly). Thus, any use of '[..]' to index the array portal
have to be changed to use the `Get` method.
2022-10-27 15:07:41 -06:00
Kenneth Moreland
ad1e7b5bdb Add module mechanism
This mechanism sets up CMake variables that allow a user to select which
modules/libraries to create. Dependencies will be tracked down to ensure
that all of a module's dependencies are also enabled.

The modules are also arranged into groups.
Groups allow you to set the enable flag for a group of modules at once.
Thus, if you have several modules that are likely to be used together,
you can create a group for them.

This can be handy in converting user-friendly CMake options (such as
`VTKm_ENABLE_RENDERING`) to the modules that enable that by pointing to
the appropriate group.
2022-10-26 12:51:05 -06:00
Li-Ta Lo
1ef6348f4d Merge branch 'source_execute' of https://gitlab.kitware.com/ollielo/vtk-m into source_execute 2022-08-18 08:40:56 -06:00
Li-Ta Lo
3d07503af1 use NewFilterField 2022-08-18 08:35:30 -06:00
Li-Ta Lo
a9d569f79c NIV Source::Execute 2022-08-18 08:13:57 -06:00
Li-Ta Lo
99d17b30a0 migrate AmrArray filter 2022-05-20 15:07:34 -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
05d34aa8a4 delete unneeded list append 2022-02-10 06:40:43 -07:00
Li-Ta Lo
d41e1e40f0 remove ALL_BACKENDS 2022-02-09 16:15:08 -07:00
Li-Ta Lo
f08a3185f8 Migrate FieldConversion filters 2022-01-29 13:12:01 -07:00
Li-Ta Lo
83c6032c94 minor update 2022-01-27 13:44:01 -07:00
Kenneth Moreland
c92f9cf15e Add test for PerlinNoise source 2022-01-05 13:02:36 -07:00
Kenneth Moreland
a200592f4f Fix type conversions in PerlinNoise source
The `Permutations` array was created using floating point numbers. But
integers were put into it and then used when taken out of it. Simplified
everything by simply making the value type of `Permutations` as
`vtkm::Id`.
2021-12-16 09:46:01 -07:00
Kenneth Moreland
8f67054504 Allow automatic seed for perlin noise 2021-12-16 09:46:01 -07:00
Roxana Bujack
557055b9cc Merge topic 'amrFilter'
11d770659 add worklet include
7139a1c8c add amr capability as filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2646
2021-12-14 15:57:19 -05:00
Roxana Bujack
7139a1c8c4 add amr capability as filter 2021-12-13 09:33:47 -07:00
Manish Mathai
2ab1594ad1 Fix typo 2021-12-06 15:01:19 -08:00
Manish Mathai
a2c3c80ce0 Make perlin generation as a vtkm::source::Source source
Making it a `vtkm::source::Source` makes it easier to use in other
benchmarks or tests.
2021-12-06 13:09:03 -08:00
Li-Ta Lo
1d2c4c2906 fixed single/double precision converstion 2021-10-14 09:15:13 -06:00
Li-Ta Lo
5448ffb28b decouple Timer.h from device compiler 2021-10-13 12:11:23 -06:00
Li-Ta Lo
e90b186ba8 do not use device compiler to compile source unit tests 2021-10-13 11:56:02 -06:00
Li-Ta Lo
54772fb60c change as suggested by code review 2021-10-12 16:22:31 -06:00
Li-Ta Lo
f8d23dc432 unique_ptr<>::release does not delete, unqie_ptr<>::reset() does 2021-10-12 14:42:33 -06:00
Li-Ta Lo
e392109a1a add unit test for Oscillator, fix bug in point v.s. cell dims 2021-10-12 14:04:40 -06:00
Li-Ta Lo
c212946dbf move OscillatorSource out of Oscillator 2021-10-12 13:24:55 -06:00
Li-Ta Lo
29e459062c move OscillatorSource worklet to be within Oscillator.cxx 2021-10-12 13:11:47 -06:00
Li-Ta Lo
6ffb75c5a5 use pimpl pattern for osc worklet 2021-10-12 12:17:58 -06:00
Kenneth Moreland
03a4750a3f Change Oscillator output field name to oscillating 2021-10-05 08:20:27 -06:00
Kenneth Moreland
a3462b41ce Change Wavelet output field name to RTData
This matches the output field name in VTK and ParaView for the
equivalent source. This change allows this source to be used as a drop-
in replacement for the VTK source (which could be very useful).
2021-10-04 13:44:27 -06:00
Kenneth Moreland
ea1a55359f Name tangle source fields appropriately
The `Tangle` source would create a point field generically named
`nodevar`. This name was not indicitive of the data or its source. Thus,
the output point field has been renamed `tangle`.

The `Tangle` source was also creating a cell field (named `cellvar`).
This field was really just a mirror of the cell indices (counting from 0
on up). This field has been removed from the input. If you want such a
field, you can now use the `GenerateIds` filter to add it to any data
set.
2021-10-04 13:44:27 -06:00
Ben Boeckel
4c7fe13a98 cmake: avoid adding testing directories if testing is disabled
Some testing directories have side effects such as installing headers or
compiling code that ultimately doesn't end up getting used.
2021-06-01 18:40:40 -04:00
Nick Thompson
33993db2df Reduce runtime of unit tests. 2021-04-12 18:51:51 -04:00
Kenneth Moreland
8b133288ce Fix deprecation warnings
There was an error that caused deprecation warnings in VTK-m to be
suppressed, which meant that many uses of deprecated features went
unnoticed. This fixes those deprecation warnings.

The majority of the warnings were caused by the use of the deprecated
`Cast`, `CopyTo`, and `ResetTypes` methods of `UnknownArrayHandle` (or
`VariantArrayHandle`). Both `Cast` and `CopyTo` have been subsumed by
`AsArrayHandle` (to make the functionality more clear). `ResetTypes` now
requires a second template argument to define the storage types to try.

Also fixed some issues with `SerializableField` being deprecated.
This class is no longer necessary because `Field` can now be directly
serialized.
2021-01-26 07:56:39 -07:00
Li-Ta Lo
f333182476 Reverse Invoker, Dispatcher and Worklet dependency 2020-07-21 17:25:43 -06:00
Kenneth Moreland
ec34cb56c4 Use new ways to get array portal in control environment
Also fix deadlocks that occur when portals are not destroyed
in time.
2020-02-26 13:10:46 -07:00
Robert Maynard
3ef234ef13 Move Oscillator to the sources directory 2019-09-16 12:36:01 -04:00
Robert Maynard
5c69f1bae9 Update Wavelet to use WorkletVisitPointsWithCells
The Wavelet worklet doesn't need a custom scheduler but
can use WorkletVisitPointsWithCells
2019-09-13 16:11:14 -04:00
Robert Maynard
62357dea0f Tangle source has better runtime performance
By leveraging WorkletVisitPointsWithCells we can get already
pre-computed i,j,k locations helping with performance

In addition we have made the algorithm easier to read by
leveraging VTK-m Vec types.
2019-09-13 16:11:14 -04:00
Robert Maynard
eb3d866548 Add a test explicitly for vtkm::source::Tangle 2019-09-13 16:11:14 -04:00
Robert Maynard
63f2438098 Add vtkm::source::Wavelet as a new source
The Wavelet source creates a dataset similar to VTK's vtkRTAnalyticSource.
2019-09-13 16:11:14 -04:00
Robert Maynard
257dc1f84e Sources have a more consistent API and internal style.
`vtkm::source::Source` now uses virtual inheritance for
the `Execute` method. This will allow us to enforce that
all vtkm::source have a consistent calling convention.

To make the code inside filters and sources more similar the
base `vtkm::source::Source` class has a `vtkm::cont::Invoker`
as a member variable. This will allow sources to use the
`this->Invoke()` pattern that filters use to launch worklets.
2019-09-13 10:22:25 -04:00
Robert Maynard
2d455bbef8 Document what the Tangle source will generate 2019-09-13 08:12:22 -04:00
Li-Ta Lo
05b6792500 Merge branch 'master' into tangle_source 2019-09-11 12:06:58 -06:00