Commit Graph

8177 Commits

Author SHA1 Message Date
Kenneth Moreland
7302372b48 Fix doxygen issues 2023-11-21 07:50:04 -07:00
Kenneth Moreland
1b541bdd37 Avoid floating point exceptions in rendering code
There were some places in the rendering code where floating point
exceptions (FPE) could happen under certain circumstances. Often we do not
care about invalid floating point operation in rendering as they often
occur in degenerate cases that don't contribute anyway. However,
simulations that might include VTK-m might turn on FPE to check their own
operations. In such cases, we don't want errant rendering arithmetic
causing an exception and bringing down the whole code. Thus, we turn on FPE
in some of our test platforms and avoid such operations in general.
2023-11-20 14:21:38 -07:00
Vicente Adolfo Bolea Sanchez
3c5ff4f12a ci,opensuse: use mpich ofi:socket backend 2023-11-17 19:47:10 -05:00
Nrushad Joshi
55a08d51b7 Isosurface Uncertainty Visualization Filter 2023-11-15 21:04:37 -05:00
Jefferson Amstutz
7600675ca4 fix ANARI volume data type check 2023-11-13 14:56:13 -06:00
Roxana Bujack
25d48f7bc4 fourth round of fixes 2023-11-08 08:44:52 -07:00
Roxana Bujack
3a7bf476ce prevent warning 2023-11-07 17:31:57 -07:00
Roxana Bujack
9ce533f144 second round of fixes +1 2023-11-07 17:20:50 -07:00
Roxana Bujack
5d3c9604f2 second round of fixes 2023-11-07 17:20:05 -07:00
Kenneth Moreland
4d02add0e0 Enable new instances of unknown arrays with dynamic sizes
`UnknownArrayHandle` allows you to create a new instance of a compatible
array so that when receiving an array of unknown type, a place to put the
output can be created. However, these methods only worked if the number of
components in each value could be determined statically at compile time.

However, there are some special `ArrayHandle`s that can define the number
of components at runtime. In this case, the `ArrayHandle` would throw an
exception if `NewInstanceBasic` or `NewInstanceFloatBasic` was called.

Although rare, this condition could happen when, for example, an array was
extracted from an `UnknownArrayHandle` with `ExtractArrayFromComponents` or
with `CastAndCallWithExtractedArray` and then the resulting array was
passed to a function with arrays passed with `UnknownArrayHandle` such as
`ArrayCopy`.
2023-11-07 16:59:25 -05:00
Roxana Bujack
fae4cc4c79 first round of fixes 2023-11-07 13:52:05 -07:00
Kenneth Moreland
7e09fb7033 ken's suggestion to remove const 2023-11-07 14:31:36 -05:00
Roxana Bujack
f8d1dff30c use float 64 instead of default 2023-11-07 12:23:44 -07:00
Roxana Bujack
bc0447ec00 only remove blanked cells if the number of cells matches the ghost array 2023-11-07 11:56:37 -07:00
Roxana Bujack
2955b834e7 use float default instead of 64 2023-11-07 10:46:38 -07:00
Roxana Bujack
48793964d0 use global ghost array name 2023-11-07 10:37:54 -07:00
Roxana Bujack
f8c9af4f11 add default empty ghost field for compatibility 2023-11-07 10:29:16 -07:00
Roxana Bujack
bc83184e70 remove ambiguity from default 2023-11-07 10:02:37 -07:00
Roxana Bujack
c720744fb9 enable partitioned rendering by ghost blanking and depth sorting 2023-11-06 17:42:43 -07:00
Jefferson Amstutz
c3489535af adjustments for upcoming ANARI-SDK changes 2023-11-01 20:39:48 -05:00
Sujin Philip
4eb5da26fa Merge topic 'fix-threshold-all-comps'
d825d2450 Add a regression test for issue #804
e0c5500a2 Simplify threshold worklet
6e1de4fa8 Fix threshold for any-point-all-components case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3143
2023-10-30 12:32:59 -04:00
Sujin Philip
d825d2450e Add a regression test for issue #804 2023-10-26 10:09:03 -04:00
Sujin Philip
e0c5500a22 Simplify threshold worklet
Removes code that is no longer used.
2023-10-24 08:43:53 -04:00
Sujin Philip
6e1de4fa8f Fix threshold for any-point-all-components case
Threshold was producing wrong results with options `SetAllInRange(false)` and
`SetComponentToTestToAll` because the logic of running
`worklet::Threshold::RunIncremental` on individual components of the input
field and combining the results is incorrect for this case.

