Commit Graph

589 Commits

Author SHA1 Message Date
Zhe Wang
01f21a59b8 Merge topic 'add_MergeDataSet_filter'
725407235 add merge data sets filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3148
2023-11-21 20:09:28 -05:00
Wang
7254072357 add merge data sets filter 2023-11-21 15:31:59 -05:00
Kenneth Moreland
5b8c282e9f Continue transfer of Users' Guide text
These changes complete the using part of the guide.
2023-11-21 10:33:45 -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 Bolea
dce2d41914 Merge topic 'update-newrelease'
d7656c029 update NewRelease.md.tmpl

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3141
2023-11-17 18:48:39 -05:00
Nrushad Joshi
55a08d51b7 Isosurface Uncertainty Visualization Filter 2023-11-15 21:04:37 -05: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
Kenneth Moreland
b261d23876 Allow turning off todo notes in user's guide 2023-10-24 15:47:17 +11:00
Vicente Adolfo Bolea Sanchez
692d19c5dc docs: edit docs/requirements.txt 2023-10-20 18:10:48 -04:00
Vicente Adolfo Bolea Sanchez
4e04fcb08a docs: edit docs/requirements.txt 2023-10-20 17:35:30 -04:00
Vicente Adolfo Bolea Sanchez
6daebf9ffe docs: edit docs/requirements.txt 2023-10-20 17:32:51 -04:00
Vicente Adolfo Bolea Sanchez
0a9538a8dc docs: edit docs/requirements.txt 2023-10-20 17:26:25 -04:00
Vicente Adolfo Bolea Sanchez
fe8decf7c0 docs: edit docs/requirements.txt 2023-10-20 16:42:39 -04:00
Vicente Adolfo Bolea Sanchez
c8c5b964dd docs: edit docs/requirements.txt 2023-10-20 16:07:13 -04:00
Vicente Adolfo Bolea Sanchez
6cb991e8e2 docs: add docs/requirements.txt 2023-10-20 16:02:01 -04:00
Vicente Bolea
c96c34ad54 Merge topic 'update-to-2.1.0'
599d8ff38 release: 2.1.0-rc2 release notes
05e850fa8 release: update version and License

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3140
2023-10-19 15:01:51 -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
Vicente Adolfo Bolea Sanchez
d7656c029b update NewRelease.md.tmpl 2023-10-18 19:01:16 -04:00
Vicente Adolfo Bolea Sanchez
599d8ff384 release: 2.1.0-rc2 release notes 2023-10-18 18:24:12 -04: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
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
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 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
5612d26892 cmake: Add makefile against install test 2023-09-11 14:27:36 -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
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
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
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
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
Vicente Adolfo Bolea Sanchez
ef0ae020ed release: 2.1.0-rc1 release notes 2023-08-22 11:03:25 -04: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
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
67b7543a30 Adding documentation for flow filter restructure 2023-08-17 10:31:36 -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
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
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
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
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
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
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
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
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
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
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
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
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
Kenneth Moreland
09c0139b4e Fix operator for IteratorFromArrayPortal
There was an error in `operator-=` for `IteratorFromArrayPortal` that went
by unnoticed. The operator is fixed and regression tests for the operators
has been added.
2023-05-16 09:31:17 -06:00
Kenneth Moreland
3c1afe53dc Fix new instances of ArrayHandleRuntimeVec in UnknownArrayHandle
`UnknownArrayHandle` is supposed to treat `ArrayHandleRuntimeVec` the
same as `ArrayHandleBasic`. However, the `NewInstance` methods were
failing because they need custom handling of the vec size.
2023-05-12 13:11:23 -06:00
Louis Gombert
1538fc02fb Implement Flying Edges for all structured CellSets
In addition to  using uniform coordinates, the ContourFlyingEdges filter can now process any type of coordinate system, making the  filter use Flying Edges in more cases
2023-05-10 15:20:53 +02:00
Louis Gombert
dcdda3065a Split flying edges and marching cells into separate filters
In order to compile the contour filter more efficiently, we split the contour filter into two separate translation units, corresponding to the new filters ContourFlyingEdges and ContourMarchingCells. The API for Contour filter is left totally unchanged, and tries to use flying edges if the dataset is structured and uniform.
All three contour filters inherit from the `AbstractContour` class, providing utility methods used in the implementations.
2023-05-04 15:20:20 +02:00
Louis Gombert
1d272592e3 Tetrahedralize and Triangulate filters check if input is already triangulated
Previously, tetrahedralize/triangulate would blindly convert all the cells to tetrahedra/triangles, even when they were already. Now, the dataset is directly returned if the CellSet is a CellSetSingleType of tetras/triangles, and no further processing is done in the worklets for CellSetExplicit when all shapes are tetras or triangles.
2023-04-24 12:37:11 +02:00
Kenneth Moreland
de28a43510 Add an entry to VariantUnion to help compiler copy structs
I've been seeing errors in a nightly build that compiles for CUDA Pascal
using GCC5. The issue is that one of the `ArrayHandleMultiplexer` tests
is failing to copy an implicit array correctly. I think the problem is
that in this test the first and second type of the `Variant` are the same
size, but the first type has some padding in the middle whereas the
second type does not. When using this second type, the values in the
same position of the padding of the first type don't seem to be
initialized properly in the kernel invocation.

My nonexhaustive experiment shows that things work OK as long as the
first type is large enough and has no fillers. Enforce this by adding an
internal entry to the union that is completely full.
2023-04-19 11:14:48 -06:00
Louis Gombert
627b757733 Merge topic 'continuous-scatterplot'
4ba15a993 Add new ContinuousScatterPlot filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3028
2023-04-14 12:01:15 -04:00
Louis Gombert
4ba15a993d Add new ContinuousScatterPlot filter
This new filtered designed for bi-variate analysis builds the continuous scatterplot of a 3D tetrahedralized mesh for two given scalar point fields. The continuous scatterplot is an extension of the discrete scatterplot for continuous bi-variate analysis.
2023-04-14 10:00:33 +02:00
Sujin Philip
1261e459d3 Clip: Remove unused points
The clip filter used to copy the input points and point fields as is,
regardless of if they were actually part of the output. With this change,
we track which input points are actually part of the output and copy
only those values.

Address: #112
2023-04-11 14:35:25 -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
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
Dave Pugmire
6a516de22e Add entry for change log. 2023-03-20 10:58:28 -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
Kenneth Moreland
f545feba8f Add changelog for documenting data license 2023-03-14 12:25:21 -06: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
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
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 Bolea
5bf0bd57ae Merge topic 'remove-cxx11-references'
ecd4a68ff cxx,c++: Remove c++14 references

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2999
2023-02-24 11:40:27 -05: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
Vicente Adolfo Bolea Sanchez
3650b9efd9 release,docs: add freeze release branch step
fixes: #760
2023-02-23 19:14:51 -05:00
Vicente Adolfo Bolea Sanchez
6cd849d703 roadmap: update dates 2023-02-22 12:27:53 -05:00
Vicente Bolea
17bee1070b Merge topic 'update-to-2.0.0'
dd79a487a release: 2.0.0 release notes
f6b087689 release: update version and License

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2988
2023-02-20 13:27:25 -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
Vicente Adolfo Bolea Sanchez
dd79a487a7 release: 2.0.0 release notes 2023-02-18 18:37:26 -05: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
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
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
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
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
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
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
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