Commit Graph

7293 Commits

Author SHA1 Message Date
Li-Ta Lo
9958394fa6 tidy-up language usage and coding style conformation 2022-02-02 09:52:51 -07:00
Abhishek Yenpure
53651c82bf Merge topic 'mir-float-fix'
ae98d4f25 Fixing dashboard warnings
a0a333949 Fixing dashboard warnings
d3756d8ef Fixing dashboard warnings
397ffaad2 Fixing dashboard warnings
7f2badfce Fixing dashboard warnings
4db0cecc1 Fixing dashboard warnings
8ddcad824 Fixing dashboard warnings
7d10b4f32 Adding assert to unit test
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2674
2022-02-02 11:48:31 -05:00
Abhishek Yenpure
ae98d4f25f Fixing dashboard warnings 2022-02-02 21:14:01 +05:30
Kenneth Moreland
9e0a38f5db Remove unused typedef
The `StorageListEfficientExtract` type is never used in
`UnitTestSerializationArrayHandle`. Although these types are used,
because they all support efficient component extraction from the array,
there is no need to treat them special. As such, this list was never
used.
2022-02-02 08:13:33 -07:00
Abhishek Yenpure
a0a3339490 Fixing dashboard warnings 2022-02-02 19:15:22 +05:30
Abhishek Yenpure
d3756d8ef3 Fixing dashboard warnings 2022-02-02 18:58:55 +05:30
Abhishek Yenpure
397ffaad21 Fixing dashboard warnings 2022-02-02 18:26:07 +05:30
Li-Ta Lo
b3327e544a move auto field = ... around to minimize accidential capture 2022-02-02 05:45:24 -07:00
Abhishek Yenpure
7f2badfce3 Fixing dashboard warnings 2022-02-02 18:00:05 +05:30
Abhishek Yenpure
4db0cecc1f Fixing dashboard warnings 2022-02-02 17:12:30 +05:30
Abhishek Yenpure
8ddcad824c Fixing dashboard warnings 2022-02-02 16:15:12 +05:30
Kenneth Moreland
5063527bb7 Document that an inefficient component extract warning is expected
When calling `ArrayExtractComponent`, some arrays cannot really have a
component extracted. In this case there is a fallback and a warning is
generated.

Of course it is good to test this behavior. The
`UnitTestArrayExtractComponent` does test this and as such generates
this warning (intentionally). Add a note to the output that this warning
is expected.
2022-02-01 15:25:40 -07:00
Manish Mathai
2c16e9c05e Prevent error being raised for coincident points in Tube filter
Coincident points in polylines will be skipped when generating the
tubes, instead of raising an error.
2022-02-01 13:13:12 -08:00
Li-Ta Lo
455c204373 Migrate field_transform 2022-02-01 11:51:01 -07:00
Kenneth Moreland
e16fa28d6d Fix range warning in ArrayHandleCast
`ArrayHandleCast` was giving warnings about casting to a type that could
not hold the range to the source even when that was not true. The
problem was it was using `std::numeric_limits::min` for the lower end of
the range. But for floating point values, `min` is not really `min`.
Rather, it is the smallest representable number. (This is probably a C++
bug we are stuck with.) You really need to use `lowest`.
2022-02-01 11:42:16 -07:00
Kenneth Moreland
2aed0b81c3 Avoid inefficient component extractions in serialization test
The actually serialization was not doing any inefficient component
extraction, but the array handle comparisons were. This made it hard to
verify that the actual serialization was not being slow. Fixed the
comparison to make sure that it only used efficient paths.
2022-02-01 10:58:55 -07:00
Kenneth Moreland
c3b6febb27 Fix ArrayHandleMultiplexer exec test
One of the tests was to make sure that the `ArrayHandleMultiplexer` is
working in the exec environment. It was doing this with an `ArrayCopy`.
However, the `ArrayCopy` was falling back to the host, so the test was
not doing what was expected.