With this fix, component modes 'Any' and 'All' are handled by applying
the threshold criteria to each component of each value of the field,
combining the results, and running the threshold worklet on the result
array.
2023-10-23 11:23:30 -04:00
Kenneth Moreland
d356b78502 Merge topic 'users-guide'
b80b7e2e7 Add VTK-m User's Guide to source
feee5a2f9 Add cow dataset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3103
2023-10-19 12:55:46 -04:00
Jefferson Amstutz
47b6b5664a fix missing null handle check in volume mapper 2023-10-17 19:40:14 -05:00
Kenneth Moreland
b80b7e2e71 Add VTK-m User's Guide to source
This is a start of moving the VTK-m User's Guide into the VTK-m source.
This is only the start of the process. There are several goals of this
work.

1. Integrate the documentation into the source code better to better
   keep the code up to date.
2. Move the documentation over to Sphinx so that it can be posted online
   and be more easily linked.
3. Incoporate Doxygen into the guide to keep the documentation
   consistent.
4. Build the user guide examples as part of the VTK-m CI to catch
   compatibility changes quickly.
2023-10-17 11:31:27 -04:00
Jay
393db328a3 add multislice filter 2023-10-12 10:08:53 -04:00
Kenneth Moreland
cdff776a16 Merge topic 'arrayhandle-getcomponents'
9b992dcdd Add `GetNumberOfComponentsFlat` method to `ArrayHandle`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3137
2023-10-10 08:58:56 -04:00
Kenneth Moreland
3fe5b01855 Document glyph mapper classes
Also made some method names more consistent with the rest of VTK-m's
interface.
2023-10-03 14:13:37 -04:00
Kenneth Moreland
9b992dcdde Add GetNumberOfComponentsFlat method to ArrayHandle
Getting the number of components (or the number of flattened components)
from an `ArrayHandle` is usually trivial. However, if the `ArrayHandle` is
special in that the number of components is specified at runtime, then it
becomes much more difficult to determine.

Getting the number of components is most important when extracting
component arrays (or reconstructions using component arrays) with
`UnknownArrayHandle`. Previously, `UnknownArrayHandle` used a hack to get
the number of components, which mostly worked but broke down when wrapping
a runtime array inside another array such as `ArrayHandleView`.

To prevent this issue, the ability to get the number of components has been
added to `ArrayHandle` proper. All `Storage` objects for `ArrayHandle`s now
need a method named `GetNumberOfComponentsFlat`. The implementation of this
method is usually trivial. The `ArrayHandle` template now also provides a
`GetNumberOfComponentsFlat` method that gets this information from the
`Storage`. This provides an easy access point for the `UnknownArrayHandle`
to pull this information.
2023-10-03 10:31:38 -04:00
Kenneth Moreland
5b588a8a04 Merge topic 'update-warps'
1f07b0ecf Consolidate WarpScalar and WarpVector filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3115
2023-09-26 13:37:05 -04:00
Kenneth Moreland
65f6d2aa67 Fix issue with union placeholder on Intel compiler
We have run into an issue with some Intel compilers where if a `union`
contains a `struct` that has some padding for byte alignment, the value
copy might skip over that padding even when the `union` contains a different
type where those bytes are valid. This breaks the value copy of our
`Variant` class.

This is not a unique problem. We have seen the same thing in other
compilers and already have a workaround for when this happens. The
workaround creates a special struct that has no padding placed at the front
of the `union`. The Intel compiler adds a fun twist in that this
placeholder structure only works if the alignment is at least as high as
the struct that follows it.

To get around this problem, make the alignment of the placeholder `struct`
at large as possible for the size of the `union`.

It was taking too long to compile with a device. Redesign the
placeholder to be simpler and compile faster.
2023-09-26 07:25:25 -04:00
Kenneth Moreland
1f07b0ecf6 Consolidate WarpScalar and WarpVector filter
In reflection, the `WarpScalar` filter is surprisingly a superset of the
`WarpVector` features. `WarpScalar` has the ability to displace in the
directions of the mesh normals. In VTK, there is a distinction of normals
to vectors, but in VTK-m it is a matter of selecting the correct one. As
such, it makes little sense to have two separate implementations for the
same operation. The filters have been combined and the interface names have
been generalized for general warping (e.g., "normal" or "vector" becomes
"direction").

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

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

