Commit Graph

432 Commits

Author SHA1 Message Date
Kenneth Moreland
78e06d5dcd Fix old cuda atomics
There are some overloads for atomic adds of floating point numbers for
older versions of cuda that do not include them directly. These were
misnamed and thus not properly overloading the generic implementation.
This caused compile errors with older versions of cuda.
2024-04-02 13:45:15 -04:00
Kenneth Moreland
f545feba8f Add changelog for documenting data license 2023-03-14 12:25:21 -06:00
Vicente Adolfo Bolea Sanchez
dd79a487a7 release: 2.0.0 release notes 2023-02-18 18:37:26 -05:00
Kenneth Moreland
5a141349a9 Fix the passing of fields in filters
While updating the user's guide, I noticed a couple of minor problems
with how filters map fields. First, if a filter was using
`CreateResultCoordinateSystem`, it did not respect the
`PassCoordinateSystems` flag. Second, if both an `initializer_list` and
a mode was given to `SetFieldsToPass`, the mode was captured
incorrectly. Both problems are corrected.
2023-02-13 14:06:43 -07:00
Sujin Philip
42c6959be3 Add Abort execution feature
Initial changes to add support for aborting execution.
2023-02-06 14:29:58 -05:00
Kenneth Moreland
c0e0032e1d Clarify field index ordering in Doxygen
The fields in a `DataSet` are indexed from `0` to `GetNumberOfFields() - 1`.
It is natural to assume that the fields will be indexed in the order that
they are added, but they are not. Rather, the indexing is arbitrary and can
change any time a field is added to the dataset.

To make this more clear, Doxygen documentation is added to the `DataSet`
methods to inform users to not make any assumptions about the order of
field indexing.
2023-01-10 10:42:49 -07:00
Vicente Adolfo Bolea Sanchez
918de30163 release: 2.0.0-rc1 release notes 2022-12-15 18:12:41 -05:00
Kenneth Moreland
99829cf617 Hide Particle class members
The member variables of the `vtkm::Particle` classes are now hidden. This
means that external code will not be directly able to access member
variables like `Pos`, `Time`, and `ID`. Instead, these need to be retrieved
and changed through accessor methods.

This follows standard C++ principles. It also helps us future-proof the
classes. It means that we can provide subclasses or alternate forms of
`Particle` that operate differently. It also makes it possible to change
interfaces while maintaining a deprecated interface.
2022-12-13 13:19:21 -05:00
Vicente Adolfo Bolea Sanchez
049d0cca8c cmake: namespace vtkm export targets 2022-12-09 18:46:56 -05:00
Kenneth Moreland
1f34e0eaa6 Add performance configuration options
Added a name option that allows the same benchmark executable to be used
in multiple benchmark tests. This allows the benchmarks to be separated.
Also added an option to pass customized arguments to the benchmark
executable to overwrite the default values.
2022-12-05 13:20:18 -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
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
Vicente Adolfo Bolea Sanchez
9e7523c903 Update ReleaseRoadmap; add instructions NewRelease 2022-11-28 18:29:20 -05:00
Kenneth Moreland
2ddaa36858 Merge topic 'tube-cell-fields'
2bcc9aa70 Fix handling of cell fields in Tube filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2911
2022-11-21 16:43:03 -05:00
Kenneth Moreland
3e1339f9a7 Remove deprecated features from VTK-m
With the major revision 2.0 of VTK-m, many items previously marked as
deprecated were removed. If updating to a new version of VTK-m, it is
recommended to first update to VTK-m 1.9, which will include the deprecated
features but provide warnings (with the right compiler) that will point to
the replacement code. Once the deprecations have been fixed, updating to
2.0 should be smoother.
2022-11-17 07:12:31 -06:00
Kenneth Moreland
2d30e6d45a Coordinate systems are stored as Fields
Previously, `DataSet` managed `CoordinateSystem`s separately from `Field`s.
However, a `CoordinateSystem` is really just a `Field` with some special
attributes. Thus, coordiante systems are now just listed along with the
rest of the fields, and the coordinate systems are simply strings that
point back to the appropriate field. (This was actually the original
concept for `DataSet`, but the coordinate systems were separated from
fields for some now obsolete reasons.)
2022-11-11 06:17:58 -07:00
Kenneth Moreland
dbc2364e35 Merge topic 'ghost-cell-api'
a58c2cdac Change how cell ghost levels are set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2924
2022-11-11 08:00:29 -05:00
Kenneth Moreland
44a976f905 Merge topic 'zfp-output-fields'
478f765db Attach compressed ZFP data as WholeDatSet field

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2910
2022-11-10 12:41:55 -05:00
Kenneth Moreland
bd0a59a3fd Merge topic 'fix-log-scope'
74ed1c4cd Fix VTKM_LOG_SCOPE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2923
2022-11-10 12:18:41 -05:00
Kenneth Moreland
478f765db2 Attach compressed ZFP data as WholeDatSet field
Previously, point fields compressed by ZFP were attached as point fields
on the output. However, using them as a point field would cause
problems. So, instead attache them as `WholeDataSet` fields.

