Commit Graph

8177 Commits

Author SHA1 Message Date
Sujin Philip
863c8e3dc6 Clip: Use vtkm::cont::Invoker
Replace use of vtkm::worklet::Dispatcher* with vtkm::cont::Invoker.
2023-04-10 16:18:24 -04:00
Dave Pugmire
186f06a822 Remove debug statements. 2023-04-10 12:05:44 -04:00
Dave Pugmire
812b8f3930 Fix serial compile error. 2023-04-08 14:19:58 -04:00
Dave Pugmire
6de278d8a4 Allow block duplication 2023-04-07 09:50:29 -04:00
Dave Pugmire
684652db9d Fix compile error in serial mode. 2023-03-30 22:13:20 -04:00
Dave Pugmire
a5ad12a4f4 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into sync_streamlines 2023-03-30 13:35:35 -04:00
Dave Pugmire
dc547de809 Remove debugging information. 2023-03-30 13:34:03 -04:00
Kenneth Moreland
90706d53f8 Merge topic 'safer-divide-by-volume'
014c429eb Make divide by volume in particle density estimate a little safer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3022
2023-03-27 08:48:05 -04:00
Zhe Wang
1fc84b85f9 Merge topic 'distributed_statistics'
d8f3e68d1 add distributed statistics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3017
2023-03-24 14:51:42 -04:00
Jay
d8f3e68d1d add distributed statistics 2023-03-24 15:19:23 +00:00
Dave Pugmire
42f183e81f More code cleanup................ 2023-03-23 15:21:43 -04:00
Dave Pugmire
1dea2b2eec Code cleanup........ 2023-03-23 15:11:33 -04:00
Dave Pugmire
322012a596 Only log message in debug. 2023-03-23 15:09:47 -04:00
Dave Pugmire
9d3c24ab91 Undo an inadvertent change. 2023-03-23 14:52:28 -04:00
Dave Pugmire
ad49b1e25b propagate the sync/async comm flag down. 2023-03-23 14:46:35 -04:00
Dave Pugmire
f6ac8d2857 Add useAsyncComm flags. 2023-03-23 13:41:57 -04:00
Dave Pugmire
b74e9efc06 Fix compiler error.... 2023-03-23 12:44:10 -04:00
Dave Pugmire
f9e9ea9c73 Revert "Add fields to particles."
This reverts commit d6aff6bdb92a60a8406b590ff7237775911818d2.
2023-03-23 12:38:09 -04:00
Kenneth Moreland
58fc4d8267 Fix potential deadlock in distributed contour tree
The `HierarchicalAugmenter` used in the distributed contour tree filter
attempts to save memory by releasing buffers used to send and receive
data after the DIY enqueues and dequeues are posted. This works as long
as the DIY serialization process copies the data in the arrays. However,
changes are coming where the data is sent directly from the buffers.
These changes cause a deadlock because the enqueue places a read lock
until the data is sent while the release tried to get a write lock.

The solution is simply to "forget" the array rather than explicitly
delete it. In this case, the array will automatically be deleted once
everyone is done with it.
2023-03-23 07:07:44 -06:00
Kenneth Moreland
014c429eb0 Make divide by volume in particle density estimate a little safer
While going through the VTK-m code to identify where a cast-and-call was
happening against VTKM_DEFAULT_TYPE_LIST, I ran into a subtle case in
`ParticleDensityBase` that was calling a worklet with an
`UnknownArrayHandle`. This works OK, but was probably compiling for
unnecessary types (for example, vectors). Changed the field resolution
to be more intentional.
2023-03-21 14:01:42 -06:00
Kenneth Moreland
3ab9e2ba75 Update clip with implicit function filter's field map
MR !2969 was meant to update the clip filters such that their field
mapping works on any field type and preserves the value type. Although
this was done for `ClipWithField`, it was not fully implemented for
`ClipWithImplicitFunction`. These changes update
`ClipWithImplicitFunction` to match its sibling.
2023-03-21 13:33:30 -06:00
Kenneth Moreland
af6218936f Merge topic 'vectraits-for-all'
ac889b500 Implement VecTraits class for all types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3018
2023-03-21 12:55:00 -04:00
Dave Pugmire
3efa8bb744 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into add_visit_file_reader 2023-03-20 10:58:55 -04:00
Kenneth Moreland
94d8698d16 Merge topic 'data-license'
f545feba8 Add changelog for documenting data license
a24358a1a Document source of WarpX files
60559ce9b Document the source of venn250.vtk
796ec9638 Document data that comes from VisIt tutorial
06391c4e6 Clarify license for ECL data

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3016
2023-03-20 09:42:41 -04:00
Kenneth Moreland
ac889b5004 Implement VecTraits class for all types
The `VecTraits` class allows templated functions, methods, and classes to
treat type arguments uniformly as `Vec` types or to otherwise differentiate
between scalar and vector types. This only works for types that `VecTraits`
is defined for.

The `VecTraits` templated class now has a default implementation that will
be used for any type that does not have a `VecTraits` specialization. This
removes many surprise compiler errors when using a template that, unknown
to you, has `VecTraits` in its implementation.

One potential issue is that if `VecTraits` gets defined for a new type, the
behavior of `VecTraits` could change for that type in backward-incompatible
ways. If `VecTraits` is used in a purely generic way, this should not be an
issue. However, if assumptions were made about the components and length,
this could cause problems.