Internally, the implementation now uses tricks with extracting array
components to support many different array types (including
`ArrayHandleConstant`. This allows it to simultaneously interact with
coordinates, directions, and scalars without creating too many template
instances.
2023-09-26 07:20:09 -04:00
Dave Pugmire
c061732746 Add helper methods. Check the binIdx FIRST. 2023-09-12 15:41:28 -04:00
Kenneth Moreland
c606e8106f Merge topic 'constant-amr-arrays'
7992e1b6b Store constant AMR arrays with less memory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Roxana Bujack <bujack@lanl.gov>
Merge-request: !3131
2023-09-08 18:40:08 -04:00
Sujin Philip
757067a30f Merge topic 'fix-clip-centroid-points'
bda2d3d8e Clip: remap centroid interpolation points to used-only point

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Abhishek Yenpure <abhi.yenpure@kitware.com>
Merge-request: !3133
2023-09-07 10:15:41 -04:00
Kenneth Moreland
7992e1b6bf Store constant AMR arrays with less memory
The `AmrArrays` filter generates some cell fields that specify information
about the hierarchy, which are constant across all cells in a partition.
These were previously stored as an array with the same value throughout.
Now, the field is stored as an `ArrayHandleConstant`, which does not
require any real storage. Recent changes to VTK-m allow code to extract the
array as a component efficiently without knowing the storage type.

Fixes #794
2023-09-06 10:54:07 -06:00
Sujin Philip
bda2d3d8e1 Clip: remap centroid interpolation points to used-only point
Previously, Clip was updated to remove unused points from the input.
This requires a re-mapping of point ids after compaction. This
re-mapping was missed for the points used for interpolation of centorid
points.
2023-09-04 10:51:47 -04:00
Kenneth Moreland
5652c9ad3a Merge topic 'flying-edges-cell-fields' into release-2.1
8a9887023 Add regression test for flying edges interpolating cell fields
4f19ac608 Fix interpolation of cell fields with flying edges

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3129
2023-08-31 10:28:32 -04:00
Kenneth Moreland
e5723a4219 Merge topic 'flying-edges-cell-fields'
8a9887023 Add regression test for flying edges interpolating cell fields
4f19ac608 Fix interpolation of cell fields with flying edges

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3129
2023-08-31 10:28:32 -04:00
Kenneth Moreland
37334114a7 Merge topic 'fix-degenerates'
6e674ddea Fix degenerate polygon removal

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3126
2023-08-31 10:25:59 -04:00
Jefferson Amstutz
db4c5c3b98 initial implementation of ANARI rendering support 2023-08-30 15:52:48 -05:00
Kenneth Moreland
8a98870231 Add regression test for flying edges interpolating cell fields 2023-08-30 13:12:55 -05:00
Dave Pugmire
9fb58dcf1e Optimize cellID bin check. 2023-08-30 12:04:05 -04:00
Kenneth Moreland
4f19ac6082 Fix interpolation of cell fields with flying edges
The flying edges algorithm (used when contouring uniform structured cell
sets) was not interpolating cell fields correctly. There was an indexing
issue where a shortcut in the stepping was not incrementing the cell index.
2023-08-30 09:25:55 -05:00
Abdelilah Essiari
e0830a7af8 Merge topic 'ComputeBranchDecompositionInfo'
d3db3d1dd Implement computing branch decomposition info and added unit test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3112
2023-08-29 11:23:39 -04:00
Kenneth Moreland
4446b5aa76 Merge topic 'arrayhandleconstant-extract-component'
14460dbb3 Support component extraction from ArrayHandleConstant better

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3114
2023-08-29 10:23:22 -04:00
Kenneth Moreland
9c7b36ab61 Merge topic 'vecfromportal-operators'
508cc3acc Improve = operators in VecFromPortal

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3113
2023-08-29 10:23:03 -04:00
Mingzhe Li
d3db3d1dd9 Implement computing branch decomposition info and added unit test 2023-08-25 19:22:59 -04:00
Kenneth Moreland
6e674ddea6 Fix degenerate polygon removal
There was a bug in `CleanGrid` when removing degenerate polygons where it
would not detect if the first and last point were the same. This has been
fixed.

There was also an error with function overloading that was causing 0D and
3D cells to enter the wrong computation for degenerate cells. This has also
been fixed.

Fixes #796
2023-08-24 16:46:12 -04:00
Zhe Wang
0c77fcddec Merge topic 'add_multiplane_for_clip'
21a58a294 add multi plane for clip

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3124
2023-08-23 16:06:39 -04:00
Sujin Philip
e734f14b88 LookupTable: Shift computed idx by 1
The below range value is at index 0 and the actual table begins fron
index 1.
2023-08-23 12:55:13 -04:00
Jay
21a58a294c add multi plane for clip 2023-08-23 02:32:17 +00:00
Kenneth Moreland
14460dbb31 Support component extraction from ArrayHandleConstant better
Previously, `ArrayHandleConstant` did not really support component
extraction. Instead, it let a fallback operation create a full array on
the CPU.

Component extraction is now quite efficient for `ArrayHandleConstant`. It
creates a basic `ArrayHandle` with one entry and sets a modulo on the
`ArrayHandleStride` to access that value for all indices.
2023-08-18 09:44:19 -04:00
Sujin Philip
3f3228de8e LookupTable: Shift computed idx by 1
The below range value is at index 0 and the actual table begins fron
index 1.
2023-08-18 08:29:50 -04:00
Abhishek Yenpure
969e55048b Merge topic 'flow_restrucutre'
67b7543a3 Adding documentation for flow filter restructure
dbc873efa Changes to address feedback from MR
67716402b Correct export in class declaration
6d1d4f90a Fixing linking issues for flow Analysis class
adcb42455 Removing unnecessary file
78ca3f301 Fixing linking issues for flow Analysis class
0e1ade83a Fixing linking issues for flow Analysis class
12a3bc94e Adding test dependency of filter_flow on tests
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3087
2023-08-17 22:17:42 -04:00
Abhishek Yenpure
dbc873efa9 Changes to address feedback from MR
--  Removing `.inl` files
  --  Removing large comment code blocks
2023-08-17 09:34:00 -07:00
Vicente Bolea
67716402bc Correct export in class declaration
- Update Analysis.h to have consistent export symbols
- Update Analysis.h -- try to fix MSVC linking errors
- Fixup exports
2023-08-17 09:33:29 -07:00
Kenneth Moreland
8bb664de85 Support any cell type in MIR filter
Previously, the MIR filter ran a check the dimensionality of the cells in
its input data set to make sure they conformed to the algorithm. The only
real reason this was necessary is because the `MeshQuality` filter can only
check the size of either area or volume, and it has to know which one to
check. However, the `CellMeasures` filter can compute the sizes of all
types of cells simultaneously (as well as more cell types). By using this
filter, the MIR filter can skip the cell type checks and support more mesh
types.
2023-08-17 10:11:25 -04:00
Abhishek Yenpure
6d1d4f90ae Fixing linking issues for flow Analysis class 2023-08-16 18:23:22 -07:00
Abhishek Yenpure
adcb42455f Removing unnecessary file 2023-08-16 18:23:22 -07:00
Abhishek Yenpure
78ca3f3017 Fixing linking issues for flow Analysis class 2023-08-16 18:23:22 -07:00
Abhishek Yenpure
0e1ade83a0 Fixing linking issues for flow Analysis class 2023-08-16 18:23:22 -07:00
Abhishek Yenpure
12a3bc94e6 Adding test dependency of filter_flow on tests 2023-08-16 18:23:22 -07:00
Abhishek Yenpure
c69023cba3 Separating Analysis into header and source 2023-08-16 18:23:22 -07:00
Abhishek Yenpure
2a7149481e Moving base class flow filters into CXX 2023-08-16 18:23:22 -07:00
Abhishek Yenpure
6f57f33318 Fixing streamline output for no step 2023-08-16 18:23:22 -07:00
Abhishek Yenpure
1026b6dbaf Removing particle property num punctures 2023-08-16 18:23:22 -07:00
Abhishek Yenpure
9c83bd983b Removing XGC Filter 2023-08-16 18:23:22 -07:00
Abhishek Yenpure
9d840a88bd Fixing WarpXStreamlines compile problems 2023-08-16 18:23:22 -07:00
Abhishek Yenpure
e6545f0ca4 Fixing issues after rebasing 2023-08-16 18:23:22 -07:00
Abhishek Yenpure
0b76f44c8d Removing cout from device code 2023-08-16 18:23:22 -07:00
Abhishek Yenpure
6f85dee2f6 Changing solver type for WarpX to Euler 2023-08-16 18:23:22 -07:00
Abhishek Yenpure
e6291a9b91 Adding specialization for Particle/Field for XGC
Adding XGC Field
Adding updates to XGCField
Adding Updates for generalization
Adding WarpXStreamlines and Streamsurface
Adding changes to support XGC Poincare
Finalizing XGC analysis
2023-08-16 18:23:22 -07:00
Kenneth Moreland
34f07c37cf Merge topic 'ghost-cell-remove-interface'
a62eb7eb8 Update the interface and documentation of GhostCellRemove

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3110
2023-08-15 10:16:56 -04:00
Kenneth Moreland
a62eb7eb88 Update the interface and documentation of GhostCellRemove
The `GhostCellRemove` filter had some methods inconsistent with the naming
convention elsewhere in VTK-m. The class itself was also in need of some
updated documentation. Both of these issues have been fixed.

Additionally, there were some conditions that could lead to unexpected
behavior. For example, if the filter was asked to remove only ghost cells
and a cell was both a ghost cell and blank, it would not be removed. This
has been updated to be more consistent with expectations.
2023-08-08 21:43:38 -04:00
Kenneth Moreland
508cc3accb Improve = operators in VecFromPortal
Previously, `VecFromPortal` could only be set to a standard `Vec`.
However, because this is a `Vec`-like object with a runtime-size, it is
hard to do general arithmetic on it. It is easier to do in place so
there is some place to put the result. To make it easier to operate on
this as the result of other `Vec`-likes, extend the operators like `+=`,
`*=`, etc to support this.
2023-08-08 21:43:01 -04:00
Kenneth Moreland
8ae76c27f1 Save statistics of each partition
The original intent of calling the `Statistics` filter on a
`PartitionedDataSet` was that the resulting `PartitionedDataSet` would
have partitions matching the input giving the statics of each partition
(as well as the overall statistics in global fields). There is a comment
in the code that says as much.

However, the partitioned version of `Execute` deleted the statistics.
This corrects the behavior by leaving in the partitions' statistics.
This is also now being tested.
2023-08-08 21:41:04 -04:00
Vicente Bolea
5c6716f8e8 Merge topic 'fix-macos-build'
d800a33c2 remove unused variables
bba3f1fa5 macos: use Xcode 14.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3117
2023-08-07 20:20:55 -04:00
Vicente Adolfo Bolea Sanchez
d800a33c2e remove unused variables 2023-08-07 14:51:06 -04:00
abessiari
75b4998de7 added fix using read portal after sort and unit test using on the fly dataset 2023-07-31 23:45:32 -04:00
Kenneth Moreland
728ca6366f Compile CompositeVectors filter with regular compiler
The CompositeVectors filter does not run any worklet of its
own. It uses precompiled array manipulation and copies for
its implementation.

It shouldn't matter if a device compiler is used. (It should
be a quick compile.) But for some reason the nvcc compiler
was choking on an `auto`. Rather than figure out why nvcc is
barfing, I just stopped using it for this file.
2023-07-09 20:17:53 -04:00
Sujin Philip
90f09e8bcc Merge topic 'advanced-compute-range'
01bacbcde Advanced Compute Range

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3082
2023-07-05 14:48:12 -04:00
Sujin Philip
01bacbcde0 Advanced Compute Range
Add support for masks, vector magnitude range (L2 norm), and finite values only
range computations.
2023-07-04 11:54:56 -04:00
Kenneth Moreland
194ddb5b41 Fix error in checking paired faces in ExternalFaces filter
The `ExternalFaces` filter uses hash codes to find duplicate (i.e.
internal) faces. The issue with hash codes is that you have to deal with
unique entries that have identical hashes. The worklet to count how many
unique, unmatched faces were associated with each hash code was correct.
However, the code to then grab the ith unique face in a hash was wrong.
This has been fixed.

