Commit Graph

517 Commits

Author SHA1 Message Date
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
Kenneth Moreland
90c7e77075 Initialize DIY in vtkm::cont::Initialize
This has the side effect of initialing MPI_Init (and will also
call MPI_Finalize at program exit). However, if the calling
code has already called MPI_Init, then nothing will happen.
Thus, if the calling code wants to manage MPI_Init/Finalize,
it can do so as long as it does before it initializes VTK-m.
2022-10-07 14:54:33 -06:00
Kenneth Moreland
73dcbac213 Merge topic 'contour-bug' into release-1.9
aaf49915e Fix Flying Edges z-boundary condition with non-square input

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Zhe Wang <godenwangzhe@gmail.com>
Merge-request: !2875
2022-09-29 13:37:12 -04:00
Kenneth Moreland
71a1bea1ae Merge topic 'contour-bug'
aaf49915e Fix Flying Edges z-boundary condition with non-square input

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Zhe Wang <godenwangzhe@gmail.com>
Merge-request: !2875
2022-09-29 13:37:12 -04:00
Kenneth Moreland
aaf49915e0 Fix Flying Edges z-boundary condition with non-square input
There was a bug with Flying Edges checking the boundary conditions in
the z-direction. It was comparing the z index to the size of the y
dimension, not the z dimension. This simple typo was probably missed
because most of the tests use square meshes. To catch the problem, you
need a mesh that has a different number of points in the y and z
directions and the contour has to go past the positive z boundary.

When this error was hit, the indices for the edges on that boundary were
not recorded, and later interpolation used garbage values for edge's
point ids.
2022-09-29 06:25:12 -06:00
Vicente Adolfo Bolea Sanchez
165d6d936f newrelease.md: templatize newrelease.md
- Uses pyexpander as engine since we already depend on it.
- Add rules for dealing with VTK releases.
- Updates docs/ReleaseProcess.md .
2022-09-28 18:02:37 -04:00
Vicente Adolfo Bolea Sanchez
abba9247ac release: 1.9.0-rc1 release notes 2022-09-27 16:02:37 -04:00
Kenneth Moreland
de2f2b59ba Deprecate old filter base classes and supporting classes 2022-09-27 06:52:44 -06:00
Kenneth Moreland
dbe8db01ad Add Variant::IsType
The `Variant` class was missing a way to check the type. You could do it
indirectly using `variant.GetIndex() == variant.GetIndexOf<T>()`, but
having this convenience function is more clear.
2022-08-05 13:02:48 -06:00
Kenneth Moreland
c7053f584c Merge topic 'deallocate-after-finalize'
9855db096 Add test for array and datas that are cleaned up after finalize

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !2801
2022-07-12 14:33:30 -04:00
Kenneth Moreland
5659d74bd4 Merge topic 'resizable-arrayhandle-buffer-vec'
05f144eb1 Allow ArrayHandle to have a runtime selectable number of buffers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2798
2022-07-12 12:04:24 -04:00
Vicente Bolea
d672851dca Merge topic 'add-release-roadmap'
01619f75f doc: add release roadmap

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2785
2022-07-11 14:55:19 -04:00
Kenneth Moreland
05f144eb19 Allow ArrayHandle to have a runtime selectable number of buffers
Previously, the number of buffers held by an `ArrayHandle` had to be
determined statically at compile time by the storage. Most of the time
this is fine. However, there are some exceptions where the number of
buffers need to be selected at runtime. For example, the
`ArrayHandleRecombineVec` does not specify the number of components it
uses, and it needed a hack where it stored buffers in the metadata of
another buffer, which is bad.

This change allows the number of buffers to vary at runtime (at least at
construction). The buffers were already managed in a `std::vector`. It
now no longer forces the vector to be a specific size.
`GetNumberOfBuffers` was removed from the `Storage`. Instead, if the
number of buffers was not specified at construction, an allocation of
size 0 is done to create default buffers.

The biggest change is to the interface of the storage object methods,
which now take `std::vector` instead of pointers to `Buffer` objects.
This adds a little hastle in having to copy subsets of this `vector`
when a storage object has multiple sub-arrays. But it does simplify some
of the templating.
2022-07-11 07:48:25 -06:00
Kenneth Moreland
163d591795 Add DEVICE_SOURCES to vtkm_unit_tests
The `vtkm_unit_tests` function in the CMake build now allows you to specify
which files need to be compiled with a device compiler using the
`DEVICE_SOURCES` argument. Previously, the only way to specify that unit
tests needed to be compiled with a device compiler was to use the
`ALL_BACKENDS` argument, which would automatically compile everything with
the device compiler as well as test the code on all backends.
`ALL_BACKENDS` is still supported, but it no longer changes the sources to
be compiled with the device compiler.
2022-07-08 06:28:51 -06:00
Kenneth Moreland
b2ce30e690 Fix bug with voxels in legacy vtk files
The legacy VTK file reader for unstructured grids had a bug when reading
cells of type voxel. VTK-m does not support the voxel cell type in
unstructured grids (i.e. explicit cell sets), so it has to convert them to
hexahedron cells. A bug in the reader was mangling the cell array index
during this conversion.
2022-07-06 09:37:29 -06:00
Kenneth Moreland
9855db0961 Add test for array and datas that are cleaned up after finalize
It is the case that arrays might be deallocated from a device after the
device is closed. This can happen, for example, when an `ArrayHandle` is
declared globally. It gets constructed before VTK-m is initialized. This
is OK as long as you do not otherwise use it until VTK-m is initialized.
However, if you use that `ArrayHandle` to move data to a device and that
data is left on the device when the object closes, then the
`ArrayHandle` will be left holding a reference to invalid device memory
once the device is shut down. This can cause problems when the
`ArrayHandle` destructs itself and attempts to release this memory.