Now use `DeviceAdapterAlgorithm::Copy` to force the array to work on the
device.
2022-02-01 09:28:43 -07:00
Kenneth Moreland
4b30939dda Fix inefficient copy when extracting rectilinear grids
The `ExtractStructured` code was calling `ArrayCopy` on a permutation of
odd arrays, which was causing problems with the copy. Specifically use
`ArrayCopyDevice` to ensure the copy happens efficiently.
2022-02-01 09:21:43 -07:00
Li-Ta Lo
607e8d988d remove vtkm_filter_common 2022-01-31 14:29:34 -07:00
Li-Ta Lo
8113d15ef7 Merge branch 'master' into field_conversion
# Conflicts:
#	benchmarking/BenchmarkFilters.cxx
#	vtkm/filter/CMakeLists.txt
#	vtkm/filter/testing/UnitTestSplitSharpEdgesFilter.cxx
2022-01-31 14:08:02 -07:00
Li-Ta Lo
c61f732101 Merge topic 'vector_calculus'
79afd73b3 explicitly use CoordinateSystem as input field
cdc4c29c5 renamve vector_calculus -> vector_analysis
63d4b02ad add ALL_BACKENDS
c60d9e64d migrate SurfaceNormal, VectorMagnitude
59cc8cbae Migrate Gradient filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2693
2022-01-31 14:37:14 -05:00
Li-Ta Lo
f5eb84f646 move worklet/histogram to filter/density_estimate/worklet 2022-01-31 12:17:44 -07:00
Li-Ta Lo
79afd73b31 explicitly use CoordinateSystem as input field 2022-01-31 09:52:25 -07:00
Li-Ta Lo
cdc4c29c5f renamve vector_calculus -> vector_analysis 2022-01-31 08:58:38 -07:00
Kenneth Moreland
45e9b7fa76 Merge topic 'vectraits-range'
ca032801a Allow ArrayExtractComponent to work with Vec-like value types
f48b4b761 Add implementation of VecTraits for Range and Bounds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Gunther Weber <ghweber@lbl.gov>
Merge-request: !2683
2022-01-31 10:15:12 -05:00
Abhishek Yenpure
7d10b4f32d Adding assert to unit test 2022-01-31 11:46:28 +05:30
Abhishek Yenpure
2779bc9d44 Fixing conversion warnings 2022-01-31 10:22:09 +05:30
Li-Ta Lo
2ab05f2613 remove unneeded #include of Worklet headers 2022-01-30 17:09:31 -07:00
Li-Ta Lo
63d4b02ad2 add ALL_BACKENDS 2022-01-30 16:54:25 -07:00
Li-Ta Lo
171e4ba9a2 uses DEVOCE_SOURCES 2022-01-30 16:52:26 -07:00
Li-Ta Lo
1e303d3d3d add missing newline 2022-01-30 16:06:51 -07:00
Li-Ta Lo
93b9f5d746 restore vtkm_filter_common with a dummy .cxx 2022-01-30 16:05:15 -07:00
Li-Ta Lo
c60d9e64dd migrate SurfaceNormal, VectorMagnitude 2022-01-30 14:31:52 -07:00
Li-Ta Lo
59cc8cbaeb Migrate Gradient filter 2022-01-30 12:18:22 -07:00
Li-Ta Lo
f08a3185f8 Migrate FieldConversion filters 2022-01-29 13:12:01 -07:00
Abhishek Yenpure
9b82e75ac0 Fixing the type of reduce accumulator 2022-01-29 09:23:58 +05:30
Li-Ta Lo
4fa5f2f29c Merge topic 'new_contour'
af87308b9 better type safety, coding style conformation
16b8ed769 Merge branch 'new_contour' of gitlab.kitware.com:ollielo/vtk-m into new_contour
d8fdda5c3 use the new CreateResult
3a9e9f1ac Merge branch 'master' into new_contour
83c6032c9 minor update
1b028ab61 delete unused worklet unit test
175f9010a Merge branch 'master' into new_contour
5e991e4bf Merge branch 'master' into new_contour
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2669
2022-01-28 15:13:34 -05:00
Li-Ta Lo
af87308b91 better type safety, coding style conformation 2022-01-28 12:20:01 -07:00
Vicente Bolea
9334986821 Merge topic 'cell-centered-advection'
91631760a Missing changes for cell centered velocity fields

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2663
2022-01-28 12:45:08 -05:00
Li-Ta Lo
d8fdda5c37 use the new CreateResult 2022-01-28 08:48:26 -07:00
Li-Ta Lo
3a9e9f1ac1 Merge branch 'master' into new_contour 2022-01-28 07:34:35 -07:00
Abhishek Yenpure
3b95d06140 Removing debug print statements 2022-01-28 18:52:09 +05:30
Abhishek Yenpure
d8af004e8b Removing undefined method error 2022-01-28 17:48:38 +05:30
Abhishek Yenpure
91631760a7 Missing changes for cell centered velocity fields 2022-01-27 20:07:53 -05:00
Li-Ta Lo
83c6032c94 minor update 2022-01-27 13:44:01 -07:00
Kenneth Moreland
5bd60a0b77 Add CreateResult to NewFilter and absorb field mapping
The original version of `Filter` classes had a helper header file named
`CreateResult.h` that had several forms of a `CreateResult` function that
helped correctly create the `DataSet` to be returned from a filter's
`DoExecute`. With the move to the `NewFilter` structure, these functions
did not line up very well with how `DataSet`s should actually be created.