Fixes #789
2023-07-03 18:56:42 -04:00
Zhe Wang
f9d88bc3c5 Merge topic 'adding_hist_sampling'
2a1ac12fe add histsampling filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3083
2023-06-30 12:25:15 -04:00
Dave Pugmire
56588b6244 Merge topic 'getActiveParticles_performance'
c109d3dde kick the dashboards.
9acb482a2 init maxnumsteps
ba3571f74 More efficient GetActiveParticles()
064501214 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m
ff4cc5e00 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m
51435f227 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3091
2023-06-30 11:33:44 -04:00
Kenneth Moreland
faced47c65 Merge topic 'kokkos-atomics-fix'
284d479ee Switch Kokkos atomic functions to use desul library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Mark Bolstad <mbolsta@sandia.gov>
Merge-request: !3092
2023-06-30 08:55:48 -04:00
Jay
2a1ac12fe2 add histsampling filter 2023-06-30 03:57:49 +00:00
Dave Pugmire
c109d3dde7 kick the dashboards. 2023-06-29 08:25:13 -04:00
Mark Bolstad
284d479ee7 Switch Kokkos atomic functions to use desul library
Kokkos 4 switches from their interal library based off of desul to using desul directly.
This removes VTK-m's dependency on the Kokkos internal implementation (Kokkos::Impl) to
using desul directly.
2023-06-28 14:34:54 -04:00
Kenneth Moreland
8b6c5250d2 Add a ConvertToPointCloud filter
This filter takes a `DataSet` and returns a point cloud representation that
has a vertex cell associated with each point in it. This is useful for
filling in a `CellSet` for data that has points but no cells. It is also
useful for operations in which you want to throw away the cell geometry and
operate on the data as a collection of disparate points.
2023-06-28 12:38:49 -04:00
Dave Pugmire
9acb482a26 init maxnumsteps 2023-06-28 08:00:31 -04:00
Dave Pugmire
ba3571f740 More efficient GetActiveParticles() 2023-06-28 07:58:22 -04:00
Kenneth Moreland
db2dbbbccb Simplify MarchingCells execute method
The output arrays are always basic arrays containing `vtkm::Vec3f`, so
we don't need to template those arguments.
2023-06-27 09:07:44 -04:00
Kenneth Moreland
0ee495f310 Split the compilation of ContourMarchingCells into instantiations
Although the contour filter was recently divided into 2 filters, flying
edges and marching cubes, the marching cubes version still had many
conditions and was the file that took the longest to compile on Frontier.
To help speed up parallel compiles and prevent a single run of a
compiler from being overwhelmed, the compilation of all the marching
cubes conditions has been split up using instantiations.
2023-06-26 14:07:47 -04:00
Kenneth Moreland
8f4d5fdf80 Remove some unneeded test comments and debug code 2023-06-21 17:33:05 -04:00
Gunther H. Weber
7bea5413cf Revert from VOIIsGlobal to IncludeOffset. Add comment about deprecation reasoning. 2023-06-21 17:29:01 -04:00
Gunther H. Weber
523c8f3f21 Add test whether GlobalPointDimensions are preserved 2023-06-21 17:29:01 -04:00
Gunther H. Weber
84e719ae17 Set GlobalPointIndexStart correctly, copy GlobalPointDimensions 2023-06-21 17:29:00 -04:00
Gunther H. Weber
e55b700f75 Deprecate SetIncludeOffset and rename to SetVOIIsGlobal 2023-06-21 17:29:00 -04:00
Gunther H. Weber
e013ad126f Add test for GlobalPointIndexStart to TestingExtractStructured 2023-06-21 17:29:00 -04:00
Vicente Bolea
bce19a2e4c Merge topic 'update-diy'
188e5080b Merge branch 'upstream-diy' into update-diy
12b45d864 diy 2023-06-16 (3ee23f39)
1bea838be diy: set diy version to latest for/vtk-m
9c0b16414 remove gcc13 warning
d907d832a CI,opensuse: added sles build with gcc13

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3084
2023-06-21 15:01:36 -04:00
Sujin Philip
fc9077e0c5 Mark ArrayHandle constructors taking buffers, as explicit
This resolves a compiler ambiguity I hit during development.
In my case, I created an `ArrayHandleDecorator` with one of the arrays being
an `ArrayHandleTransform`. The ambiguity occurs in function
`DecoratorStorageTraits<...>::BuffersToArray`, here an `ArrayHandleTransform`
is constructed using buffers (`std::vector<vtkm::cont::internal::Buffer>`)