The VTK-m devices should gracefully handle deallocations that happen
after device shutdown.
2022-07-01 12:36:55 -06:00
Kenneth Moreland
5488a08987 Merge topic 'copy-invalid-variant'
5e476d703 Enable copying invalid variants

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2794
2022-06-30 10:43:41 -04:00
Kenneth Moreland
e312c54356 Fix type comparison on OSX
`UnknownArrayHandle` compares `std::type_index` objects to check whether a
requested type is the same as that held in the array handle. However, it is
possible that different translation units can create different but
equivalent `std::type_info`/`std::type_index` objects. In this case, the
`==` operator might return false for two equivalent types. This can happen
on OSX.

To get around this problem, `UnknownArrayHandle` now does a more extensive
check for `std::type_info` object. It first uses the `==` operator to
compare them (as before), which usually works but can possibly return
`false` when the correct result is `true`. To check for this case, it then
compares the name for the two types and returns `true` iff the two names
are the same.
2022-06-30 07:37:27 -06:00
Kenneth Moreland
5e476d7030 Enable copying invalid variants
There was a bug where if you attempted to copy a variant that was not
valid (i.e. did not hold an object), a seg fault could happen. This has
been changed to set the target variant to also be invalid.
2022-06-30 06:24:03 -06:00
Kenneth Moreland
6e5ad1a324 Add changelog for splitting MeshQuality filter 2022-06-23 07:53:42 -06:00
Vicente Bolea
c4857f6ec9 Merge topic 'update-to-v1.8.0'
982e96553 1.8.0 is our 12th official release of VTK-m.
fdd5e04eb Update release notes for 1.8.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !2787
2022-06-21 15:33:54 -04:00
Vicente Adolfo Bolea Sanchez
fdd5e04ebc Update release notes for 1.8.0 2022-06-16 13:18:02 -04:00
Vicente Adolfo Bolea Sanchez
01619f75f6 doc: add release roadmap 2022-06-13 11:42:25 -04:00
Vicente Bolea
90a375a50e Update HotFixGuide.md 2022-05-30 14:13:58 -04:00
Vicente Adolfo Bolea Sanchez
f6267db2b4 docs: update releasehotfix doc 2022-05-30 13:37:17 -04:00
Vicente Adolfo Bolea Sanchez
85b70094a7 docs: Add release-specific branch info 2022-05-26 15:59:23 -04:00
Kenneth Moreland
121683ac2e Merge topic 'backport-at-bottom'
bd8f8f6da Fix documentation for backport release command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !2781
2022-05-25 11:27:33 -04:00
Kenneth Moreland
bd8f8f6da8 Fix documentation for backport release command
For the `Backport: release` command to work on a MR, it needs to be at
the bottom of the description of the MR. However, `ReleaseHotFix.md`
claimed it could be anywhere in the description. Fix that.
2022-05-25 07:36:03 -06:00
Kenneth Moreland
9ea11440eb Do not require VecTraits for UnknownArrayHandle components
Whan an `UnknownArrayHandler` is constructed from an `ArrayHandle`, it uses
the `VecTraits` of the component type to construct its internal functions.
This meant that you could not put an `ArrayHandle` with a component type
that did not have `VecTraits` into an `UnknownArrayHandle`.

`UnknownArrayHandle` now no longer needs the components of its arrays to
have `VecTraits`. If the component type of the array does not have
`VecTraits`, it treats the components as if they are a scalar type.
2022-05-24 13:36:00 -06:00
Vicente Adolfo Bolea Sanchez
31f5a66c7d Add release notes for 1.8.0-rc1 2022-04-21 16:44:01 -04:00
Vicente Bolea
b40d7105cf Merge topic 'add-cuda-arch'
af129132c CMAKE: add CMAKE_CUDA_ARCHITECTURE support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2724
2022-03-30 11:49:44 -04:00
Vicente Adolfo Bolea Sanchez
af129132cc CMAKE: add CMAKE_CUDA_ARCHITECTURE support 2022-03-29 19:56:43 -04:00
Kenneth Moreland
6eb9c9876c Add generalized instantiation
Recently, an instantiation method was added to the VTK-m configuration
files to set up a set of source files that compile instances of a template.
This allows the template instances to be compiled exactly once in separate
build files.

However, the implementation made the assumption that the instantiations
were happening for VTK-m filters. Now that the VTK-m filters are being
redesigned, this assumption is broken.