Fixes #589
2023-03-16 12:59:38 -06:00
Dave Pugmire
97b460110f Fix issues....... 2023-03-15 12:45:45 -04:00
Dave Pugmire
6db8c316ad Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into add_visit_file_reader 2023-03-15 09:23:03 -04:00
Dave Pugmire
39cb7a653b kick the build machines. 2023-03-14 21:06:02 -04:00
Dave Pugmire
c989550111 Better error checking and logging. 2023-03-14 15:15:06 -04:00
Kenneth Moreland
796ec9638e Document data that comes from VisIt tutorial
Some of the data sets that are included from VTK-m are derived from the
VisIt Tutorial Data (https://www.visitusers.org/index.php?title=Tutorial_Data).
These are covered by the VisIt license, as communicated by Eric Brugger.

Although the license for these data is compatible with VTK-m's license,
we should still attribute the source of the data and make clear the
copyrights. The data are moved into the third_party directory, and
readmes are added to document everything.

The noise.vtk and noise.bov files have been renamed example.vtk and
example_temp.bov to match the name of the file in the VisIt tutorial
data archive. The ucd3d.vtk file, which is similar to the curv3d.silo
data but altered, has been removed. It was not used for any tests. It
was referenced in a couple of example programs, but the reference is
easily changed.
2023-03-14 12:25:21 -06:00
Kenneth Moreland
7ddf3d85c5 Merge topic 'remove-unlicensed-data'
5aba6e1be Remove unlicensed data

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3012
2023-03-14 11:42:03 -04:00
Dave Pugmire
2a6220726d Error checking for number of blocks. 2023-03-13 16:26:58 -04:00
Dave Pugmire
f60f437000 Add VisIt file reader. 2023-03-13 16:13:21 -04:00
Kenneth Moreland
5aba6e1bea Remove unlicensed data
Some of the test data sets are derived from data sets that are commonly
distributed to test visualization algorithms and are featured in
numerous papers. However, I am unable to track down the original source
let alone identify what license, if any, they were released under. To
avoid any complications with data ownership, remove these data sets and
replace them with in house data sets that we explicitly own.
2023-03-13 13:54:44 -06:00
Louis Gombert
ea13c27613 Minor Shrink filter fixes 2023-03-09 16:46:58 +01:00
Louis Gombert
b970a6f4c7 Merge topic 'shrink-filter'
67d6780fb Add Shrink filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3007
2023-03-09 09:14:01 -05:00
Louis Gombert
67d6780fba Add Shrink filter
This filter shrinks the cells of a DataSet towards their centroid, computed as the average position of the cell points
2023-03-09 09:48:46 +01:00
Kenneth Moreland
58fc99c2f8 Fix fast paths for ArrayRangeCompute
The precompiled `ArrayRangeCompute` function was not following proper fast
paths for special arrays. For example, when computing the range of an
`ArrayHandleUniformPointCoordinates`, the ranges should be taken from the
origin and spacing of the special array. However, the precompiled version
was calling the generic range computation, which was doing an unnecessary
reduction over the entire array. These fast paths have been fixed.

These mistakes in the code were caused by quirks in how templated method
overloading works. To prevent this mistake from happening again in the
precompiled `ArrayRangeCompute` function and elsewhere, all templated forms
of `ArrayRangeCompute` have been deprecated. Most will call
`ArrayRangeCompute` with no issues. For those that need the templated
version, `ArrayRangeComputeTemplate` replaces the old templated
`ArrayRangeCompute`. There is exactly one templated declaration of
`ArrayRangeComputeTemplate` that uses a class, `ArrayRangeComputeImpl`,
with partial specialization to ensure the correct form is used.
2023-03-08 12:36:53 -07:00
Kenneth Moreland
4b19139f3d Add tests to UnitTestArrayRangeCompute
Make the test a bit more complete by testing more array types.
2023-03-08 12:36:53 -07:00
Kenneth Moreland
69a9d4a87e Merge topic 'convert-runtime-vec-array'
331a277fe Automatically convert between ArrayHandleBasic and ArrayHandleRuntimeVec

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2994
2023-03-08 14:35:30 -05:00
Thomas H. Gibson
b1bb050bc8 Merge topic 'thrust-sorting'
267ee49cb docker: update kokkos hip image
67bf9a966 docker: update kokkos hip image
50d4ab5cc CMake: VTKm_ENABLE_KOKKOS_THRUST to depend on Kokkos with CUDA or HIP enabled
0604f314a Fix for building SERIAL unit tests with KOKKOS_HIP/CUDA enabled
802bf80b0 CI: Add rocthrust installation step
fda475d5b Rework Thrust CMake options
e6f63a807 Adding CMake tweaks to turn off thrust algorithms if thrust is not detected.
5a72275ed Rewrite sorting specialization using std::enable_if_t
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2926
2023-03-06 09:48:43 -05:00
Kenneth Moreland
2af555f6c9 Simplify serialization of DataSet objects
`vtkm::cont::DataSet` is a dynamic object that can hold cell sets and
fields of many different types, none of which are known until runtime. This
causes a problem with serialization, which has to know what type to compile
the serialization for, particularly when unserializing the type at the
receiving end. The original implementation "solved" the problem by creating
a secondary wrapper object that was templated on types of field arrays and
cell sets that might be serialized. This is not a great solution as it
punts the problem to algorithm developers.

This problem has been completely solved for fields, as it is possible to
serialize most types of arrays without knowing their type now. You still
need to iterate over every possible `CellSet` type, but there are not that
many `CellSet`s that are practically encountered. Thus, there is now a
direct implementation of `Serialization` for `DataSet` that covers all the
data types you are likely to encounter.

The old `SerializableDataSet` has been deprecated. In the unlikely event an
algorithm needs to transfer a non-standard type of `CellSet` (such as a
permuted cell set), it can use the replacement `DataSetWithCellSetTypes`,
which just specifies the cell set types.
2023-03-03 09:17:44 -07:00
Vicente Adolfo Bolea Sanchez
ecd4a68ffc cxx,c++: Remove c++14 references
- MSVC C++14 support obtained from: https://learn.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-170
- _MSVC_VER taken from https://stackoverflow.com/a/70630/2420872

fixes: #754
2023-02-23 19:30:58 -05:00
Dave Pugmire
f53d90d6b6 Merge branch 'sync_streamlines' of https://gitlab.kitware.com/dpugmire/vtk-m into sync_streamlines 2023-02-20 10:08:43 -05:00
Dave Pugmire
9fefdf6e61 Add fields to particles. 2023-02-20 10:03:49 -05:00
Kenneth Moreland
331a277fe3 Automatically convert between ArrayHandleBasic and ArrayHandleRuntimeVec
The `UnknownArrayHandle` has been updated to allow
`ArrayHandleRuntimeVec` to work interchangeably with basic
`ArrayHandle`. If an `ArrayHandleRuntimeVec` is put into an
`UnknownArrayHandle`, it can be later retrieved as an `ArrayHandleBasic`
as long as the base component type matches and it has the correct amount
of components. This means that an array can be created as an
`ArrayHandleRuntimeVec` and be used with any filters or most other
features designed to operate on basic `ArrayHandle`s. Likewise, an array
added as a basic `ArrayHandle` can be retrieved in an
`ArrayHandleRuntimeVec`. This makes it easier to pull arrays from VTK-m
and place them in external structures (such as `vtkDataArray`).
2023-02-20 07:39:49 -07:00
Sean Miller
0604f314aa Fix for building SERIAL unit tests with KOKKOS_HIP/CUDA enabled 2023-02-20 08:28:34 -06:00
Sean Miller
e6f63a807d Adding CMake tweaks to turn off thrust algorithms if thrust is not detected. 2023-02-20 08:26:24 -06:00
Thomas Gibson
5a72275ed8 Rewrite sorting specialization using std::enable_if_t 2023-02-20 08:25:05 -06:00
Sean Miller
04013b9924 Add sorting implementation using thrust
Co-authored-by: Thomas Gibson <thomas.gibson@amd.com>
2023-02-20 08:25:02 -06:00
Vicente Bolea
cf3c9bc921 Merge topic 'fix-compile_fix_for_sycl'
2ac236fe2 kokkos: disable volatile when kokkos >= 3.7

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2991
2023-02-18 18:35:41 -05:00
Vicente Adolfo Bolea Sanchez
2ac236fe21 kokkos: disable volatile when kokkos >= 3.7 2023-02-17 20:56:14 -05:00
Vicente Adolfo Bolea Sanchez
36912c16dc kokkos: disable volatile when kokkos >= 3.7 2023-02-17 20:29:38 -05:00
Kenneth Moreland
383c3e1b60 Merge topic 'runtime-vec-array'
504d241b4 Correct documentation about `ArrayHandle`s with `Vec`-like values
cdd1dbd7b Add ArrayHandleRuntimeVec
a7679c9e9 Add more safety to VecTraits
da731005b Remove unused comments in test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !2982
2023-02-17 13:35:47 -05:00
Vicente Adolfo Bolea Sanchez
6bfb0cedc5 kokkos: disable volatile when kokkos >= 3.7
(cherry picked from commit c32e67aa6d394c2267f95bb1306fe705b12bfc13)
2023-02-16 15:49:29 -05:00
Kenneth Moreland
504d241b44 Correct documentation about ArrayHandles with Vec-like values 2023-02-16 12:46:34 -07:00
Kenneth Moreland
88004132c3 Compile UnitTestAbort.cxx with a normal C++ compiler
`UnitTestAbort.cxx` does not touch any code that needs to be compiled on
the device, so you do not need a device compiler. Use the standard C++
compiler instead.
2023-02-16 11:26:04 -07:00
Kenneth Moreland
cdd1dbd7bc Add ArrayHandleRuntimeVec
The new `ArrayHandleRuntimeVec` is a fancy `ArrayHandle` allows you to
specify a basic array of `Vec`s where the number of components of the `Vec`
are not known until runtime. (It can also optionally specify scalars.) The
behavior is much like that of `ArrayHandleGroupVecVariable` except that its
representation is much more constrained. This constrained representation
allows it to be automatically converted to an `ArrayHandleBasic` with the
proper `Vec` value type. This allows one part of code (such as a file
reader) to create an array with any `Vec` size, and then that array can be
fed to an algorithm that expects an `ArrayHandleBasic` of a certain value
type.
2023-02-16 07:04:10 -07:00
Kenneth Moreland
a7679c9e99 Add more safety to VecTraits
You can often get compile errors when trying to get `Vec` attributes
from types that do not define `VecTraits`. This is of particular problem
when you create an object like `Vec` with a component that does not
define `VecTraits`. Make using these types safer by internally using
`SafeVecTraits`, which will gracefully handle types that do not have
`VecTraits`.
2023-02-16 07:04:10 -07:00
Kenneth Moreland
da731005b3 Remove unused comments in test 2023-02-16 07:04:10 -07:00
Mark Bolstad
be86a3f882 Merge topic 'compile_fix_for_sycl'
7d3ea2126 Changes for compiling with SYCL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2986
2023-02-15 16:49:20 -05:00
Mark Bolstad
7d3ea2126d Changes for compiling with SYCL
- Remove volatile keyword from `join'
  - Remove various `printf' in device code
2023-02-15 14:38:59 -07:00
Kenneth Moreland
5fd7a3711f Merge topic 'pass-field-fixes' into release-2.0
5a141349a Fix the passing of fields in filters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2985
2023-02-14 12:43:33 -05:00
Kenneth Moreland
b06d00d524 Merge topic 'pass-field-fixes'
5a141349a Fix the passing of fields in filters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2985
2023-02-14 12:43:33 -05:00
Sujin Philip
ec73ec36ee Merge topic 'fix-UnitTestAbort-warning'
a51cc2e15 Fix unreferenced local variable warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2984
2023-02-14 10:51:41 -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
a51cc2e153 Fix unreferenced local variable warning 2023-02-13 13:29:26 -05:00
Sujin Philip
48059d0de3 Merge topic 'vtkm-abort' into release-2.0
42c6959be Add Abort execution feature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2974
2023-02-13 12:41:06 -05:00
Sujin Philip
d05afa72f5 Merge topic 'vtkm-abort'
42c6959be Add Abort execution feature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2974
2023-02-13 12:41:06 -05:00
Dave Pugmire
c8bdb50a95 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into sync_streamlines 2023-02-10 14:50:12 -05:00
Kenneth Moreland
a80de8019a Add support for getting vec sizes of unknown arrays when runtime selected
The `GetNumberOfComponents` and `GetNumberOfComponentsFlat` methods in
`UnknownArrayHandle` have been updated to correctly report the number of
components in special `ArrayHandle`s where the `Vec` sizes of the values
are not selected until runtime.

Previously, these methods always reported 0 because the value type could
not report the size of the `Vec`. The lookup has been modified to query the
`ArrayHandle`'s `Storage` for the number of components where supported.
Note that this only works on `Storage` that provides a method to get the
runtime `Vec` size. If that is not provided, as will be the case if the
number of components can vary from one value to the next, it will still
report 0.

This feature is implemented by looking for a method named
`GetNumberOfComponents` is the `Storage` class for the `ArrayHandle`. If
this method is found, it is used to query the size at runtime.
2023-02-09 11:53:52 -07:00
Kenneth Moreland
8befbc47c7 Fix dot product type promotion
Update the dot product functions to use auto returns to capture proper
type promotion.
2023-02-08 07:04:07 -07:00
Kenneth Moreland
d5ba7f4d59 Change VectorMagnitude to work with any type of field
Previously, `VectorMagnitude` only worked with `Vec`s of size 2, 3, or
4. It now works with `Vec`s of any size. It also avoids a memory copy of
non-float types (although it does add a little arithmetic in the
computation).
2023-02-06 15:00:52 -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
Sujin Philip
4c45598d35 Fix compile issues when using cuda 12
CUDA 12 adds a `cub::Swap` function that creates ambiguity with `vtkm::Swap`.
This happens when a function from the `cub` namespace is called with an object
of a class defined in the `vtkm` namespace as an argument. If that function
has an unqualified call to `Swap`, it results in ADL being used, causing the
templated functions `cub::Swap` and `vtkm::Swap` to conflict.
2023-02-06 12:26:55 -05:00
Kenneth Moreland
eddf6df384 Update probe filter to interpolate any field type
Previously, the probe filter only worked on certain `Vec` sizes and
converted many types to floating point.

This change uses the extract component feature to pull data from any
array at its natural component type.

The bad part of this change is that it has to call the worklet
separately for each component in the field. That adds overhead and
probably lowers the cache efficiency. It was implemented this way
because the cell interpolation function does not work with the
recombined vecs returned from extract array.
2023-02-06 06:54:42 -07:00
Kenneth Moreland
0ba818e907 Enable any scalar field in ParticleDensity filters
This is done using the `CastAndCallScalarField` from `FilterField`,
which uses a cast-and-call with a float fallback.
2023-02-04 09:24:25 -05:00
Kenneth Moreland
d38efa87f2 Allow fields of any type in NDHistogram
Use the ability to extract array components to compute bins of
dimensions.
2023-02-04 09:24:23 -05:00
Kenneth Moreland
d26d76deaf Fix construction issue for XGC arrays in topology map fetch
The `Fetch::Load` for an input array of a topology map for an XGC array
(that uses `ConnectivityExtrude`) was failing to compile because it
creates a return `Vec` and then fills it. That does not work if the
input array has values that cannot be default constructed. This is the
case for `ArrayHandleRecombineVec`, which creates values that lazily
pull data out of portals.

Change the code to careful construct the return `Vec` such that it does
not require the default constructor of the components.
2023-02-03 14:52:06 -05:00
Kenneth Moreland
634847ce20 Change PointAverage to work on fields of any type
The previous version of the `PointAverage` filter used a float fallback
to handle most array types. The problem with this approach other than
converting field types perhaps unexpectantly is that it does not work
with every `Vec` size. This change uses the extract by component feature
of `UnknownArrayHandle` to handle every array type.

To implement this change the `PointAverage` worklet had to be changed to
handle recombined vecs. This change resulted in a feature degridation
where it can no longer be compiled for inputs of incompatible `Vec`
sizes. This feature dates back to when worklets like this were exposed
in the interface. This worklet class is now hidden away from the exposed
interface, so this degredation should not affect end users. There are
some unit tests that use this worklet to test other features, and these
had to be updated.
2023-02-03 14:52:04 -05:00
Kenneth Moreland
0c13917c1e Change CellAverage to work on fields of any type
The previous version of the `CellAverage` filter used a float fallback
to handle most array types. The problem with this approach other than
converting field types perhaps unexpectantly is that it does not work
with every `Vec` size. This change uses the extract by component feature
of `UnknownArrayHandle` to handle every array type.

To implement this change the `CellAverage` worklet had to be changed to
handle recombined vecs. This change resulted in a feature degridation
where it can no longer be compiled for inputs of incompatible `Vec`
sizes. This feature dates back to when worklets like this were exposed
in the interface. This worklet class is now hidden away from the exposed
interface, so this degredation should not affect end users. There are
some unit tests that use this worklet to test other features, and these
had to be updated.
2023-02-03 14:51:40 -05:00
Kenneth Moreland
29ecbbb005 Map fields of any type in MIRFilter
Use the ability to extract array components to handle any array in the
map field.
2023-02-03 08:34:08 -05:00
Kenneth Moreland
a478081dea Clean up point mapping in CleanGrid
Use the `MapFieldPermutation` function when mapping point coordinates
for points that are removed. (This function was already being used for
the rest of the fields.) Also remove some unneeded code in the
`CleanGrid` worklets.
2023-02-02 12:13:54 -05:00
Kenneth Moreland
3a02a45729 Merge topic 'contour-interp-any-field'
719d347fd Update contour filter's field map to work on any field type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !2973
2023-02-02 12:08:14 -05:00
Zhe Wang
2d8b3ef33f Merge topic 'add_statistics_filter'
58acf3a43 add statistics filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2957
2023-02-01 22:32:34 -05:00
Kenneth Moreland
ce5ac9bfb0 Merge topic 'update-kokkos'
447b8e711 Fill input to test of array extract from stride array
726bb0910 Fix floating point exception in Kokkos sort
89245c3df Remove NUMA regions option
4912d1d04 Update --kokkos-threads to --kokkos-num-threads
9f77e1118 Do not test if Kokkos device id does not match
fa30d6774 Update the minimum Kokkos required to 3.7
3a96e9429 ci: update Kokkos docker images
674572419 Use Kokkos 3.7.1  in the CI builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2967
2023-02-01 14:46:23 -05:00
Sujin Philip
ecb6f8d6d4 Merge topic 'refactor-runtimedevicetracker' into release-2.0
c7a2a7b30 Refactor RuntimeDeviceTracker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2971
2023-01-31 10:44:50 -05:00
Sujin Philip
5fdb2cd770 Merge topic 'refactor-runtimedevicetracker'
c7a2a7b30 Refactor RuntimeDeviceTracker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2971
2023-01-31 10:44:50 -05:00
Kenneth Moreland
719d347fd9 Update contour filter's field map to work on any field type
Use the extract component functionality to get data from any type of
array. This prevents converting fields to `vtkm::DefaultFloat` and
supports any size `Vec` in the component.
2023-01-30 13:14:56 -07:00
Kenneth Moreland
447b8e711e Fill input to test of array extract from stride array
I was getting some floating point exceptions which may have come from
reading garbage as floating point values.
2023-01-30 09:53:57 -07:00
Kenneth Moreland
726bb09108 Fix floating point exception in Kokkos sort
THe current version of sort in Kokkos does not check whether the array
is of size 0, and that messes up its bin calculation. If the size of the
array is less than 2, skip the sort since the order cannot change.
2023-01-30 09:53:57 -07:00
Kenneth Moreland
89245c3df5 Remove NUMA regions option
This configuration option was only added because Kokkos has such a flag.
But this flag is now deprecated in Kokkos and has no effect, so remove
it from VTK-m.
2023-01-30 09:53:57 -07:00
Kenneth Moreland
4912d1d042 Update --kokkos-threads to --kokkos-num-threads
The former has been deprecated for the latter.
2023-01-30 09:53:57 -07:00
Kenneth Moreland
9f77e11185 Do not test if Kokkos device id does not match
There was a regression test to check for an exception if the requested
Kokkos device id did not match the `KOKKOS_DEVICE_ID` environment
variable. New versions of Kokkos do not throw an exception (they just
pick one over the other), so remove this check.
2023-01-30 09:53:57 -07:00
Kenneth Moreland
b495b205b5 Merge topic 'fpe-apple'
4e9c63b62 Enable floating point exceptions on apple

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2970
2023-01-30 11:52:34 -05:00
Sujin Philip
c7a2a7b30e Refactor RuntimeDeviceTracker
Simplifies the code by using modern C++ features
2023-01-30 09:41:19 -05:00
Jay
58acf3a43f add statistics filter 2023-01-30 10:21:47 +00:00
Kenneth Moreland
4e9c63b629 Enable floating point exceptions on apple
Clang for apple does not support `fpenableexcept`, so make a special way
to turn them on to help developers debug code. This code is based on the
suggestions at:

https://stackoverflow.com/questions/37819235/how-do-you- enable-floating-point-exceptions-for-clang-in-os-x

https://stackoverflow.com/questions/71821666/trapping-floating-point-exceptions-and-signal-handling-on-apple-silicon

This code is actually disabled because it does not work on all known
platforms (most notably one of the dashboard machines). However, I
would like to keep the code there to assist debugging.
2023-01-27 14:08:11 -07:00
Jay
90e1e82b86 add composite filter 2023-01-26 04:48:23 +00:00
Kenneth Moreland
1889447d82 Update clip filter's field map to work on any field type
The previous implementation of the map field in the clip filters
(`ClipWithField` and `ClipWithImplicitFunction`) checked for common field
types and interpolated those. If the field value type did not match, it
would either convert the field to floats (which is at odds with what VTK
does) or fail outright if the `Vec` length is not supported.

The map field function for clip has been changed to support all possible
types. It does this by using the extract component functionality to get
data from any type of array.
2023-01-24 11:14:51 -07:00
Kenneth Moreland
eda6dc39f2 Support using arrays with dynamic Vec-likes as output arrays
When you use an `ArrayHandle` as an output array in a worklet (for example,
as a `FieldOut`), the fetch operation does not read values from the array
during the `Load`. Instead, it just constructs a new object. This makes
sense as an output array is expected to have garbage in it anyway.

This is a problem for some special arrays that contain `Vec`-like objects
that are sized dynamically. For example, if you use an
`ArrayHandleGroupVecVariable`, each entry is a dynamically sized `Vec`. The
array is referenced by creating a special version of `Vec` that holds a
reference to the array portal and an index. Components are retrieved and
set by accessing the memory in the array portal. This allows us to have a
dynamically sized `Vec` in the execution environment without having to
allocate within the worklet.

The problem comes when we want to use one of these arrays with `Vec`-like
objects for an output. The typical fetch fails because you cannot construct
one of these `Vec`-like objects without an array portal to bind it to. In
these cases, we need the fetch to create the `Vec`-like object by reading
it from the array. Even though the data will be garbage, you get the
necessary buffer into the array (and nothing more).

Previously, the problem was fixed by creating partial specializations of
the `Fetch` for these `ArrayHandle`s. This worked OK as long as you were
using the array directly. However, the approach failed if the `ArrayHandle`
was wrapped in another `ArrayHandle` (for example, if an `ArrayHandleView`
was applied to an `ArrayHandleGroupVecVariable`).

To get around this problem and simplify things, the basic `Fetch` for
direct output arrays is changed to handle all cases where the values in the
`ArrayHandle` cannot be directly constructed. A compile-time check of the
array's value type is checked with `std::is_default_constructible`. If it
can be constructed, then the array is not accessed. If it cannot be
constructed, then it grabs a value out of the array.
2023-01-23 13:02:40 -07:00
Kenneth Moreland
679a61bb71 Merge topic 'resize-extracted-components'
23469cab6 Add ability to resize ArrayHandleRecombineVec
2061e95ef Add ability to resize ArrayHandleStride

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2964
2023-01-23 14:09:10 -05:00
Vicente Bolea
ff340c268a Merge topic 'fix-testing-h' into release-2.0
a6f2a93c4 testing: remove vtkm/cont/testing relative path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2965
2023-01-20 02:13:27 -05:00
Vicente Bolea
caadd3248d Merge topic 'fix-testing-h'
a6f2a93c4 testing: remove vtkm/cont/testing relative path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2965
2023-01-20 02:13:27 -05:00
Vicente Adolfo Bolea Sanchez
a6f2a93c40 testing: remove vtkm/cont/testing relative path 2023-01-19 17:11:20 +09:00
Kenneth Moreland
23469cab68 Add ability to resize ArrayHandleRecombineVec
This feature enables the ability to anonomously create an array (such as
with `UnknownArrayHandle::NewInstance()`) and then use that as an output
array.
2023-01-18 14:29:23 -06:00
Kenneth Moreland
2061e95efe Add ability to resize ArrayHandleStride
This feature enables the ability to anonomously create an array (such as
with `UnknownArrayHandle::NewInstance()`) and then use that as an output
array. Although resizing `ArrayHandleStride` is a little wonky, it
allows worklets to resize them after creation rather than having to know
what size to make and allocating the array.
2023-01-18 14:29:23 -06:00
Sujin Philip
5d0481342a Fix compile issues when using cuda 12
CUDA 12 adds a `cub::Swap` function that creates ambiguity with `vtkm::Swap`.
This happens when a function from the `cub` namespace is called with an object
of a class defined in the `vtkm` namespace as an argument. If that function
has an unqualified call to `Swap`, it results in ADL being used, causing the
templated functions `cub::Swap` and `vtkm::Swap` to conflict.
2023-01-18 12:06:35 -05:00
oruebel
565772854a Merge branch 'master' into add_hdf5_reader 2023-01-16 17:56:36 -08:00
Kenneth Moreland
50a4935825 Merge topic 'document-field-index-order' into release-2.0
c0e0032e1 Clarify field index ordering in Doxygen

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2959
2023-01-13 11:14:36 -05:00
Kenneth Moreland
886f45078b Merge topic 'document-field-index-order'
c0e0032e1 Clarify field index ordering in Doxygen

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2959
2023-01-13 11:14:36 -05:00
Kenneth Moreland
3568adf5b3 Merge topic 'sprintf-warning' into release-2.0
f275972e3 Resolve sprintf warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2961
2023-01-13 10:53:47 -05:00
Kenneth Moreland
d65d6ec3bf Merge topic 'sprintf-warning'
f275972e3 Resolve sprintf warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2961
2023-01-13 10:53:47 -05:00
Vicente Bolea
3a620941dd Merge topic 'fix-vtkm-devices-namespaces'
d5ce96789 CMAKE: fix vtkm devices namespaces

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !2953
2023-01-13 09:51:00 -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
Kenneth Moreland
f275972e3b Resolve sprintf warning
The latest verson of Xcode clang warns about using sprintf because of
its inherent vulnerability. Change it to snprintf.
2023-01-10 10:38:29 -07:00
Kenneth Moreland
a3d7f9475b Force functions passed as templates to be functors
There are some special functions/methods that take as an argument a
function-like object and then call that function with some arguments.
There are some instances where a templated function was passed given the
appropriate template. Even though there is a specific function, this
gets passed as a function pointer and calling a function pointer on some
devices is a no-no.

Replace these function arguments with lambdas, which are constructed as
unnamed functor objects.
2023-01-03 13:56:29 -07:00
Vicente Adolfo Bolea Sanchez
d5ce967890 CMAKE: fix vtkm devices namespaces 2022-12-26 13:40:12 -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
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
Dave Pugmire
c9f2c7fe67 Support for syncronous communication. 2022-12-01 11:04:47 -05: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
19f752960f Remove Filter::CreateResult that takes a vector of CoordinateSystems
This method is principally obsolete and should have been removed when
coordinate systems were converted into fields. I noticed it was still
there when updating the documentation.

This removal required some changes to the CleanGrid filter, but this
actually simplified the code.
2022-11-30 14:02:49 -07:00
Christoph Gohlke
0575e036d9 Fix unresolved external symbol __popcnt on win-arm64 2022-11-27 19:51:17 -05:00
Christoph Gohlke
92a7bfc680 Fix unresolved external symbol __popcnt on win-arm64 2022-11-27 19:46:13 -05:00
Dave Pugmire
72a6e27b99 Update CMakeLists.txt 2022-11-22 10:48:29 -05:00
Dave Pugmire
7d2d7fe1cc Add a new unstructured cell locator 2022-11-22 09:51:40 -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
4ca64f0f09 Back out of DataSet::CopyPartsFromExcept method
This method is too unwieldy. Instead go back to `CopyStructure` and
other direct copy methods.
2022-11-11 07:53:20 -07: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
Tushar Athawale
09de1c8863 Unit test update for default and user-specified ghost field 2022-11-04 17:52:10 -04:00
Tushar Athawale
7414e02b62 added flag for SetGhostCellAsField function 2022-11-04 17:52:10 -04:00
Tushar Athawale
72f8bb9cce Check if default ghost cell field is requested for use 2022-11-04 17:52:10 -04:00
Tushar Athawale
63e7b2336a Set and Get methods for UseGhostCellsAsField 2022-11-04 17:52:10 -04:00
Tushar Athawale
fc44a61001 Added a flag UseGhostCellsAsField for default use 2022-11-04 17:52:10 -04: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
e3f74cb482 Merge topic 'splitsharpedges-point-count'
aa5687512 Correct the number of points in `SplitSharpEdges` filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Abhishek Yenpure <abhi.yenpure@kitware.com>
Merge-request: !2912
2022-11-02 08:50:03 -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
aa56875122 Correct the number of points in SplitSharpEdges filter
The cell set created in the `SplitSharpEdges` filter had the number of
points of the input, not the output. This inconsistency became worse now
that `DataSet` is doing more to check the consistency of point and cell
field lengths.
2022-10-31 16:23:14 -06: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
96b447e69a Fix some deprecated hacks in modules
When the configure modules were first created, there were some hacks
around filters that had not yet moved to the new filter mechanism. These
can (and should) be removed.
2022-10-27 10:24:28 -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
0fb0cb5e9f Merge topic 'oclf-in-every-mr'
d60c370d1 CI: Enable Ascent builds in MR
e4d23a4ae CI: remove unused variable warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2858
2022-10-25 16:57:08 -04:00
Vicente Adolfo Bolea Sanchez
e4d23a4ae6 CI: remove unused variable warnings 2022-10-25 15:40:48 -04:00
Kenneth Moreland
6f84d938aa AddHelp option to Initialize should add --help argument
When you used the `AddHelp` option to `Initialize`, it added a
`--vtkm-help` option and `-h`, but not `--help`, which was weird. It
also avoided adding `--vtkm-help` when `AddHelp` was not used, but did
print out a usage statement under other circumstances.

This changes the behavior to add `--vtkm-help`, `--help`, and `-h` when
`AddHelp` is on and only `--vtkm-help` when it is off.
2022-10-24 14:38:37 -06:00
Ben Boeckel
b6e0391f28 Merge topic 'fix-clip-typelist' into release-1.9
42cb62028 Clip should use `VTKM_DEFAULT_TYPE_LIST` in CastAndCall

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2889
2022-10-13 14:08:56 -04:00
Ben Boeckel
441d570da4 Merge topic 'fix-clip-typelist'
42cb62028 Clip should use `VTKM_DEFAULT_TYPE_LIST` in CastAndCall

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2889
2022-10-13 14:08:56 -04:00
Sujin Philip
42cb620289 Clip should use VTKM_DEFAULT_TYPE_LIST in CastAndCall
This was causing an issue in VTK as the VTK specific typelist was not
being used. This resulted in a field's type being changed from `UInt8` to
`Float32` and caused a test to fail.
2022-10-13 12:14:45 -04:00
Vicente Adolfo Bolea Sanchez
7ceec1ddac libs: proper version and soversion in vtk-m libs
This commit reflects the changes of VTK-m API/ABI release plans in
which we attempt ABI compatibility in patch releases.

- It also sets the version/soname for diy thirdparty module lib
2022-10-10 13:49:56 -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
0df2344517 Merge topic 'contour-bug' into release-1.8
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
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
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
Kenneth Moreland
de2f2b59ba Deprecate old filter base classes and supporting classes 2022-09-27 06:52:44 -06:00
Kenneth Moreland
b6d54eb612 Merge topic 'transfer-to-ogl-deprecated-use'
e36d908a4 Remove use of deprecated features in TransferToOpenGL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2871
2022-09-27 08:38:10 -04:00
Gunther Weber
ca9827ca24 Merge topic 'replace-decomposition-cta'
49dd19408 Do not overthink ComputeNumberOfBlocksPerAxis
e2968ca24 Revised ComputeNumberOfBlocksPerAxis inspired by Ken Moreland's suggestion
ede6bb001 Replace the way data is split in contour tree augmented example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2519
2022-09-26 13:33:34 -04:00
Kenneth Moreland
e36d908a49 Remove use of deprecated features in TransferToOpenGL
The `TransferToOpenGL` function was using a deprecated method to
determine on which device an `ArrayHandle` was installed. Update the
function to use the replacement methods.
2022-09-26 09:14:08 -06:00
Gunther H. Weber
e2968ca244 Revised ComputeNumberOfBlocksPerAxis inspired by Ken Moreland's suggestion 2022-09-23 15:08:46 -07:00
Ryan Krattiger
4c708ac661 Merge branch 'upstream-diy' into fix_gcc11_crusher_build_error
# By Diy Upstream
* upstream-diy:
  diy 2022-09-14 (496253d7)
2022-09-23 13:10:01 -05:00
Ryan Krattiger
95231cd155 Update diy/update.sh 2022-09-22 10:13:50 -05:00
Sujin Philip
16887ff156 Merge topic 'improve-threshold'
924b00193 Add more features to Threshold

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2867
2022-09-21 14:15:00 -04:00
Kenneth Moreland
962cad3882 Fix Fields and CoordinateSystems of Lagrangian filter outputs
The original versions of Lagrangian and LagrangianStructures mapped the
global fields from inputs to output. Restore that capability.

Also changed the output CoordinateSystem of Lagrangian to be uniform
points instead of rectilinear points. The points were uniformly spaced
anyway, so it is more clear to have uniform points in the coordinate
system.
2022-09-20 15:27:49 -06:00
Sujin Philip
924b001938 Add more features to Threshold
1. Now we can threshold for values below or above a given value, instead
   of just between two values.
2. Supports multi-component fields instead of just scalar fields.
3. The threshold criteria can be tested against just one specified
   component or against all of the components, and pass if any or all of
   the components pass.
4. The results of the threshold operation can be inverted.
2022-09-20 15:48:20 -04:00
Dave Pugmire
ee31217da5 Convert LagrangianStructures filter to NewFilter 2022-09-20 13:40:50 -06:00
Oliver Ruebel
b0952365f6 Merge remote-tracking branch 'origin/master' into add_hdf5_reader 2022-09-20 00:07:40 -07:00
Abhishek Yenpure
3ae5302c3d Merge topic 'shading_scalarRenderer'
35f15f49d Merge branch 'shading_scalarRenderer' of https://gitlab.kitware.com/nicolemarsaglia/vtk-m into shading_scalarRenderer
add81512d 64->32 float type
d77ba3b20 refactor
d399e5d38 change comment
5e361acea abmient -> ambient
0f0704a0b update to vtkm1.8

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nicole Marsaglia <marsaglia1@llnl.gov>
Merge-request: !2804
2022-09-13 20:34:41 -04:00
Gunther H. Weber
6597346638 Limit arguments of ArrayHandle to to type vtkm::Id 2022-09-13 10:58:48 +02:00
Gunther H. Weber
72b0b90350 Fix compile error in debug code due to member name change 2022-09-13 10:58:47 +02:00
Gunther H. Weber
34f378ad7e Explicit comparator for moving NO_SUCH_ELEMENT to end of array 2022-09-13 10:58:47 +02:00
Sujin Philip
fa574fdf46 Slice should support slicing along non-zero values
Earlier we were explicitly setting the slice-at value to zero. Now the
filter is more flexible.
2022-09-12 16:09:07 -04:00
Sujin Philip
e885cde0eb Add support for Offset in ClipWithImplicitFunction
This allows the user to specify a value of the implcit function to clip
at. The default is 0, which gives the same result as before.
2022-09-12 09:40:08 -04:00
Sujin Philip
e85f403fd4 Update paramter constness to follow vtk-m style in Clip.h
There were several cases where parameters of basic types were declared
const-by-value, instead of just by-value which is the convention
followed in vtk-m.

There were also some cases where compound types were being declared
const-by-value instead of const-by-reference.
2022-09-12 09:32:19 -04:00
Mathieu Westphal
70ba476bd5 Fix doxygen groups 2022-09-09 10:37:31 +08:00
Dave Pugmire
74b85e08e9 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into zero_velocity_particle_advection_terminate 2022-09-07 14:41:35 -04:00
Zhe Wang
cc72fd1c7a Merge topic 'add_log_values_filter'
0374b957d add log values filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2852
2022-08-31 08:56:54 -04:00
Dave Pugmire
7740ba5bc1 Merge topic 'partitioned_dataset_fields'
0fb721207 Kick the dashboard builds.
30d1d86a0 Method was deprecated during the rename within the MR. (Not a new method).
a215ac320 Use {} initialization of FieldCollection.
4b60978a0 Simplify implementation of CreateResult.
98994026b Change GetPartitionField to GetFieldFromPartition.
fbe78b45c Change all usage of IsField* to Is*Field.
e395fe8fe Rename methods for consistency.
019d6cbc6 fix build error due to typo.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2853
2022-08-30 21:25:46 -04:00
Dave Pugmire
0fb721207f Kick the dashboard builds. 2022-08-30 16:24:01 -04:00
Dave Pugmire
30d1d86a04 Method was deprecated during the rename within the MR. (Not a new method). 2022-08-30 10:35:03 -04:00
Dave Pugmire
a215ac3202 Use {} initialization of FieldCollection. 2022-08-29 16:53:17 -04:00
Dave Pugmire
29880d2375 Move zero velocity to the integrator. 2022-08-29 16:03:55 -04:00
Dave Pugmire
8aa56b7aff Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into zero_velocity_particle_advection_terminate 2022-08-29 15:23:10 -04:00
Kenneth Moreland
4b60978a03 Simplify implementation of CreateResult. 2022-08-29 14:58:31 -04:00
Dave Pugmire
98994026bb Change GetPartitionField to GetFieldFromPartition. 2022-08-29 14:57:36 -04:00
Dave Pugmire
fbe78b45cf Change all usage of IsField* to Is*Field. 2022-08-29 14:42:02 -04:00
Kenneth Moreland
e395fe8fe8 Rename methods for consistency. 2022-08-29 14:01:23 -04:00
Dave Pugmire
019d6cbc6e fix build error due to typo. 2022-08-29 07:06:05 -04:00
Dave Pugmire
f69e598225 Change of Field::Association names. 2022-08-29 06:40:42 -04:00
Dave Pugmire
00b6657689 Address comments from Ken, Ollie. 2022-08-26 12:03:20 -04:00
Dave Pugmire
71c6f034d9 Use CreateResult mechanism for copying PDS fields. 2022-08-26 08:55:54 -04:00
Kenneth Moreland
9f7c60364e Add deprecated headers and classes for flow filters
When the flow filters were converted to the new filter base classes, the
classes and headers were moved to a new namespace. Support backward
compatibility by adding deprecated versions of headers.
2022-08-25 14:38:49 -06:00
Dave Pugmire
7d60c390ce Test PDS fields and filters. 2022-08-25 16:25:58 -04:00
Dave Pugmire
56e014f268 Do copy fields inside of NewFilter 2022-08-25 13:38:58 -04:00
Dave Pugmire
fa401ba016 Copy PDS fields in filter. Add more tests. 2022-08-25 09:28:35 -04:00
Dave Pugmire
75b9c398f0 Add new assocation, Partitions for a value per dataset. 2022-08-24 10:52:29 -04:00
Dave Pugmire
ae4c098009 Add fieldName to field creation. 2022-08-24 09:50:56 -04:00
Dave Pugmire
f9dbfe9303 Code cleanup. Add some comments. 2022-08-24 09:47:31 -04:00
Vicente Bolea
89165ae006 Merge topic 'remove-unneeded-static-lib'
c92abc409 lodepng: remove interface dependency

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2753
2022-08-23 13:25:32 -04:00
Dave Pugmire
dc7b198541 Fix assoc name in PrintSummary 2022-08-23 07:19:57 -04:00
Dave Pugmire
def0f0989c Remove FieldCompare struct. 2022-08-23 07:17:16 -04:00
Dave Pugmire
0be4b4264d Add deprecated tag on old method. 2022-08-23 07:06:34 -04:00
Abhishek Yenpure
2dd4782885 Merge topic 'fix_warpX_path'
81b85e8ec Removing unnecessary includes
2004177db Making test data in control environment
606223edd Fixing choice of dataset integrator
2dc485ac2 Adding WarpX code path for steady state streamlines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2848
2022-08-22 23:22:32 -04:00
Vicente Adolfo Bolea Sanchez
c92abc4093 lodepng: remove interface dependency
It also avoid installing lodepng.a in the vtk-m shared build.
2022-08-22 21:54:49 -04:00
Dave Pugmire
714e1226ce Create FieldCollection class. 2022-08-22 15:02:03 -04:00
Abhishek Yenpure
81b85e8ec1 Removing unnecessary includes 2022-08-22 10:37:54 -07:00
Abhishek Yenpure
2004177dbe Making test data in control environment 2022-08-22 09:21:47 -07:00
Li-Ta Lo
a33fb903e2 Merge topic 'source_execute'
1ef6348f4 Merge branch 'source_execute' of https://gitlab.kitware.com/ollielo/vtk-m into source_execute
3d07503af use NewFilterField
a9d569f79 NIV Source::Execute

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2851
2022-08-22 11:26:26 -04:00
Dave Pugmire
cbdb797f1e Add fields to vtkm::cont::PartitionedDataSet 2022-08-22 08:43:15 -04:00
Abhishek Yenpure
606223edd2 Fixing choice of dataset integrator
Adding updates

Adding WarpX data and unit test

Fixing code from feedback

Fixing code from Ollie and Dave's feedback

Reducing WarpX dataset size

Fixing high precision requirement to store properties

Fixing Particle Sizeof

Fixing high precision requirement to store properties

fixing code from Ollie and Dave's feedback

Trying test

Fixing ChargedParticle serailization for MPI
2022-08-19 17:50:35 -07:00
Dave Pugmire
6a6bc011a6 Merge topic 'gpu_async_alloc'
770fa2964 Reset flag to previous value on exit.
dd16f738e remove example from cmake..
38714972a remove example for threaded multiblocks.
fc8b750e5 Fix type Set --> Get for CPU/GPU threads.
115db2175 fix compile error for cuda.
baac7e1fb Put sync memory into RuntimeDeviceTracker
8455972a0 Turn on thread-safe-ish mem alloc
9f4b786a7 Add option to thread-efficient mem alloc
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2845
2022-08-19 13:12:42 -04:00
Jay
0374b957d5 add log values filter 2022-08-19 03:24:35 -04: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
Dave Pugmire
770fa29642 Reset flag to previous value on exit. 2022-08-18 06:38:15 -04:00
Li-Ta Lo
1693c989b9 Merge branch 'master' into worklet_run 2022-08-16 16:02:17 -06:00
Li-Ta Lo
ca463a8a6f replace CallWorklet with lambda 2022-08-16 15:26:02 -06:00
Li-Ta Lo
c222a99537 simplify coordinate transform worklet dispatch 2022-08-16 11:13:23 -06:00
Li-Ta Lo
622388963e remove ->template 2022-08-16 09:54:29 -06:00
Li-Ta Lo
c6eb90a2b6 simplify worklet dispatch for Warp filters 2022-08-16 09:53:01 -06:00
Dave Pugmire
fc8b750e5c Fix type Set --> Get for CPU/GPU threads. 2022-08-16 10:59:22 -04:00
Dave Pugmire
115db2175e fix compile error for cuda. 2022-08-16 10:57:01 -04:00
Li-Ta Lo
ba7ac412b8 simplify Tri/Tetra worklet dispatch 2022-08-16 08:26:36 -06:00
Dave Pugmire
baac7e1fb9 Put sync memory into RuntimeDeviceTracker 2022-08-15 14:30:13 -04:00
Li-Ta Lo
e42b1d00b4 Merge topic 'worklet_run'
2f62e8c28 minor change based on code review
b8c39f4f9 de-template CellSetConnectivity::Run
386c633d6 simplify ThresholdWorklet::Run

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2846
2022-08-15 12:13:41 -04:00
Abhishek Yenpure
2dc485ac22 Adding WarpX code path for steady state streamlines
- Adding implementation for advecting charged particles in a electromagnetic field
  (This was done as a POC for WarpX w/ Axel Huebl from LBNL)
2022-08-14 15:50:36 -07:00
Li-Ta Lo
2f62e8c28f minor change based on code review 2022-08-12 14:21:37 -06:00
Dave Pugmire
8455972a09 Turn on thread-safe-ish mem alloc 2022-08-12 15:29:38 -04:00
Kenneth Moreland
cfb137947e Remove inclusion of Kokkos_Parallel_Reduce.hpp
This header is now considered an internal header, and the latest
release commit of Kokkos does not allow you to include it. The
header gets included anyway with Kokkos_Core.hpp, so we can safely
just delete it.

See https://github.com/kokkos/kokkos/pull/5178
2022-08-12 15:22:03 -04:00
Dave Pugmire
9f4b786a7f Add option to thread-efficient mem alloc 2022-08-12 15:10:38 -04:00
Li-Ta Lo
b8c39f4f9c de-template CellSetConnectivity::Run 2022-08-11 14:21:30 -06:00
Li-Ta Lo
386c633d66 simplify ThresholdWorklet::Run 2022-08-11 11:57:54 -06:00
Dave Pugmire
3920806a66 Address reviewer comments and suggestions. 2022-08-11 13:43:49 -04:00
dpugmire
7e945bb145 Fix compile error for cuda builds. 2022-08-11 09:09:21 -04:00
Dave Pugmire
4d60b42a47 Add threaded filters example 2022-08-10 16:06:42 -04:00
Dave Pugmire
7cbf3a9c91 Merge topic 'cellLocator_lastCell'
2a577476d Add function to reduce code in tests.
09a8ac4fe Call ReadPortal() after each invoke.
699d84681 Fixes kokkos builds. Need to call ReadPortal().
18260c768 debugging the dashboards...
2eb9fb85f dashboard debugging....
aaf4be942 debug dashboards.....
67f83b230 Dashboard debugging....
2540e52f4 Address suggestion to test uninitialized values. Dashboard debug.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2834
2022-08-10 15:39:57 -04:00
Dave Pugmire
8f58f824e5 Run multiblock tests with and without Async GPU memory 2022-08-10 15:38:18 -04:00
Dave Pugmire
b441c9e23d Add Sync/Async memory allocator functions. 2022-08-10 15:09:53 -04:00
Dave Pugmire
7fdea58ef6 Undo changes to arrayhandle unit test 2022-08-10 13:39:05 -04:00
Dave Pugmire
2a577476dd Add function to reduce code in tests. 2022-08-10 11:57:18 -04:00
Dave Pugmire
0d30520bb3 Use async memory allocation for cuda when managed memory is off. 2022-08-10 10:21:48 -04:00
Dave Pugmire
09a8ac4feb Call ReadPortal() after each invoke. 2022-08-10 07:44:27 -04:00
Dave Pugmire
699d84681a Fixes kokkos builds. Need to call ReadPortal(). 2022-08-10 07:40:53 -04:00
Dave Pugmire
18260c7681 debugging the dashboards... 2022-08-09 13:40:47 -04:00
Dave Pugmire
2eb9fb85f4 dashboard debugging.... 2022-08-09 12:09:50 -04:00
Li-Ta Lo
bb495ca562 Merge branch 'master' into worklet_run 2022-08-09 09:03:16 -06:00
Dave Pugmire
aaf4be942e debug dashboards..... 2022-08-09 09:29:43 -04:00
Dave Pugmire
67f83b230b Dashboard debugging.... 2022-08-09 09:15:45 -04:00
Dave Pugmire
2540e52f49 Address suggestion to test uninitialized values. Dashboard debug. 2022-08-08 21:26:55 -04:00
Li-Ta Lo
69e7100e3d remove redundant Run overload 2022-08-08 14:28:11 -06:00
Li-Ta Lo
9b5f745947 remove unused ProcessCellField 2022-08-08 11:18:19 -06:00
Li-Ta Lo
7247b71722 simply CellSet/Array dispatch for ImageConnectivity 2022-08-08 10:24:05 -06:00
Dave Pugmire
c53110cca1 Fix numsteps test for file-based cases. 2022-08-07 15:22:20 -04:00
Dave Pugmire
db5c71c198 Remove debugging line. 2022-08-05 16:11:35 -04:00
Dave Pugmire
a5993a647f Terminate particles when it hits zero-velocity. 2022-08-05 16:06:51 -04:00
Dave Pugmire
f6326f19c0 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into cellLocator_lastCell 2022-08-05 16:05:37 -04: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
bbdfd3d52b Do not assume that LastCell initializes to -1
If an `ArrayHandle` of `LastCell`s is created, then the contents will be
garbage. Just check to make sure that it is valid.
2022-08-05 12:55:45 -06:00
Kenneth Moreland
5d78780f6e Define LastCell type in cell locator structure
Rather than try to collect all `LastCell` types inside of a single
header and make an uber type, have each cell locator define its own cell
locator type and use that.
2022-08-05 12:43:50 -06:00
Kenneth Moreland
2271d0ef45 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 12:35:57 -06:00
Dave Pugmire
45206a8f03 Merge topic 'tube_fix_degenerate_polylines'
25c622508 Use ScatterCounting instead of ScatterPermutation.
8cf0c1a7f Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into tube_fix_degenerate_polylines
531c3a442 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into tube_fix_degenerate_polylines
a2d5f5249 kick dashboard...
6353da486 minor edit to kick dashboards.
deb15bc14 small edit to kick dashboards.
2bfd0ce59 Use ScatterPermutation to skip invalid cells.
8e44a7ce0 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2821
2022-08-05 13:40:36 -04:00
Dave Pugmire
3e794d16bc Allocate lastCell structures first. 2022-08-05 09:49:53 -04:00
Dave Pugmire
f21c327563 Bug fix... set cellId for return. 2022-08-04 12:51:15 -04:00
Dave Pugmire
70855167e5 Use last find cell to accelerate finds. 2022-08-04 11:41:17 -04:00
Kenneth Moreland
5a2da0cd89 Fix type comparison on OSX for UnknownArrayHandle base component type
This is an addition to commit e312c5435651f326f530a976d3faf3752350911e,
which corrects type comparison on OSX for typeids created in different
translation units. That missed the type correction for the
`BaseComponentType` of `UnknownArrayHandle`.
2022-08-04 06:18:57 -06:00
Li-Ta Lo
34613b1643 Merge topic 'purify_GetResultType'
d1d97ec05 make NewFilterParticleAdvection::GetResultType pure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Dave Pugmire <dpugmire@gmail.com>
Merge-request: !2832
2022-08-03 15:31:26 -04:00
Li-Ta Lo
b6b55f0265 Merge topic 'privatize_do_execute'
27305faff Privatize NewFilterParticleAdvection::DoExecute

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Dave Pugmire <dpugmire@gmail.com>
Merge-request: !2831
2022-08-03 15:30:32 -04:00
Li-Ta Lo
d1d97ec057 make NewFilterParticleAdvection::GetResultType pure 2022-08-03 11:15:35 -06:00
Gunther Weber
9551175dd4 Merge topic 'contour-tree-spatial-decomposition-refactor'
cd3fe3d47 Eliminate need for SpatialDecomposition in contour tree filters.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2825
2022-08-03 13:11:58 -04:00
Li-Ta Lo
27305faff3 Privatize NewFilterParticleAdvection::DoExecute 2022-08-03 10:05:03 -06:00
Dave Pugmire
25c6225081 Use ScatterCounting instead of ScatterPermutation. 2022-08-03 11:56:34 -04:00
Dave Pugmire
8cf0c1a7fb Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into tube_fix_degenerate_polylines 2022-08-03 11:42:46 -04:00
Gunther H. Weber
cd3fe3d47d Eliminate need for SpatialDecomposition in contour tree filters.
This commit address issue #713 and removes the need to pass information
about the spatial decomposition (block origins, block sizes, block index
and blocks per dimension) to the contour tree filter. Block origin
information is added to CellSetStructured (as GlobalPointSize) and the
distributed contour tree filter will get this information from
CellSetStructured instead of expecting it as parameters to the
constructor. Information about blocks per dimension and block indices
are computed from the information in CellSetStructure albeit requiring
global communication across all ranks. To avoid this communication cost,
the caller of the filter may explicitly specify this information via the
SetBlockIndices() method.
2022-08-02 20:01:41 -07:00
Li-Ta Lo
7c8022e3e3 Merge topic 'probe_map_field'
9cbf9719a lower case InvalidValue
292f7017c move Probe::DoMapField into a free function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2823
2022-08-02 11:09:37 -04:00
Dave Pugmire
531c3a442f Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into tube_fix_degenerate_polylines 2022-08-01 19:59:21 -04:00
Dave Pugmire
64f9d2fbf0 Merge topic 'remove_templates_from_streamline_filters'
898a3e092 Move StreamSurface into NewFilterField
5ffae6111 Use CastAndCallForTypes with UnknownArray of seeds.
061fe6afb Fix dashboard compile errors.
42fd70d50 Remove virtuals from DataSetIntegrator classes.
2524c16a0 Missed some cuda fixes filters...
e1fbfea30 Remove device compiler dependencies.
2a4430447 tests need to be device compiled.
9b2a257d9 Move include  out of .h file.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2777
2022-08-01 19:55:03 -04:00
Dave Pugmire
898a3e0927 Move StreamSurface into NewFilterField 2022-08-01 14:58:55 -04:00
Dave Pugmire
5ffae61115 Use CastAndCallForTypes with UnknownArray of seeds. 2022-08-01 13:43:28 -04:00
Dave Pugmire
061fe6afbb Fix dashboard compile errors. 2022-08-01 11:10:25 -04:00
Dave Pugmire
42fd70d50f Remove virtuals from DataSetIntegrator classes. 2022-08-01 10:59:32 -04:00
Dave Pugmire
2524c16a0c Missed some cuda fixes filters... 2022-08-01 09:55:38 -04:00
Dave Pugmire
e1fbfea305 Remove device compiler dependencies. 2022-08-01 08:00:46 -04:00
Dave Pugmire
2a4430447a tests need to be device compiled. 2022-07-29 22:15:13 -04:00
Kenneth Moreland
f57c0058ce Merge topic 'variant-cast-call-ref'
c41c3b7a5 Fix Variant::CastAndCall SFINAE for auto return type functors
3ec9fc858 Fix issue with Variant::CastAndCall with non-const reference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2824
2022-07-29 16:10:26 -04:00
Dave Pugmire
9b2a257d9f Move include out of .h file. 2022-07-29 15:05:59 -04:00
Dave Pugmire
403d800584 Remove compiler warnings on dashboard 2022-07-29 13:55:37 -04:00
Dave Pugmire
6a200c62d9 Cuda fixes: device in headers.. 2022-07-29 13:39:38 -04:00
Dave Pugmire
0d15a015fa Remove unused virtuals..... 2022-07-29 11:14:24 -04:00
Dave Pugmire
0c2652e16d Test the variant fix from !2824 2022-07-29 10:54:19 -04:00
Dave Pugmire
92ac6ae71b Move non-user-facing code into internal. 2022-07-29 10:01:39 -04:00
Sujin Philip
8587c82827 Merge branch 'release' into getfieldindex-not-throw-backport 2022-07-29 09:16:42 -04:00
Kenneth Moreland
c41c3b7a57 Fix Variant::CastAndCall SFINAE for auto return type functors
`Variant::CastAndCall` was using the C++11 style for an `auto` return
where the return type was specified with a `->` that got the `decltype`
of the return value of the functor. This was used as part of SFINAE to
pick whether you needed the const or non-const version.

However, this was causing a problem with functions that got an error
when deducing the return type for that. This was particularly
problematic for lambda functions. For example, say you have the
following simple `CastAndCall`.

```cpp
variant.CastAndCall([](auto& x){ ++x; });
```

To determine the return type of the lambda (`void`), the function has to
be compiled. But when it is compiled with a const type, which happens
when deducing the const version of `CastAndCall`, you get a compile
error. This error is not considered a substitution error (hence SFINAE),
it is an outright error. So you get a compile error just trying to
deduce the type.

The solution was to move to the C++14 version of an auto return type. In
this case, the return type is no longer important for SFINAE and is
delayed until the function is actually compiled with the specific
template parameters. This would be a problem if the const version of
`CastAndCall` was used when the non-const version was needed. But now
both versions will pass SFINAE and thus the non-const version will be
chosen as long as the `Variant` object itself is non-const. If the
`Variant` object itself is const, then that is in fact a legitimate
error, so a compile error is OK.

One thing I find wierd is that `CastAndCall` still has a `noexcept`
expression that will likewise cause a compile error in this case.
However, it is still working. I _think_ the difference is that
`noexcept` is not used to determine template substitution/overloaded, so
is therefore ignored until the function is actually compiled.
2022-07-29 06:50:34 -06:00
Dave Pugmire
5528a79aa2 cuda fixes. DEVICE_SOURCES is needed! 2022-07-29 08:37:03 -04:00
Dave Pugmire
c1c80e7ef8 Moe cuda device in header fixes. 2022-07-28 21:48:50 -04:00
Dave Pugmire
d23ebb324b Cuda fixes: device in headers. 2022-07-28 21:42:43 -04:00
Dave Pugmire
f15cc055b9 Remove device code from headers. 2022-07-28 16:52:24 -04:00
Tushar Athawale
aa01c51cb9 Addition of GhostCellField API to the Dataset Class
AddGhostCellField function for Dataset class

setGhostCellName function for GhostCellClassify class

setGhostCellName function for GhostCellClassify class

added default ghost cell name in Dataset class

Default ghost cell field name defined in GhostCellClassify class

Default ghost cell field name for GhostCellClassify class

Unit test for ghost field name check

Unit test for ghost field name check updated

Default ghost field name updated

Get function for GhostCellClassify and default ghost name

UnitTestStreamlineFilter updated with AddGhostCellField

AddGhostCellField and GetGlobalGhostCellFieldName propagated

GhostCellClassify constructor now defined in header file

Assigned default values to dataset class members GhostSet and GhostCellName

default values set for GhostSet and GhostCellName in dataset constructor

Constructor removed from dataset class and noexcept for GetGlobalGhostName

added Dataset constructor with noexcept

additions to make sure default move constructor has not changed

GhostSetName field made as a shared pointer since string class is not noexcept

AddGhostCellField funtion added without field name

hasGhostCellField added and unit tests updated for addGhostCellField

hasGhostCellField added and unit tests updated for addGhostCellField

GetGhostCellField and GetGhostCellFieldName functions added to Dataset

GetGhostCellField and GetGhostCellFieldName functions added to Dataset

debugging UnitTestCellLocatorGerneral for CUDA error

UnitTestCellLocatorGeneral testing for error

UnitTestCellLocatorGeneral testing for cude error

UnitTestCellLocatorGeneral error resolution

UnitTestCellLocatorGeneral error resolution

UnitTestCellLocatorGeneral error resolution print statement removed

Minor updates to Dataset class files

GlobalGhostCellFieldName implementation revised to return a static variable

GhostSet member removed, hasGhostCellField, constructor, copystructure updated

GetGhostCellField and GetGhostCellFieldName made cosistent with GetField

Fixes to a few function calls
2022-07-28 16:49:14 -04:00
Dave Pugmire
2b58bf6c26 Windows link issue... 2022-07-28 15:51:10 -04:00
Dave Pugmire
c5dd2d071d Cuda fixes, cleanup. 2022-07-28 15:09:34 -04:00
Dave Pugmire
767b6c0048 CUDA fixes move device copy into .cxx file. 2022-07-28 13:28:09 -04:00
Sujin Philip
c0364e71cc DataSet::GetFieldIndex should not throw
As per its documentation, DataSet::GetFieldIndex should return -1 when
a field with the given name is not found.
2022-07-28 08:45:18 -04:00
Sujin Philip
d4ee1379b1 Merge topic 'getfieldindex-not-throw'
796497170 DataSet::GetFieldIndex should not throw

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2827
2022-07-28 08:32:11 -04:00
Dave Pugmire
e9ed3dbb93 dashboard debugging. 2022-07-28 07:52:59 -04:00
Dave Pugmire
b1fda7c36e Code cleanup..... 2022-07-27 21:47:04 -04:00
Dave Pugmire
e7d18d5935 push_back --> emplace_back 2022-07-27 12:39:28 -04:00
Dave Pugmire
db8dc0d080 Don't use DSIType pointers. 2022-07-27 12:05:55 -04:00
Dave Pugmire
b9fd70105d more code cleanup. 2022-07-27 11:39:55 -04:00
Sujin Philip
796497170d DataSet::GetFieldIndex should not throw
As per its documentation, DataSet::GetFieldIndex should return -1 when
a field with the given name is not found.
2022-07-27 11:06:55 -04:00
Dave Pugmire
752fd6ab71 add cuda flags for streamsrf worklet. 2022-07-27 09:38:44 -04:00
Dave Pugmire
8d0be0dbbc take out Xptxas flag. 2022-07-26 22:33:35 -04:00
Dave Pugmire
d1d5bba1c9 Remove Xptxas option. 2022-07-26 16:41:26 -04:00
Dave Pugmire
8ec3cdd199 Fix warnings for windows builds. 2022-07-26 14:36:12 -04:00
Dave Pugmire
5a3e871e57 Replace cuda compiler info for advection 2022-07-26 13:49:42 -04:00
Kenneth Moreland
e0a1621a33 Correct typos in deprecated Probe header
When the `Probe` filter was moved to the new filter superclasses, there
were some mistakes in the deprecated header. First, the pathname in an
include was incorrect. Second, the header guard for the moved header was
not updated to be unique from the deprecated header.
2022-07-26 09:43:43 -06:00
Dave Pugmire
5e45d4c8b7 Move Lagrangian into common lib 2022-07-25 15:44:44 -04:00
Dave Pugmire
fab1b93628 Bug fix for threaded algorithm. Init counter. 2022-07-25 15:33:46 -04:00
Dave Pugmire
0b2fdea810 Fixes for Lagrangian 2022-07-25 13:34:32 -04:00
Kenneth Moreland
3ec9fc8580 Fix issue with Variant::CastAndCall with non-const reference
There was a typo in the declaration of the `CastAndCall` for a non-const
`Variant`. When determining the `noexcept` status of the function being
called, it was passing in a const reference instead of a regular
reference, which is what is actually passed to the function. This
potentially causes the function call to not match and fail to compile.
2022-07-25 10:07:22 -06:00
Dave Pugmire
ed9f6fd4a7 Remove debugging code. 2022-07-25 11:55:36 -04:00
Dave Pugmire
d2aacfc07e Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into remove_templates_from_streamline_filters 2022-07-25 11:52:45 -04:00
Dave Pugmire
f798d2470d comment out CastAndCall for now. 2022-07-25 11:39:52 -04:00
Dave Pugmire
ecb3e1e459 more code cleanup. 2022-07-25 11:16:47 -04:00
Li-Ta Lo
9cbf9719a9 lower case InvalidValue 2022-07-25 11:06:35 -04:00
Li-Ta Lo
b44b30ddb2 Merge topic 'restore_graph_connectivity_test'
dd4051d40 retore unit test for graph connectivityu

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2822
2022-07-25 11:04:27 -04:00
Dave Pugmire
0d6591d7a3 Fix compile errors on dashboards. 2022-07-25 10:52:15 -04:00