Commit Graph

11247 Commits

Author SHA1 Message Date
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
415623988f Merge topic 'intel-union-placeholder'
65f6d2aa6 Fix issue with union placeholder on Intel compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3132
2023-09-26 13:35:45 -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
Vicente Bolea
4571db1249 Merge topic 'backport-3128' into release-2.1
2aa04d7c2 ci: fix ctest_memcheck args
2d47ba22b cmake: Add makefile against install test
1b0ea8af8 cmake: update vtkm.pc and vtkm_config.mk file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3134
2023-09-11 21:52:46 -04:00
Vicente Bolea
e6353ac103 Merge branch 'release-2.1' into master 2023-09-11 21:52:46 -04:00
Vicente Adolfo Bolea Sanchez
2aa04d7c23 ci: fix ctest_memcheck args
(cherry picked from commit 1cd6be01c2586a2d567937c03a25ec23d1cda3c0)
2023-09-11 21:01:58 -04:00
Vicente Adolfo Bolea Sanchez
2d47ba22b7 cmake: Add makefile against install test
(cherry picked from commit 5612d26892f172d7e0285fb46f2bd4da2ae76dda)
2023-09-11 19:55:11 -04:00
Vicente Adolfo Bolea Sanchez
1b0ea8af8f cmake: update vtkm.pc and vtkm_config.mk file
(cherry picked from commit 0eb9b68c1e680ee0095341d97c16782b1d65cb08)
2023-09-11 19:55:05 -04:00
Vicente Bolea
e3124450b8 Merge topic 'add-contract-tests'
b555b228b ci: add make and pkg-config to recent imgs
1cd6be01c ci: fix ctest_memcheck args
5612d2689 cmake: Add makefile against install test
0eb9b68c1 cmake: update vtkm.pc and vtkm_config.mk file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3128
2023-09-11 19:54:23 -04:00
Vicente Adolfo Bolea Sanchez
b555b228be ci: add make and pkg-config to recent imgs 2023-09-11 19:23:14 -04:00
Vicente Adolfo Bolea Sanchez
1cd6be01c2 ci: fix ctest_memcheck args 2023-09-11 19:05:46 -04:00
Vicente Adolfo Bolea Sanchez
5612d26892 cmake: Add makefile against install test 2023-09-11 14:27:36 -04:00
Vicente Adolfo Bolea Sanchez
0eb9b68c1e cmake: update vtkm.pc and vtkm_config.mk file 2023-09-11 14:27:30 -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
a333b4550f Merge branch 'release-2.1' 2023-09-07 10:15:42 -04:00
Sujin Philip
1e3cd818fb Merge topic 'fix-clip-centroid-points' into release-2.1
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
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
bd7ac82411 Merge branch 'release-2.1' 2023-08-31 10:28:32 -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
1be389b123 Merge topic 'fix-degenerates' into release-2.1
6e674ddea Fix degenerate polygon removal

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3126
2023-08-31 10:25:59 -04:00
Kenneth Moreland
4bcabd8a77 Merge branch 'release-2.1' 2023-08-31 10:25:59 -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
ec043d9f7a Merge topic 'anari-rendering'
db4c5c3b9 initial implementation of ANARI rendering support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2975
2023-08-30 21:38:30 -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
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
Vicente Bolea
8c226675d8 Merge branch 'release-2.0' into release-2.1 2023-08-29 16:37:14 -04:00
Vicente Bolea
0c86e3277b Merge branch 'release-2.1' 2023-08-29 16:37:14 -04:00
Vicente Bolea
7b53fdfa2d Merge topic 'correct-pkgconfig-include' into release-2.0
f4aa4de0f pkgconfig: fix include flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3127
2023-08-29 16:37:14 -04:00
Vicente Bolea
543fc8c3b2 Merge topic 'correct-pkgconfig-include'
f4aa4de0f pkgconfig: fix include flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3127
2023-08-29 16:37:14 -04:00
Vicente Bolea
426625d901 Merge topic 'correct-pkgconfig-include' into release-2.1
f4aa4de0f pkgconfig: fix include flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3127
2023-08-29 16:37:13 -04:00
Vicente Adolfo Bolea Sanchez
f4aa4de0f2 pkgconfig: fix include flags 2023-08-29 12:42:18 -04: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
Sujin Philip
7fa44ff4a8 Merge topic 'lookupTable-add-one-bp' into release-2.1
e734f14b8 LookupTable: Shift computed idx by 1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3125
2023-08-24 08:10:19 -04:00
Sujin Philip
8ca0146d7d Merge branch 'release-2.1' into master 2023-08-24 08:10:19 -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
Vicente Bolea
9e761f42b0 Merge branch 'release-2.0' 2023-08-22 15:36:02 -04:00
Vicente Bolea
e3af80b84e Merge topic 'update-to-2.1.0'
ef0ae020e release: 2.1.0-rc1 release notes
93ac01b18 release: update version and License
5cd85b359 Merge remote-tracking branch 'origin/master' into update-to-2.1.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3123
2023-08-22 15:36:02 -04:00
Vicente Adolfo Bolea Sanchez
c79bb5b07b 2.1.0-rc1 is our 16th official release of VTK-m.
The major changes to VTK-m from (previous release) can be found in:
  docs/changelog/2.1/release-notes.md
v2.1.0-rc1
2023-08-22 11:03:25 -04:00