Thus, the instantiation code has been redesigned to be more general. It can
now be applied to code within the new filter structure. It can also be
applied anywhere else in the VTK-m source code.
2022-03-23 06:33:36 -06:00
Kenneth Moreland
e1e3d4af2f Merge topic 'scoped-enum-cell-classification'
5d90102f1 Remove deprecated use of vtkm::CellClassification
ccef4d2db Fix scoping of vtkm::CellClassification

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2737
2022-03-21 12:40:05 -04:00
Kenneth Moreland
821e5f7473 Merge topic 'no-test-compile'
97f5ed640 Remove testing include from ZFP worklet headers
8d5e636ac Enable ci that compiles without testing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2738
2022-03-21 08:35:47 -04:00
Kenneth Moreland
97f5ed640f Remove testing include from ZFP worklet headers
Several of the ZFP worklet headers included `vtkm/cont/testing/
MakeTestDataSet.h`. This is a problem because if testing is turned off,
then `MakeTestDataSet.h` attempts to include a file that is not
generated, so the compile just fails if testing is off (and the testing
library is not on). This include must be a remanent of some old testing
code during development. It can be safely removed.
2022-03-18 11:04:37 -06:00
Kenneth Moreland
ccef4d2dbf Fix scoping of vtkm::CellClassification
The cell classifications were using an unscoped enum to define them. The
problem was that the symbols of the enum littered the `vtkm` namespace
without qualification. For example, it defined `vtkm::NORMAL`, which
could easily collide with some other meaning of normal.

Change the cell classification flags to be scoped within
`vtkm::CellClassification`. This thing behaves mostly like a scoped
enum. You can use the values declared within and reference
`vtkm::CellClassification` as a type itself. However, unlike a scoped
enum, `vtkm::CellClassification` items can automatically be cast to and
from `vtkm::UInt8`.
2022-03-17 15:33:57 -06:00
Kenneth Moreland
56670dbbaa Rename field associations
The symbols in `vtkm::cont::Field::Association` have been changed from
`ANY`, `WHOLE_MESH`, `POINTS`, and `CELL_SET` to `Any`, `WholeMesh`,
`Points`, and `Cells`, respectively. The reason for this change is twofold:

  * The general standard that VTK-m follows for `enum struct` enumerators
    is to use camel case (with the first character capitalized), not all
    upper case.
  * The use of `CELL_SET` for fields associated with cells is obsolete. A
    `DataSet` used to support having more than one `CellSet`, and so a
    field association on cells was actually bound to a particular
    `CellSet`. However, that is no longer the case. A `DataSet` has exactly
    one `CellSet`, so a cell field no longer has to point to a `CellSet`.
    Thus the enumeration symbol for `Cells` should match the one for
    `Points`.

For backward compatibility, the old enumerations still exist. They are
aliases for the new names, and they are marked as deprecated, so using them
will result in a compiler warning (on some systems).
2022-03-17 09:36:44 -06:00
Kenneth Moreland
0f96a6b0be Remove brigand.hpp
GCC 11 is having trouble compiling brigand.hpp at all, even before we
instantiate any templates. Since we no longer need it, let's get rid of
it. It was always placed in an internal namespace.
2022-03-08 07:25:08 -07:00
Kenneth Moreland
8d00bb1644 Deprecate brigand.hpp
Add deprecation warnings to the code whenever someone uses brigand.hpp.
We are no longer supporting this header file, but we'll give code a
chance to transition off of it.

Also added some other deprecation warnings to other header files that
are themselves deprecated but only issued warnings if you used something
in it.
2022-03-08 07:25:08 -07:00
Kenneth Moreland
124f08381b Added ListReduce, ListAll, and ListAny
These new features to VTK-m lists allow you to compute a single value
from a list. `ListReduce` allows you to compute a value based on a
predicate. `ListAll` and `ListAny` use this feature to determine if all
or any of a list of `true_type` or `false_type` objects are true.
2022-03-08 06:53:05 -07:00
Kenneth Moreland
18c4b3258b Remove brigand from List.h
The brigand third party library has become more problematic as we move
forward. Replace the use of brigand in List.h with our own
implementation.
2022-02-03 11:53:27 -07:00
Vicente Bolea
ad11b198fd Merge topic 'update-to-v1.7.1'
bac755992 1.7.1 is our 11th official release of VTK-m.
6463a8c0b Add release notes for 1.7.1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2690
2022-01-31 13:39:35 -05:00
Kenneth Moreland
45e9b7fa76 Merge topic 'vectraits-range'
ca032801a Allow ArrayExtractComponent to work with Vec-like value types
f48b4b761 Add implementation of VecTraits for Range and Bounds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Gunther Weber <ghweber@lbl.gov>
Merge-request: !2683
2022-01-31 10:15:12 -05:00
Vicente Adolfo Bolea Sanchez
6463a8c0b7 Add release notes for 1.7.1 2022-01-28 18:16:04 -05:00
Kenneth Moreland
5bd60a0b77 Add CreateResult to NewFilter and absorb field mapping
The original version of `Filter` classes had a helper header file named
`CreateResult.h` that had several forms of a `CreateResult` function that
helped correctly create the `DataSet` to be returned from a filter's
`DoExecute`. With the move to the `NewFilter` structure, these functions
did not line up very well with how `DataSet`s should actually be created.

A replacement for these functions have been added as protected helper
methods to `NewFilter` and `NewFilterField`. In addition to moving them
into the filter themselves, the behavior of `CreateResult` has been merged
with the map field to output functionality. The original implementation of
`Filter` did this mapping internally in a different step. The first design
of `NewFilter` required the filter implementer to call a
`MapFieldsOntoOutput` themselves. This new implementation wraps the
functionality of `CreateResult` and `MapFieldsOntoOutput` together so that
the `DataSet` will be created correctly with a single call to
`CreateResult`. This makes it easier to correctly create the output.
2022-01-27 13:27:39 -07:00
Kenneth Moreland
f48b4b761e Add implementation of VecTraits for Range and Bounds
Added specializations of `vtkm::VecTraits` for the simple structures of
`vtkm::Range` and `vtkm::Bounds`. This expands the support for using
these structures in things like `ArrayHandle` and `UnknownArrayHandle`.
2022-01-25 10:55:35 -07:00
Kenneth Moreland
00609b0af2 Make ArrayCopy not depend on a device compiler
Rather than require `ArrayCopy` to create special versions of copy for
all arrays, use a precompiled versions. This should speed up compiles,
reduce the amount of code being generated, and require the device
compiler on fewer source files.