Also fixed a problem where the 1D decompressor created an output of the
wrong size.
2022-11-10 08:18:11 -07:00
Kenneth Moreland
74ed1c4cd0 Fix VTKM_LOG_SCOPE
The `VTKM_LOG_SCOPE` macro was not working as intended. It was supposed
to print a log message immediately and then print a second log message
when leaving the scope along with the number of seconds that elapsed
between the two messages.

This was not what was happening. The second log message was being
printed immediately after the first. This is because the scope was taken
inside of the `LogScope` method. The macro has been rewritten to put the
tracking in the right scope.
2022-11-10 07:12:19 -07:00
Kenneth Moreland
a58c2cdacf Change how cell ghost levels are set
The name of the methods were changed from `AddGhostCellField` to
`SetGhostCellField` since only one field can be marked as the cell
ghost. Also automatically select a field that matches
`GetGlobalCellFieldName` if nothing else is set.
2022-11-09 08:40:37 -07:00
Kenneth Moreland
f3fa4f127a Allow FieldSelection to simultaneously include and exclude fields
The basic use of `FieldSelection` is to construct the class with a mode
(`None`, `Any`, `Select`, `Exclude`), and then specify particular fields
based off of this mode. This works fine for basic uses where the same code
that constructs a `FieldSelection` sets all the fields.

But what happens, for example, if you have code that takes an existing
`FieldSelection` and wants to exclude the field named `foo`? If the
`FieldSelection` mode happens to be anything other than `Exclude`, the code
would have to go through several hoops to construct a new `FieldSelection`
object with this modified selection.

To make this case easier, `FieldSelection` now has the ability to specify
the mode independently for each field. The `AddField` method now has an
optional mode argument the specifies whether the mode for that field should
be `Select` or `Exclude`.

In the example above, the code can simply add the `foo` field with the
`Exclude` mode. Regardless of whatever state the `FieldSelection` was in
before, it will now report the `foo` field as not selected.
2022-11-03 12:57:59 -06:00
Kenneth Moreland
6db2a8ea37 Merge topic 'cont-portal-token'
54f0ef2a8 Support providing a Token to ReadPortal and WritePortal

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2916
2022-11-02 13:06:59 -04:00
Kenneth Moreland
e57d511823 Merge topic 'field-length-checking'
63702d5d1 Check to make sure that the fields in a DataSet are the proper length

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2914
2022-11-02 08:54:04 -04:00
Kenneth Moreland
de7fd6cd61 Merge topic 'particle-density-output-field'
74a8d688e Correct particle density filter output field

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2913
2022-11-02 08:45:21 -04:00
Kenneth Moreland
63702d5d13 Check to make sure that the fields in a DataSet are the proper length
It is possible in a `DataSet` to add a point field (or coordinate system)
that has a different number of points than reported in the cell set.
Likewise for the number of cells in cell fields. This is very bad practice
because it is likely to lead to crashes in worklets that are expecting
arrays of an appropriate length.

Although `DataSet` will still allow this, a warning will be added to the
VTK-m logging to alert users of the inconsistency introduced into the
`DataSet`. Since warnings are by default printed to standard error, users
are likely to see it.
2022-11-01 12:05:59 -06:00
Kenneth Moreland
27b27bde8e Merge topic 'expose-variant'
c029ac113 Expose the Variant helper class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2907
2022-11-01 13:50:32 -04:00
Kenneth Moreland
74a8d688e5 Correct particle density filter output field
The field being created by `ParticleDensityNearestGridPoint` was supposed
to be associated with cells, but it was sized to the number of points.
Although the number of points will always be more than the number of cells
(so the array will be big enough), having inappropriately sized arrays can
cause further problems downstream.
2022-11-01 11:45:01 -06:00
Kenneth Moreland
54f0ef2a88 Support providing a Token to ReadPortal and WritePortal
When managing portals in the execution environment, `ArrayHandle` uses the
`Token` object to ensure that the memory associated with a portal exists
for the length of time that it is needed. This is done by creating the
portal with a `Token` object, and the associated portal objects are
guaranteed to be valid while that `Token` object exists. This is supported
by essentially locking the array from further changes.

`Token` objects are typically used when creating a control-side portal with
the `ReadPortal` or `WritePortal`. This is not to say that a `Token` would
not be useful; a control-side portal going out of scope is definitely a
problem. But the creation and distruction of portals in the control
environment is generally too much work for the possible benefits.