This constructor is not defined for `ArrayHandleTransform`, but it's defined for
its superclass (`vtkm::cont::ArrayHandle`). `ArrayHandleTransform` does have a
non-explicit constructor that takes the array to be transformed and the
transform-functor as parameters, where the later has a default value.
This produces the following ambiguous options for the compiler:

1. Create a "to-be-transformed" ArrayHandle instance using the buffers, call
   the `ArrayHandleTransform` constructor with this array with the defaulted
   functor parameter.
2. Create the superclass instance using the buffer and call the
  `ArrayHandleTransform` constructor that takes the superclass.

In this situation, option 2 is the correct choice.

The ambiguity is resolved by marking the constructors that take
buffers as explicit. These constructors are also added for the
derived classess via the `VTK_M_ARRAY_HANDLE_SUBCLASS_IMPL` macro.
2023-06-21 13:50:33 -04:00
Vicente Adolfo Bolea Sanchez
188e5080bd Merge branch 'upstream-diy' into update-diy
# By Diy Upstream
* upstream-diy:
  diy 2023-06-16 (3ee23f39)
2023-06-19 20:07:20 -04:00
Vicente Adolfo Bolea Sanchez
1bea838be9 diy: set diy version to latest for/vtk-m 2023-06-19 20:06:59 -04:00
Vicente Adolfo Bolea Sanchez
9c0b16414b remove gcc13 warning 2023-06-19 20:06:59 -04:00
Kenneth Moreland
a1e8d029c5 Get the 3D index from a BoundaryState in WorkletPointNeighborhood
There are occasions when you need a worklet to opeate on 2D or 3D
indices. Most worklets operate on 1D indices, which requires recomputing
the 3D index in each worklet instance. A workaround is to use a worklet
that does a 3D scheduling and pull the working index from that.