There are some cases where you still need to copy arrays that are not
well supported by the precompiled versions in `ArrayCopy`. (It will
always work, but the fallback is very slow.) In this case, you will want
to switch over to `ArrayCopyDevice`, which has the old behavior.
2022-01-24 12:17:23 -07:00
Kenneth Moreland
e8a6d37190 Merge topic 'allocate-and-fill'
d7b4390d1 Specify end position when filling values in Buffer
7a4cbaf10 Suggestions during review by Gunther Weber
8e4fb7ebd Suppress unhelpful nvcc warning
bacca0693 Add Fill method for non-standard Storage
9da66ff32 Prefer ArrayHandle::Fill over Algorithm::Fill
f79cf1d5f Add BitField::Fill and BitField::AllocateAndFill
926164049 Add Fill and AllocateAndFill to ArrayHandle
0cf996f41 Add ability to fill values in a Buffer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2660
2022-01-13 17:15:37 -05:00
Li-Ta Lo
e5639b1f91 Merge topic 'NewFilter'
0801b2423 add newline
c9b8a31b5 add NewFilterField.cxx so EXPORT_CORE would work
548df8436 add CORE_EXPORT
9ff52a98c Set default ActiveCoordinateSystemIndex to 0.
90992406f Merge branch 'NewFilter' of gitlab.kitware.com:ollielo/vtk-m into NewFilter
4a63b745a uniform treatment of primary/secondary field/coordinate_system
6461857e4 Merge branch 'master' into NewFilter
3720006d0 change based on code review
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2648
2022-01-06 09:31:25 -05:00
Kenneth Moreland
de14629c1f Merge topic 'render-test-improvements'
1981f9061 Add secondary image for MapperConnectivity test
d4d1ef955 Add secondary image for MapperQuad test
54c1a85d0 Reduce templating in RenderTest code
c0fbe5f30 Remove antiquated templated render test functions
0fe9300ee Expand test_equal_images
12e116417 Redefine RenderTest interface for library
afa8c9082 Add struct for passing options to render tests
9173d6bba Rename RegressionTests to RenderTests
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nickolas Davis <nadavi@sandia.gov>
Merge-request: !2657
2022-01-04 14:54:31 -05:00
Kenneth Moreland
f79cf1d5f7 Add BitField::Fill and BitField::AllocateAndFill 2022-01-04 08:50:57 -07:00
Kenneth Moreland
926164049f Add Fill and AllocateAndFill to ArrayHandle
These allow you to create an `ArrayHandle` filled with an inital value
without having to compile code for the device.
2022-01-04 08:50:57 -07:00
Li-Ta Lo
6461857e4e Merge branch 'master' into NewFilter 2022-01-04 07:54:04 -07:00
Kenneth Moreland
5b34e6f70b Better fallback for ArrayGetValue
To avoid having to use a device compiler every time you wish to use
`ArrayGetValue`, the actual implementation is compiled into the `vtkm_cont`
library. To allow this to work for all the templated versions of
`ArrayHandle`, the implementation uses the extract component features of
`UnknownArrayHandle`. This works for most common arrays, but not all
arrays.

For arrays that cannot be directly represented by an `ArrayHandleStride`,
the fallback is bad. The entire array has to be pulled to the host and then
copied serially to a basic array.

For `ArrayGetValue`, this is just silly. So, for arrays that cannot be
simply represented by `ArrayHandleStride`, make a fallback that just uses
`ReadPortal` to get the data. Often this is not the most efficient method,
but it is better than the current alternative.
2022-01-03 10:08:39 -07:00
Kenneth Moreland
0fe9300eed Expand test_equal_images
The `test_equal_images` function has been expanded to supply the
generated image in a `Canvas` or a `DataSet` in addition to a `View`.
Much of the templating code has been removed from `test_equal_images`
and most of the code has moved into the `vtkm_rendering_testing`
library.
2021-12-30 10:53:30 -07:00
Kenneth Moreland
12e1164179 Redefine RenderTest interface for library
The previous functions that enabled the render regression tests were
heavily templated, which required every test using rendering to
recompile the entire rendering system being used. Changed the interface
to not rely on templating so that the RenderTest method can be moved
into a library.