However, under certain circumstances it could be useful to use a `Token` to
get a control-side portal. For example, if the `PrepareForExecution` method
of an `ExecutionObjectBase` needs to fill a small `ArrayHandle` on the
control side to pass to the execution side, it would be better to use the
provided `Token` object when doing so. This change allows you to optionally
provide that `Token` when creating these control-side portals.
2022-11-01 09:29:17 -06:00
Kenneth Moreland
81f1982afa Merge topic 'read-permuted-global-cell-ids'
d81cbc6e3 Fix reading global ids of permuted cells

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !2909
2022-11-01 10:20:33 -04:00
Kenneth Moreland
c029ac113d Expose the Variant helper class
For several versions, VTK-m has had a `Variant` templated class. This acts
like a templated union where the object will store one of a list of types
specified as the template arguments. (There are actually 2 versions for the
control and execution environments, respectively.)

Because this is a complex class that required several iterations to work
through performance and compiler issues, `Variant` was placed in the
`internal` namespace to avoid complications with backward compatibility.
However, the class has been stable for a while, so let us expose this
helpful tool for wider use.
2022-11-01 07:52:41 -06:00
Roxana Bujack
0fa9c8d954 Merge topic 'partitionedCellLocator'
25f2ebf02 add partitioned cell locator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2893
2022-11-01 08:33:28 -04:00
roxana bujack
25f2ebf026 add partitioned cell locator 2022-11-01 11:08:18 +01:00
Kenneth Moreland
2bcc9aa708 Fix handling of cell fields in Tube filter
The `Tube` filter wraps a tube of polygons around poly line cells.
During this process it had a strange (and wrong) handling of cell data.
It assumed that each line had an independent field entry for each
segment of each line. It thus had lots of extra code to find the length
and offsets of the segment data in the cell data.

This is simply not how cell fields work in VTK-m. In VTK-m, each cell
has exactly one entry in the cell field array. Even if a polyline has
100 segments, it only gets one cell field value. This behavior is
consistent with how VTK treats cell field arrays.

The behavior the `Tube` filter was trying to implement was closer to an
"edge" field. However, edge fields are currently not supported in VTK-m.
The proper implementation would be to add edge fields to VTK-m. (This
would also get around some problems with the implementation that was
removed here when mixing polylines with other cell types and degenerate
lines.)
2022-10-31 16:20:03 -06:00
Kenneth Moreland
d81cbc6e37 Fix reading global ids of permuted cells
The legacy VTK reader sometimes has to permute cell data because some
VTK cells are not directly supported in VTK-m. (For example, triangle
strips are not supported. They have to be converted to triangles.)

The global and petigree identifiers were not properly getting permuted.
This is now fixed.
2022-10-31 16:07:47 -06:00
Kenneth Moreland
ef3c4c65c9 Merge topic 'no-execution-whole-array'
294581375 Removed ExecutionWholeArray class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2905
2022-10-31 14:41:54 -04:00
Kenneth Moreland
f4b972afaa Merge topic 'no-deprecated-virtual'
ea560e948 Remove deprecated virtual methods

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2903
2022-10-31 14:38:32 -04:00
Kenneth Moreland
ea560e9486 Remove deprecated virtual methods
Several revisions ago, the ability to use virtual methods in the
execution environment was deprecated. Completely remove this
functionality for the VTK-m 2.0 release.
2022-10-28 10:56:52 -06: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
73cb38d860 Output complete list of libraries for external Makefiles
There is a Makefile include, `vtkm_config.mk`, and a package include,
`vtkm.pc`, that are configured so that external programs that do not use
CMake have a way of importing VTK-m's configuration. However, the set of
libraries was hardcoded. In particular, many of the new filter libraries
were missing.

Rather than try to maintain this list manually, use the module mechanism
in the CMake configuration to get a list of libraries built and
automatically build these lists.
2022-10-27 06:14:49 -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
Vicente Bolea
83be049708 Merge topic 'update-to-1.9.0'
6aa17299d release: 1.9.0 release notes
1af6b210b release: update version and License

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2885
2022-10-11 16:30:21 -04:00
Vicente Adolfo Bolea Sanchez
51edb8c741 NewRelease: update to reflect latest release workflow 2022-10-11 15:41:24 -04:00
Vicente Adolfo Bolea Sanchez
6aa17299d1 release: 1.9.0 release notes 2022-10-11 15:06:56 -04:00
Vicente Bolea
169e788e2d Merge topic 'add-final-release-notes'
6dfd4767f NewRelease: include extra steps

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2878
2022-10-10 12:05:37 -04:00
Kenneth Moreland
53420f2b36 Merge topic 'mpi-init'
90c7e7707 Initialize DIY in vtkm::cont::Initialize

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2880
2022-10-09 12:59:10 -04:00
Vicente Adolfo Bolea Sanchez
6dfd4767f1 NewRelease: include extra steps
- add final release prerequisites
- add final release-specific branch task
2022-10-08 19:32:48 -04:00
Vicente Adolfo Bolea Sanchez
7e99e256bb perftest: add perf regression test 2022-10-07 17:42:12 -04:00