A replacement for these functions have been added as protected helper
methods to `NewFilter` and `NewFilterField`. In addition to moving them
into the filter themselves, the behavior of `CreateResult` has been merged
with the map field to output functionality. The original implementation of
`Filter` did this mapping internally in a different step. The first design
of `NewFilter` required the filter implementer to call a
`MapFieldsOntoOutput` themselves. This new implementation wraps the
functionality of `CreateResult` and `MapFieldsOntoOutput` together so that
the `DataSet` will be created correctly with a single call to
`CreateResult`. This makes it easier to correctly create the output.
2022-01-27 13:27:39 -07:00
Abhishek Yenpure
1bee90c597 Adding VTKM_EXEC tag to test worklets 2022-01-27 19:11:36 +05:30
Abhishek Yenpure
9b1aebe2d6 Adding debug updates 2022-01-26 22:44:26 -08:00
Li-Ta Lo
1b028ab612 delete unused worklet unit test 2022-01-26 13:51:21 -07:00
Li-Ta Lo
175f9010a5 Merge branch 'master' into new_contour 2022-01-26 13:43:46 -07:00
Manish Mathai
ae17410f2f Merge topic 'volume-renderer-oob-fix'
36822756b Fix out of bounds cell location searchs in VolumeRendererStructured

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2685
2022-01-26 14:13:28 -05:00
Manish Mathai
36822756b9 Fix out of bounds cell location searchs in VolumeRendererStructured
`RectilinearLocator::LocateCell` and `UniformLocator::LocateCell` assume
that the point in inside the bounds of the cell set, but may return a
cell location that does not exist, i.e., cell location that is outside
of the bounds of the cell set due to errors from floating point
operations.

This fix, given the assumption above, bounds the calculated cell
location to within the cellset by capping the indices to within the
limits.
2022-01-26 09:27:05 -08:00
Li-Ta Lo
0270367004 use CastAndCallScalarField 2022-01-25 12:18:15 -07:00
Kenneth Moreland
ca032801a8 Allow ArrayExtractComponent to work with Vec-like value types
Before, `ArrayExtractComponent` only worked with `Vec` types. Anything
that was not specifically a `Vec` was assumed to be a basic component
even if it had `VecTraits`. This was changed to extract components out
of anything that has `VecTraits`. The assumption is that all components
of the Vec-like object are packed tightly in the object.

This allows `ArrayExtractComponent` to work with objects like
`vtkm::Range` and `vtkm::Bounds` and extract their parts as expected.
2022-01-25 10:55:41 -07:00
Kenneth Moreland
f48b4b761e Add implementation of VecTraits for Range and Bounds
Added specializations of `vtkm::VecTraits` for the simple structures of
`vtkm::Range` and `vtkm::Bounds`. This expands the support for using
these structures in things like `ArrayHandle` and `UnknownArrayHandle`.
2022-01-25 10:55:35 -07:00
Li-Ta Lo
2540fb1b27 Merge branch 'master' into new_connected_components 2022-01-25 10:15:57 -07:00
Kenneth Moreland
ab86763c74 Merge topic 'cast-and-call-field'
32507a510 Update CrossProduct filter to new filter base class
72065024a Add CastAndCallScalarField and CastAndCallVecField to NewFilterField

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2681
2022-01-25 10:28:55 -05:00
Kenneth Moreland
ff43a2efa5 Merge topic 'universal-dot-product-filter'
0c47645ba Remove DotProduct from worklet directory
d76929a78 Allow dot product to work with any field type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2682
2022-01-25 10:11:05 -05:00
Kenneth Moreland
32507a5109 Update CrossProduct filter to new filter base class
This also provides a good opportunity to demonstrate and test the
CastAndCallVecField method of the new filter classes.
2022-01-25 07:23:48 -07:00
Kenneth Moreland
0c47645bad Remove DotProduct from worklet directory
All worklets are now encapsulated in the DotProduct filter.
2022-01-24 15:05:40 -07:00
Kenneth Moreland
d76929a788 Allow dot product to work with any field type
The previous implementation of the `DotProduct` filter only worked with
arrays containing "common" types. The filter has been updated to use the
extract component feature of `UnknownArrayHandle` to support computing
the dot product of arrays of almost any type.
2022-01-24 15:02:20 -07:00
Kenneth Moreland
72065024aa Add CastAndCallScalarField and CastAndCallVecField to NewFilterField
These methods somewhat simplify doing the `CastAndCall` from an
`UnknownArrayhandle` that comes from an input field.