Also moved the options into a struct where they can be better managed.
The render testing functions tended to have lots of arguments that were
difficult to manage. Instead, created a single `struct` that holds all
the potential options. That way when someone specifies on option, it is
clear what option is being set.
2021-12-30 10:53:23 -07:00
Vicente Bolea
385ea820be Merge topic 'add-olcf-ci'
67b92d336 ci: Add OLCF GitLab-CI

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2638
2021-12-17 10:51:37 -05:00
Kenneth Moreland
d7a4e0d757 Merge topic 'unknown-cell-set'
1dc3d145a Allow `UnknownCellSet::Cast` return a reference
030ac1fff Fix some copy/paste errors with comments and variable names
4cb392ca2 Make DynamicCellSet directly an UnknownCellSet
6da5aa456 Replace DynamicCellSet implementation with UnknownCellSet
ac024587a Add UncertainCellSet

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2647
2021-12-17 09:44:53 -05:00
Kenneth Moreland
4204e4455e Add changelog for perline noise generator 2021-12-16 09:46:01 -07:00
Li-Ta Lo
a3c4460077 add changelog 2021-12-15 16:29:38 -07:00
Kenneth Moreland
ac024587a6 Add UncertainCellSet
This is a replacement for DynamicCellSet that requires less templating.
2021-12-15 12:59:18 -07:00
Vicente Adolfo Bolea Sanchez
67b92d3365 ci: Add OLCF GitLab-CI
Co-authored-by: Vicente Bolea <vicente.bolea@kitware.com>
Co-authored-by: Chuck Atkins <chuck.atkins@kitware.com
2021-12-15 13:00:47 -05:00
Li-Ta Lo
06428e2bc7 Merge topic 'NewFilter'
ba2a710e7 Update NewFitlerInterface.md
1469d34b4 rename DoExecutePartitions
74905a05c use new header file
161391656 Add ChangeLog
0e3cc8076 restore deprecated filter::GenerateIds
130d0d9df Updated Doxygen comments
8cf02d363 New Filter Interface Design

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2641
2021-12-13 16:33:11 -05:00
Li-Ta Lo
ba2a710e7f Update NewFitlerInterface.md 2021-12-13 16:31:29 -05:00
Li-Ta Lo
1469d34b43 rename DoExecutePartitions 2021-12-13 12:17:15 -07:00
Li-Ta Lo
161391656a Add ChangeLog 2021-12-13 09:28:20 -07:00
Dave Pugmire
4177f6697a Remove blank line at top of script. 2021-12-08 14:40:51 -05:00
Dave Pugmire
7c975497a3 Updates to build recipe. 2021-12-08 14:18:08 -05:00
Dave Pugmire
924a69d24c Update text for build. 2021-12-08 14:16:12 -05:00
Dave Pugmire
de335b0032 Add build instructions for Spock. 2021-12-08 14:13:59 -05:00
Vicente Adolfo Bolea Sanchez
555013cdda CMAKE: add unity builds support 2021-11-10 15:03:11 -05:00
Vicente Adolfo Bolea Sanchez
9ae4a3ed79 Add release notes for 1.7.0-rc1 2021-10-21 13:08:40 -04:00
Abhishek Yenpure
39934257cb Merge topic 'cell-velocity-field'
5109ba2a7 Adding changelog for cell centered velocities
4e9220ddd Removing unnecessary header
3237c58c2 Updating particle advection filters to use field associativity
79bb38c2b Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into cell-velocity-field
a11d9ad10 removing print statements
e28476df5 Assigning default associativity for velocity field
53167f076 Fix Field constructors
e6fa5fd4b Fixing Field class
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2588
2021-10-18 13:00:07 -04:00
Li-Ta Lo
81fe1254ea Merge branch 'master' into vtkm_io_sans_device_source 2021-10-15 19:10:40 -06:00
Abhishek Yenpure
5109ba2a7d Adding changelog for cell centered velocities 2021-10-15 09:19:12 -07:00
Li-Ta Lo
2c33a23d39 added changelog 2021-10-14 16:42:24 -06:00
Sujin Philip
02f0a809fb Merge topic 'probe-point-fields-changelog'
9deb36132 Add release notes for commit abedf61e5cbfaee4abac

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2603
2021-10-14 08:29:18 -04:00
Sujin Philip
9deb36132b Add release notes for commit abedf61e5cbfaee4abac 2021-10-12 17:41:57 -04:00
Kenneth Moreland
8f1c453c0b Support writing binary files to legacy VTK files
The legacy VTK file writer writes out in ASCII. This is helpful when a
human is trying to read the file. However, if you have more than a
trivial amount of data, the file can get impractically large. To get
around this, `VTKDataSetWriter` now has a flag that allows you to write
the data in binary format.
2021-10-11 13:08:59 -06:00
Kenneth Moreland
ae3c7c096b Merge topic 'source-field-names'
03a4750a3 Change Oscillator output field name to oscillating
a3462b41c Change Wavelet output field name to RTData
ea1a55359 Name tangle source fields appropriately
a68422d45 Add GenerateIds filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2595
2021-10-05 10:59:48 -04:00
Kenneth Moreland
03a4750a3f Change Oscillator output field name to oscillating 2021-10-05 08:20:27 -06:00
Kenneth Moreland
a68422d454 Add GenerateIds filter
This filter adds a pair of fields to a `DataSet` which mirror the
indices of the points and cells, respectively. These fields are useful
for tracking the provenance of the elements of a `DataSet` as it gets
manipulated by the filters. It is also convenient for adding indices to
operations designed for fields and for testing purposes.
2021-10-04 13:44:18 -06:00
Kenneth Moreland
d1160638b7 Add copy methods to UnknownArrayHandle
`vtkm::cont::UnknownArrayHandle` now provides a set of method that
allows you to copy data from one `UnknownArrayHandle` to another. The
first method, `DeepCopyFrom`, takes a source `UnknownArrayHandle` and
deep copies the data to the called one. If the `UnknownArrayHandle`
already points to a real `ArrayHandle`, the data is copied into that
`ArrayHandle`. If the `UnknownArrayHandle` does not point to an existing
`ArrayHandle`, then a new `ArrayHandleBasic` with the same value type as
the source is created and copied into.