The problem was that there was no easy way to get this 3D index. To
provide this option, a feature was added to the `BoundaryState` class
that can be provided by `WorkletPointNeighborhood`.

Thus, to get a 3D index in a worklet, use the
`WorkletPointNeighborhood`, add `Boundary` as an argument to the
`ExecutionSignature`, and then call `GetCenterIndex` on the
`BoundaryState` object passed to the worklet operator.
2023-06-19 10:29:18 -06:00
Kenneth Moreland
05ff345b1f Merge topic 'array-range-instantiations'
46a613d18 Speed up compilation of ArrayRangeCompute.cxx

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3079
2023-06-19 12:22:17 -04:00
Kenneth Moreland
46a613d183 Speed up compilation of ArrayRangeCompute.cxx
The file `ArrayRangeCompute.cxx` was taking a long time to compile with
some device compilers. This is because it precompiles the range computation
for many types of array structures. It thus compiled the same operation
many times over.

The new implementation compiles just as many cases. However, the
compilation is split into many different translation units using the
instantiations feature of VTK-m's configuration. Although this rarely
reduces the overall CPU time spent during compiling, it prevents parallel
compiles from waiting for this one build to complete. It also avoids
potential issues with compilers running out of resources as it tries to
build a monolithic file.
2023-06-19 08:37:15 -06:00
Li-Ta Lo
362efb637c try to surpress warning for window 2023-06-14 10:04:43 -06:00
Li-Ta Lo
3f680a5be3 Merge branch 'master' into rendering_cpp_cleanup 2023-06-12 14:03:26 -06:00
Li-Ta Lo
7bbda42fe5 clean up Annontations 2023-06-12 14:02:47 -06:00
Kenneth Moreland
bde9c9b8a3 Merge topic 'flat-logical-convert-names'
29c96a24f Rename structured connectivity index conversion methods

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3075
2023-06-09 11:03:54 -04:00
Li-Ta Lo
75d0dd9bf8 Merge topic 'rendering_cpp_cleanup'
c8caecfef try to supress warning on windows
85b4b18fc properly call make_unique
10bcf618f non-virtual color table annotations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3077
2023-06-07 17:59:53 -04:00
Li-Ta Lo
c8caecfefc try to supress warning on windows 2023-06-05 13:08:38 -06:00
Li-Ta Lo
85b4b18fca properly call make_unique 2023-06-05 11:20:49 -06:00
Li-Ta Lo
10bcf618f6 non-virtual color table annotations 2023-06-05 09:05:53 -06:00
Kenneth Moreland
4064a3bd06 Allow ComputeMoments to operate on any scalar field
Previously, the `ComputeMoments` filter only operated on a finite set of
array types as its input field. This included a prescribed list of `Vec`
sizes for the input. The filter has been updated to use more generic
interfaces to the field's array (and float fallback) to enable the
computation of moments on any type of scalar field.
2023-06-05 08:44:03 -04:00
Roxana Bujack
ddada34223 Merge topic 'addMomentsTest'
8a44ea4a9 adapt pixel wrongnes ratio
47441e841 add render test for moments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3070
2023-06-05 08:34:19 -04:00
Kenneth Moreland
29c96a24fa Rename structured connectivity index conversion methods
The structured connectivity classes are templated on two tags to
determine what 2 incident topological elements are being accessed. Back
in the day, these were called the "from" elements and "to" elements, as
taken from VTK filter names like `PointDataToCellData`. However, these
names were found to be very confusion, and after much debate they have
been renamed to the visit element type and the incident element type.
Meaning that a worklet is "visiting" elements of a particular type (such
as visiting each cell) and can access "incident" elements of a
particular type (such as the points incident on the cell).