The motivation for this change is for the User's guide, where I am
having a chicken-and-egg problem of wanting to describe how to make a
simple filter implementation without having to go into details about
`UnknownArrayHandle`.
2022-01-24 14:18:53 -07:00
Kenneth Moreland
170a10e4b4 Fix slow ArrayCopy calls
The `ArrayCopy` method has been changed to be precompiled. It handles
most standard array types. But there are some special `ArrayHandle`
types that are not correctly handled, and these go to a slow fallback.
Find places in the code that use that fallback and fix them.

There are also some instances of replacing an `ArrayHandleCounting` with
an `ArrayHandleIndex`. This change is probably not strictly necessary to
make the `ArrayCopy` faster, but when it can be used `ArrayHandleIndex`
is generally better.
2022-01-24 14:15:45 -07:00
Kenneth Moreland
63c45efc04 GenerateIds filter does not require device compiler 2022-01-24 14:05:58 -07:00
Kenneth Moreland
245fc3a983 Compile IO library without device compiler 2022-01-24 12:17:23 -07:00
Kenneth Moreland
9b017f4f95 Correct inefficient extract component for decorating arrays
Many arrays decorate other arrays but still allow an efficient component
extraction. However, the component can only be extracted if it can be
efficiently extracted from the array being decorated. In this case, the
array reported that it could efficiently extract even though it could
not.

Fixed this by having the `ArrayExtractComponentImpl` classes inherit
from the respective superclass. This will in turn inhert the
`ArrayExtractComponentImplInefficient` if it is the base class.
2022-01-24 12:17:23 -07:00
Kenneth Moreland
392d781359 Add ArrayCopy specialization for Counting and Permutation array
This required adding another source file.
2022-01-24 12:17:23 -07:00
Kenneth Moreland
f3c82bfea7 Add ArrayCopy fast paths
There are some common uses of `ArrayCopy` that don't use basic arrays.
Rather than move away from `ArrayCopy` for these use cases, compile a
special fast path for these cases.

This required some restructuring of the code to get the template
resolution to work correctly.
2022-01-24 12:17:23 -07:00
Kenneth Moreland
00609b0af2 Make ArrayCopy not depend on a device compiler
Rather than require `ArrayCopy` to create special versions of copy for
all arrays, use a precompiled versions. This should speed up compiles,
reduce the amount of code being generated, and require the device
compiler on fewer source files.

There are some cases where you still need to copy arrays that are not
well supported by the precompiled versions in `ArrayCopy`. (It will
always work, but the fallback is very slow.) In this case, you will want
to switch over to `ArrayCopyDevice`, which has the old behavior.
2022-01-24 12:17:23 -07:00
Kenneth Moreland
aefc753329 Implement permutation mapping in vtkm_cont
There was a precompiled version of mapping permutations in the
filter library. However, there are reasons to be able to copy
a permutation of an array outside of filters. So add the
capability to the more general filter library.
2022-01-24 12:17:23 -07:00
Kenneth Moreland
2b8d89fd50 Fix Fill for ArrayHandleView
The Fill method in the storage was filling the wrong buffers.
2022-01-24 12:17:23 -07:00
Li-Ta Lo
578f980ac4 Merge branch 'master' into new_connected_components
# Conflicts:
#	vtkm/filter/CMakeLists.txt
#	vtkm/filter/testing/CMakeLists.txt
2022-01-24 12:11:33 -07:00
Li-Ta Lo
af37ecd54d make fields associate with mesh 2022-01-24 09:19:24 -07:00
Abhishek Yenpure
bb27a0f8fe Adding debug updates 2022-01-23 22:42:07 -08:00
Abhishek Yenpure
16f15c94b9 Adding fixes to identify degenerate cells 2022-01-22 21:06:28 -08:00
Li-Ta Lo
ee1b752e8e Merge branch 'master' into new_connected_components 2022-01-22 10:12:25 -07:00
Li-Ta Lo
71ec80a3bd Merge branch 'master' into density_estimate 2022-01-22 09:07:52 -07:00
Li-Ta Lo
ac6a93003d minor update based on code review 2022-01-22 08:39:10 -07:00
Li-Ta Lo
61e2a620a9 document why a .ResetCellSetList is necessary 2022-01-20 15:17:18 -07:00
Kenneth Moreland
ced89bb396 Move internal functions into top level anonymous namespace 2022-01-20 15:16:03 -07:00
Li-Ta Lo
e8278094f9 migrate Mask
tidy up language and library usage