The second method, `CopyShallowIfPossibleFrom` behaves similarly to
`DeepCopyFrom` except that it will perform a shallow copy if possible.
That is, if the target `UnknownArrayHandle` points to an `ArrayHandle`
of the same type as the source `UnknownArrayHandle`, then a shallow copy
occurs and the underlying `ArrayHandle` will point to the source. If the
types differ, then a deep copy is performed. If the target
`UnknownArrayHandle` does not point to an `ArrayHandle`, then the
behavior is the same as the `=` operator.

One of the intentions of these new methods is to allow you to copy
arrays without using a device compiler (e.g. `nvcc`). Calling
`ArrayCopy` requires you to include the `ArrayCopy.h` header file, and
that in turn requires device adapter algorithms. These methods insulate
you from these.
2021-09-28 10:46:58 -06:00
Kenneth Moreland
36352912bc Support scatter/mask for CellSetExtrude
Scheduling topology map workets for `CellSetExtrude` always worked, but
the there were indexing problems when a `Scatter` or a `Mask` was used.
This has been corrected, and now `Scatter`s and `Mask`s are supported on
topology maps on `CellSetExtrude`.
2021-09-27 13:27:02 -06:00
Kenneth Moreland
e74c0732c5 Compile reverse connectivity builder into vtkm_cont library
Because `CellSetExplicit` is a templated class, the implementation of
most of its features is part of the header files. One of the things that
was included was the code to build the reverse connectivity links. That
is, it figured out which cells were incident on each point using the
standard connections of which points comprise which cells.

Of course, building these links is non-trivial, and it used multiple
DPPs to engage the device. It meant that header had to include the
device adapter algorithms and therefore required a device compiler. We
want to minimize this where possible.

To get around this issue, a non-templated function was added to find the
reverse connections of a `CellSetExplicit`. It does this by passing in
`UnknownArrayHandle`s for the input arrays. (The output visit-points-
with-cells arrays are standard across all template instances.) The
implementation first iterates over all `CellSetExplicit` versions in
`VTKM_DEFAULT_CELL_SETS` and attempts to retrieve arrays of those types.
In the unlikely event that none of these arrays work, it copies the data
to `ArrayHandle<vtkm::Id>` and uses those.
2021-09-17 09:48:21 -06:00
Kenneth Moreland
4c6522de2b Precompile ConvertNumComponentsToOffsets
`ConvertNumComponentsToOffsets` has been changed to provide a pre-
compiled version for common arrays. This helps with the dual goals of
compiling less device code and allowing data set builders to not have to
use the device compiler. For cases where you need to compile
`ConvertNumComponentsToOffsets` for a different kind of array, you can
use the internal `ConvertNumComponentsToOffsetsTemplate`.
2021-09-16 14:27:14 -06:00
Kenneth Moreland
b1343474c1 Consolidate count-to-offset algorithms
For no particularly good reason, there were two functions that converted
and array of counts to an array of offsets: `ConvertNumComponentsToOffsets`
and `ConvertNumIndicesToOffsets`. These functions were identical, except
one was defined in `ArrayHandleGroupVecVariable.h` and the other was
defined in `CellSetExplicit.h`.

These two functions have been consolidated into one (which is now called
`ConvertNumComponentsToOffsets`). The consolidated function has also been
put in its own header file: `ConvertNumComponentsToOffsets.h`.

Normally, backward compatibility would be established using deprecated
features. However, one of the things being worked on is the removal of
device-specific code (e.g. `vtkm::cont::Algorithm`) from core classes like
`CellSetExplicit` so that less code needs to use the device compiler
(especially downstream code).

Part of this change removed unnecessary includes of `Algorithm.h` in
`ArrayHandleGroupVecVariable.h` and `CellSetExplicit.h`. This header had to
be added to some classes that were not including it themselves.
2021-09-16 14:24:41 -06:00
Kenneth Moreland
a2a8dcdfd5 Allow a const ArrayHandle to be reallocated
Previously, the `Allocate` method of `ArrayHandle` was _not_ declared as
`const`. Likewise, the methods that depended on `Allocate`, namely
`ReleaseResources` and `PrepareForOutput` were also not declared `const`.
The main consequence of this was that if an `ArrayHandle` were passed as a
constant reference argument to a method (e.g. `const ArrayHandle<T>& arg`),
then the array could not be reallocated.

This seems right at first blush. However, we have changed these methods to
be `const` so that you can in fact reallocate the `ArrayHandle`. This is
because the `ArrayHandle` is in principle a pointer to an array pointer.
Such a structure in C will allow you to change the pointer to the array,
and so in this context it makes sense for `ArrayHandle` to support that as
well.