I found a few methods converting flat and logical indices using the old,
confusing from/to convention. This changes them to the new convention.
2023-06-02 15:31:24 -04:00
Li-Ta Lo
62eb0e3f3d copying Actor into Scene 2023-06-02 10:36:39 -06:00
Li-Ta Lo
04b6d96aab enable copying for Actor and ConnectivityProxy 2023-06-02 10:32:44 -06:00
Li-Ta Lo
09c78eec43 use unique_ptr for PIMPL ConnectivityProxy 2023-06-01 14:54:27 -06:00
Li-Ta Lo
6b0d2e369c use unique_ptr for PIMPL Actor 2023-06-01 11:28:49 -06:00
Li-Ta Lo
fe211adfd8 Merge branch 'master' into rendering_cpp_cleanup 2023-06-01 10:14:17 -06:00
Li-Ta Lo
c5ddf1e543 Merge topic 'parallel_projection'
6508d47cb Remove 3DPara
c39ff5f86 add include CanvasRayTracer.h
ca1fe424c cleanup Camera
d660a53b8 clean up Ray and RayOperator
9ed11540f cleanup Camera

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3072
2023-06-01 12:05:21 -04:00
Li-Ta Lo
6508d47cbc Remove 3DPara 2023-06-01 10:53:35 -04:00
roxana bujack
8a44ea4a91 adapt pixel wrongnes ratio 2023-06-01 15:41:39 +02:00
Kenneth Moreland
7037f64bba Merge topic 'add-gpu-to-gpu-conn'
1e2749580 diy,mpi: Enable GPU AWARE MPI buffers
662f93e07 Merge branch 'upstream-diy' into add-gpu-to-gpu-conn
928900c63 diy 2023-03-28 (6837fb55)
6d69301b7 DIY: bump new version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2987
2023-05-31 17:23:26 -04:00
Kenneth Moreland
144f20636b Merge topic 'split-advection-test'
2631e5561 Split up the particle advection/streamline test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Dave Pugmire <dpugmire@gmail.com>
Merge-request: !3067
2023-05-31 10:03:48 -04:00
Vicente Adolfo Bolea Sanchez
1e27495809 diy,mpi: Enable GPU AWARE MPI buffers
This commit adds the flag VTKm_ENABLE_GPU_MPI which when enable it
will use GPU AWARE MPI.

- This will only work with GPUs and MPI implementation that supports GPU
  AWARE MPI calls.
- Enabling VTKm_ENABLE_GPU_MPI without MPI/GPU support might results in
  errors when running VTK-m with DIY/MPI.
- Only the following tests can run with this feature if enabled:
  - UnitTestSerializationDataSet
  - UnitTestSerializationArrayHandle