update benchmark
2022-01-20 15:14:37 -07:00
Li-Ta Lo
679f1b00e9 migrate GhostCellRemove and Threshold 2022-01-20 15:10:22 -07:00
Li-Ta Lo
7e08f4fb1b Migrate ExtractStructured
DoMapField

add back deprecated ExtractStructured.h
2022-01-20 15:10:20 -07:00
Li-Ta Lo
e3703b09cf migrate ExtractGeometry 2022-01-20 15:02:59 -07:00
Abhishek Yenpure
4556eed085 Adding more debug 2022-01-19 16:43:35 -08:00
Li-Ta Lo
1d3c387936 add ALL_BACKENDS 2022-01-19 13:55:42 -07:00
Li-Ta Lo
5f9ee86f28 migrate particle density filters 2022-01-19 10:34:43 -07:00
Julien Schueller
a6dcac2cb1 Fix build with MinGW
Co-authored-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2022-01-19 16:41:42 +00:00
Abhishek Yenpure
ed616d7206 Adding print to debug 2022-01-19 08:27:34 -08:00
Li-Ta Lo
271e023354 migrate Entropy and ND filters 2022-01-19 07:20:48 -07:00
Abhishek Yenpure
b4f9f17aa4 Adding print to debug 2022-01-18 23:07:34 -08:00
Abhishek Yenpure
b18d375746 Adding print to debug 2022-01-18 22:56:34 -08:00
Abhishek Yenpure
70bb70f61d Adding print to debug 2022-01-18 22:27:45 -08:00
Abhishek Yenpure
39778a93cf Adding print to debug 2022-01-18 22:20:21 -08:00
Li-Ta Lo
c4a7444b02 migrate Histogram filter 2022-01-17 09:18:42 -07:00
Li-Ta Lo
de66d93d05 Add ALL_BACKENDS 2022-01-16 14:13:10 -07:00
Li-Ta Lo
77650a9ca0 migrate connected components filters 2022-01-16 12:15:03 -07:00
Abhishek Yenpure
dc37c48a1f Adding updates to unit test 2022-01-14 13:30:28 -08:00
Li-Ta Lo
5e991e4bf4 Merge branch 'master' into new_contour
# Conflicts:
#	benchmarking/BenchmarkFilters.cxx
#	vtkm/filter/CMakeLists.txt
#	vtkm/filter/clean_grid/CMakeLists.txt
#	vtkm/filter/clean_grid/CleanGrid.cxx
#	vtkm/filter/clean_grid/testing/CMakeLists.txt
#	vtkm/filter/clean_grid/testing/UnitTestCleanGrid.cxx
#	vtkm/filter/contour/testing/RenderTestContourFilter.cxx
#	vtkm/filter/contour/testing/UnitTestContourFilter.cxx
#	vtkm/filter/entity_extraction/CMakeLists.txt
#	vtkm/filter/entity_extraction/ExternalFaces.cxx
#	vtkm/filter/entity_extraction/ExtractPoints.cxx
#	vtkm/filter/entity_extraction/MaskPoints.cxx
#	vtkm/filter/entity_extraction/ThresholdPoints.cxx
#	vtkm/filter/testing/CMakeLists.txt
#	vtkm/filter/testing/UnitTestMultiBlockFilter.cxx
#	vtkm/worklet/testing/UnitTestOrientNormals.cxx
2022-01-14 13:31:01 -07:00
Li-Ta Lo
25224e0e4a Merge topic 'NewFilter'
36fbc019a prevent shadowing for older GCC
63b9b1275 MapperWireframer.cxx really should include Algorithm.h
fa0905e3e migrate clean_grid and extract_entity filters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2665
2022-01-14 09:31:41 -05:00