Although this distinction will certainly be confusing to users, we think
this change is correct for a variety of reasons.

  1. This change makes the behavior of `ArrayHandle` consistent with the
     behavior of `UnknownArrayHandle`. The latter needed this behavior to
     allow `ArrayHandle`s to be passed as output arguments to methods that
     get automatically converted to `UnknownArrayHandle`.
  2. Before this change, a `const ArrayHandle&` was still multible is many
     way. In particular, it was possible to change the data in the array
     even if the array could not be resized. You could still call things
     like `WritePortal` and `PrepareForInOut`. The fact that you could
     change it for some things and not others was confusing. The fact that
     you could call `PrepareForInOut` but not `PrepareForOutput` was doubly
     confusing.
  3. Passing a value by constant reference should be the same, from the
     calling code's perspective, as passing by value. Although the function
     can change an argument passed by value, that change is not propogated
     back to the calling code. However, in the case of `ArrayHandle`,
     calling by value would allow the array to be reallocated from the
     calling side whereas a constant reference would prevent that. This
     change makes the two behaviors consistent.
  4. The supposed assurance that the `ArrayHandle` would not be reallocated
     was easy to break even accidentally. If the `ArrayHandle` was assigned
     to another `ArrayHandle` (for example as a class' member or wrapped
     inside of an `UnknownArrayHandle`), then the array was free to be
     reallocated.
2021-09-02 10:29:09 -06:00
Kenneth Moreland
b65e8bfcc7 Merge topic 'arraygetvalues-precompiled'
835467753 Fix link issue with discarded section
42acb9a66 Properly check whether ArrayHandleRecombineVec is on device
c17a5569f Do not try to use ArrayGetValue on arrays of non-basic types
9ca0cd1f6 Report array type when UnknownArrayHandle::ExtractComponent fails
e1ac918bc Compile ArrayGetValues implementation in library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2551
2021-09-01 08:54:15 -04:00
Ben Boeckel
73353fea70 Merge topic 'allow-skip-version-links'
09d5b9471 cmake: allow VTK to skip soname links for libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2563
2021-08-26 13:58:44 -04:00
Ben Boeckel
09d5b9471e cmake: allow VTK to skip soname links for libraries
VTK's wheels do not want these symlinks because they are useless in
Python wheels.
2021-08-26 12:06:09 -04:00
Kenneth Moreland
47371bb5e6 Add ability to convert fields to known types
In VTK-m we have a constant tension between minimizing the number of
types we have to compile for (to reduce compile times and library size)
and maximizing the number of types that our filters support.
Unfortunately, if you don't compile a filter for a specific array type
(value type and storage), trying to run that filter will simply fail.

To compromise between the two, added methods to `DataSet` and `Field`
that will automatically convert the data in the `Field` arrays to a type
that VTK-m will understand. Although this will cause an extra data copy,
it will at least prevent the program from failing, and thus make it more
feasible to reduce types.
2021-08-19 07:10:20 -06:00
Vicente Adolfo Bolea Sanchez
b6fc783631 Filters: Add cmake instantiations generator
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2021-08-14 13:39:53 -04:00
Kenneth Moreland
e1ac918bc7 Compile ArrayGetValues implementation in library
Previously, all of the `ArrayGetValues` implementations were templated
functions that had to be built. That meant that any code using them had
to be compiled with a device compiler and create special code for it.
This change uses an `UnknownArrayHandle` to encapsulate the
`ArrayHandle` and call a per-compiled library function. This means that
the code only has to be compiled once.
2021-08-11 07:56:32 -06:00
Kenneth Moreland
1ec4e5d62c Improve type reporting in UnknownArrayHandle
Added features with reporting types with `UnknownArrayHandle`. First,
added a method named `GetArrayTypeName` that returns a string containing
the type of the contained array. There were already methods
`GetValueType` and `GetStorageType`, but this provides a convenience to
get the whole name in one go.

Also improved the reporting when an `AsArrayHandle` call failed. Before,
the thrown method just reported that the `UnknownArrayHandle` could not
be converted to the given type. Now, it also reports the type actually
held by the `UnknownArrayHandle` so the user can better understand why
the conversion failed.
2021-08-04 12:11:10 -06:00
Kenneth Moreland
6f5455d0d6 Enable TypeToString for type_info
VTK-m contains a helpful method named `vtkm::cont::TypeToString` that
either takes a type as a template argument or a `std::type_info` object
and returns a human-readable string for that type.

The standard C++ library has an alternate for `std::type_info` named
`std::type_index`, which has the added ability to be used in a container
like `set` or `map`. The `TypeToString` overloads have been extended to
also accept a `std::type_info` and report the name of the type stored in
it (rather than the name of `type_info` itself).
2021-08-04 12:11:10 -06:00
Kenneth Moreland
fc58f4edc6 Turn on CUDA warnings for unknown stack sizes
These were previously suppressed because they are unavoidable when
calling virtual methods. But we no longer support virtual methods on
devices (it is deprecated).

These warnings can still happen if you have unbounded recursion. But we
would like to avoid unbounded recursion, so we would like to see these
warnings.

Also turned on other nvlink warnings, which include when a recursive
function call means that the compiler cannot figure out the full
stack depth.
2021-08-02 09:50:41 -06:00
Kenneth Moreland
5c36eafe56 Add ArrayCopyShallowIfPossible
Often times you have an array of an unknown type (likely from a data set),
and you need it to be of a particular type (or can make a reasonable but
uncertain assumption about it being a particular type). You really just
want a shallow copy (a reference in a concrete `ArrayHandle`) if that is
possible.

`ArrayCopyShallowIfPossible` pulls an array of a specific type from an
`UnknownArrayHandle`. If the type is compatible, it will perform a shallow
copy. If it is not possible, a deep copy is performed to get it to the
correct type.

Fixes #572.
2021-07-15 08:52:07 -06:00
Vicente Adolfo Bolea Sanchez
81076385f7 DOCS: add GitLab issue template new-release.md
It updates the ReleaseProcess.md document to describe our bi-branchial
workflow composed by a release branch and master branch