2023-05-30 12:13:03 -04:00
Vicente Adolfo Bolea Sanchez
662f93e07a Merge branch 'upstream-diy' into add-gpu-to-gpu-conn
# By Diy Upstream
* upstream-diy:
  diy 2023-03-28 (6837fb55)
2023-05-30 12:12:48 -04:00
Vicente Adolfo Bolea Sanchez
6d69301b78 DIY: bump new version 2023-05-30 12:12:33 -04:00
Li-Ta Lo
b4f17b8518 use unique_ptr for PIMPL for View 2023-05-30 10:02:33 -06:00
Li-Ta Lo
ca1fe424cd cleanup Camera 2023-05-30 09:49:29 -06:00
Kenneth Moreland
b6e61f9447 Fixed an issue with copying array from a disabled device
The internal array copy has an optimization to use the device the array
exists on to do the copy. However, if that device is disabled the copy
would fail. This problem has been fixed.
2023-05-29 20:55:48 -04:00
roxana bujack
47441e841c add render test for moments 2023-05-26 14:08:57 +02:00
Kenneth Moreland
2631e5561f Split up the particle advection/streamline test
The test for particle advection filters was one large test that tested 3
versions --- advection, streamlines, and pathlines --- with each tested
for a variety of conditions including asynchronous communication, number
of blocks, ghost cells, etc. This was causing the test to take a while
and sometimes time out. (It would also sometimes seg fault, which I hope
is related.) To attempt to fix this problem, break up this test into
pieces so that each piece takes a shorter amount of time.

Because these tests share most of their implementation (which is why
they were grouped together in the first place) the common code is placed
in a source file of shared implementation. To support this I also added a
way to mark a source file to `vtkm_unit_tests` as a source file that does
not contain its own test. Normally you would just compile all of the
tests together, select each with command line arguments, and use
duplicate `add_tests` for each argument. But that is not how
`vtkm_unit_tests` works, and it would be too hard to make that change.
2023-05-24 15:05:09 -06:00
Kenneth Moreland
c802adcbeb Add support for CastAndCallVariableVecField in FilterField
The `FilterField` class provides convenience functions for subclasses to
determine the `ArrayHandle` type for scalar and vector fields. However, you
needed to know the specific size of vectors. For filters that support an
input field of any type, a new form, `CastAndCallVariableVecField` has been
added. This calls the underlying functor with an `ArrayHandleRecombineVec`
of the appropriate component type.

The `CastAndaCallVariableVecField` method also reduces the number of
instances created by having a float fallback for any component type that
does not satisfy the field types.
2023-05-22 10:14:59 -06:00
Kenneth Moreland
bb9e7a0d6f Handle any Vec size in VTKDataSetReader
The legacy VTK file reader previously only supported a specific set of Vec
lengths (i.e., 1, 2, 3, 4, 6, and 9). This is because a basic array
handle has to have the vec length compiled in. However, the new
`ArrayHandleRuntimeVec` feature is capable of reading in any vec-length
and can be leveraged to read in arbitrarily sized vectors in field
arrays.
2023-05-22 06:19:11 -06:00
Li-Ta Lo
d660a53b8d clean up Ray and RayOperator 2023-05-18 14:45:16 -06:00
Kenneth Moreland
2cc2205218 Merge topic 'composite-vectors-any-size'
b59580bb8 Allow CompositeVectors filter to build any size vector
a8b4e5a62 Add GetNumberOfActiveFields method to FilterField

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3063
2023-05-18 16:28:39 -04:00
Kenneth Moreland
fb8e3d7ce7 Merge topic 'runtime-vec-info'
5bdd3c7bc Move ArrayHandleRuntimeVec metadata to a separate class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3062
2023-05-17 15:45:20 -04:00
Li-Ta Lo
9ed11540f1 cleanup Camera 2023-05-17 12:38:43 -06:00
Li-Ta Lo
fdf7aaece7 Merge topic 'rendering_cpp_cleanup'
ee9c78ca9 Merge branch 'master' into rendering_cpp_cleanup
d05025ce8 simplify comment
066e6a696 I think this is the proper way doing PIMPL
6e75be33e unique_ptr know if itself is valid
50a9efc2f use rvalue ref for parameter
61c002072 cleanup C++ usage, use unique_ptr for PIMPL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3057
2023-05-17 11:18:39 -04:00
Kenneth Moreland
ae908c7129 Merge topic 'fix-iterator-operator'
09c0139b4 Fix operator for IteratorFromArrayPortal

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3035
2023-05-16 19:03:22 -04:00
Gunther Weber
149a6c3a29 Merge topic 'release-deadlock'
58fc4d826 Fix potential deadlock in distributed contour tree

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3024
2023-05-16 17:02:28 -04:00
Kenneth Moreland
b59580bb82 Allow CompositeVectors filter to build any size vector
Using the new `ArrayHandleRuntimeVec` feature, we can construct an array
with any vec sized value.
2023-05-16 12:39:40 -06:00