It also adds ReleaseHotFix.md which describes how to perform a HotFix
onto master/release branch.

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2021-06-18 19:59:01 -04:00
Kenneth Moreland
25e6daf93f Add changelog for depreciating VariantArrayHandle 2021-04-07 16:12:42 -06:00
Vicente Adolfo Bolea Sanchez
19c1b99f18 1.6.0-rc1 is our 7th official release of VTK-m.
The major changes to VTK-m from 1.5.1 can be found in:
  docs/changelog/1.6.0/release-notes.md

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2021-04-06 18:28:53 -04:00
Vicente Adolfo Bolea Sanchez
4e94d830a9 Add release notes for v1.6.0 2021-04-02 16:33:45 -04:00
Vicente Adolfo Bolea Sanchez
9d345733bf Merge commit 'd2d1c854adc8c0518802f153b48afd17646b6252' into update-to-1.6.0-rc1
* commit 'd2d1c854adc8c0518802f153b48afd17646b6252': (1346 commits)
  extend the default clipping plane
  Fix unintended cast in TBB Reduce's return value
  follow coding conventions
  make scalar normilization consistent across rendering
  correct a potential divide by zero
  Do not assume CUDA reduce operator is unary
  Fix casting issues in TBB functors
  Add casts to FunctorsGeneral.h
  Allow for different types in basic type operators
  kick the builds
  Cleanup per review.
  Fixes per review
  Add ArrayHandleSOA to default
  Disallow references in Variant
  Be more conservative about is_trivial support
  Removed two TODO comments after verifying parameters
  Port bug fix from distributed to augmented contour tree filter
  Fix hang in distributed contour tree
  more missing sstream headers
  add another missing header
  ...
2021-04-02 16:32:05 -04:00
Kenneth Moreland
75597e240b Merge topic 'array-range-compute-unknown'
04f020ae6 Update Field to use new ArrayRangeCompute features
2a41428fe Add implementation of ArrayRangeCompute for UnknownArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !2409
2021-02-17 15:43:53 -05:00
Kenneth Moreland
b9430c52e6 Create ArrayHandleOffsetsToNumComponents
This is a fancy array that takes an array of offsets and converts it to
an array of the number of components for each packed entry.

This replaces the use of `ArrayHandleDecorator` in `CellSetExplicit`.
The two implementation should do the same thing, but the new
`ArrayHandleOffsetsToNumComponents` should be less complex for
compilers.
2021-02-17 10:44:47 -07:00
Kenneth Moreland
2a41428fe4 Add implementation of ArrayRangeCompute for UnknownArrayHandle
This allows you to easily compute the range of any ArrayHandle, even if
you don't know the type.

A unit test for ArrayRangeCompute was also added.
2021-02-17 09:18:31 -07:00
Kenneth Moreland
fa4da95eb2 Add changelog for copying UnknownArrayHandle 2021-02-02 17:34:12 -07:00
Kenneth Moreland
a6edc832da Merge topic 'soa-array-default'
cecd81d5d Add types appropriate for Ascent
865855ea0 Add changelog for making ArrayHandleSOA a default array
50ff9c22a Add support of `ArrayHandleSOA` as a default storage type
bc09a9cd1 Add precompiled versions of `ArrayRangeCompute` for `ArrayHandleSOA`
77f9ae653 Support `ArrayHandleSOA` only for `Vec` value types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2349
2021-01-14 12:40:58 -05:00
Kenneth Moreland
06c59fed13 Update MapFieldMergeAverage/Permuation to use new CastAndCall
These functions now use
`UnknownArrayHandle::CastAndCallWithExtractedArray` to reduce the number
of times the worklet is run.
2021-01-13 09:19:33 -07:00
Kenneth Moreland
865855ea02 Add changelog for making ArrayHandleSOA a default array 2021-01-06 13:20:59 -07:00
Kenneth Moreland
439c18cfc0 Add changedoc for ArrayHandleRecombineVec 2021-01-04 15:10:18 -07:00
Kenneth Moreland
8dfd019423 Add changelog for extract component 2020-12-16 17:23:35 -07:00
Kenneth Moreland
0ab3edd87d Add VecFlat class
`vtkm::VecFlat` is a wrapper around a `Vec`-like class that may be a
nested series of vectors. For example, if you run a gradient operation
on a vector field, you are probably going to get a `Vec` of `Vec`s that
looks something like `vtkm::Vec<vtkm::Vec<vtkm::Float32, 3>, 3>`. That
is fine, but what if you want to treat the result simply as a `Vec` of
size 9?

The `VecFlat` wrapper class allows you to do this. Simply place the
nested `Vec` as an argument to `VecFlat` and it will behave as a flat
`Vec` class. (In fact, `VecFlat` is a subclass of `Vec`.) The `VecFlat`
class can be copied to and from the nested `Vec` it is wrapping.

There is a `vtkm::make_VecFlat` convenience function that takes an
object and returns a `vtkm::VecFlat` wrapped around it.
2020-12-16 17:22:44 -07:00
Kenneth Moreland
1df732cdb3 Add changedocs for removing ArrayTransfer 2020-12-08 15:22:07 -07:00
Robert Maynard
dfe63ddc05 CI-README: Correct how to compile VTK-m with CI's image settings 2020-11-18 11:14:36 -05:00