Commit Graph

674 Commits

Author SHA1 Message Date
Kenneth Moreland
98f20ec269 Use a worklet to permute fields rather than ArrayHandlePermutation
According to talks with Rob Maynard, using a worklet should be
(counterintuitively) faster than using ArrayHandlePermutation with
ArrayCopy.

This change also gives an opportunity to handle invalid indices, which
may be intentionally set when no mapping is available for that value.
For this case, MapFieldPermutation now takes an invalidValue argument to
set such values.
2020-05-21 08:34:30 -06:00
Kenneth Moreland
4a5dbb65db Convert CleanGrid (and dependents) to use precompiled field map 2020-05-21 08:34:29 -06:00
Kenneth Moreland
2383a7fffd Add MapFieldPermutation function
This function is compiled into the vtkm_filter library, so all filters
can implement this type of mapping without providing their own version
of compiling it.

Because we only compile it once, we provide more types to convert.
Hopefully the total compile time balances out.
2020-05-21 08:34:28 -06:00
Kenneth Moreland
934732bb64 Add MapFieldPermutation function
This function is compiled into the vtkm_filter library, so all filters
can implement this type of mapping without providing their own version
of compiling it.

Because we only compile it once, we provide more types to convert.
Hopefully the total compile time balances out.
2020-05-21 08:33:48 -06:00
Robert Maynard
0d2678368b Merge topic 'image_median_inline_constructor'
9dd7b8b48 filter::ImageMedian can be used in multiple compilation units

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2102
2020-05-21 09:15:25 -04:00
Kenneth Moreland
d4ff67a226 Merge topic 'deprecate-execute-with-policy'
544a078cd Remove use of deprecated policies in examples
06f5119c2 Fix deprecation warning
f29a4712b Correct field types for ComputeMoments filter
a20ec03d0 Disable proxies in filter benchmark
72cd0107e Deprecate Execute with policy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2093
2020-05-20 18:28:37 -04:00
Kenneth Moreland
544a078cdb Remove use of deprecated policies in examples
This means that the filters in the examples will no longer properly
support the policies handed to them, but that is the direction we are
headed as the policies are now deprecated.
2020-05-20 12:58:24 -06:00
Sudhanshu Sane
10dc96cb87 Remove extra count variable 2020-05-20 10:30:16 -07:00
Sudhanshu Sane
536249f634 Merge remote-tracking branch 'upstream/master' into lagrangian_bugfix 2020-05-20 10:15:47 -07:00
Robert Maynard
9dd7b8b487 filter::ImageMedian can be used in multiple compilation units
The header was previously not marked inline and therefore
you could only have a single instance of the filter compiled
in a dynamic library / executable
2020-05-20 08:44:45 -04:00
Kenneth Moreland
0612be9c5b Move VTKDataSetReaderBase code to vtkm_io
Most of this code is not templated methods. Rather, it implements over
several types to call templated functions, which creates quite a bit of
code. Rather than have all code using a reader recompile the code, just
compile it once and put it in a library.
2020-05-19 12:27:01 -06:00
Kenneth Moreland
f29a4712b0 Correct field types for ComputeMoments filter
This filter is designed to work on vectors of many sizes. It was written
when selecting field types was the responsibility of the policy. It is
now the responsibility of the filter to specify possible field types.

This change is required to compile the MomentInvariants module for VTK
without policies.
2020-05-18 18:39:22 -06:00
Kenneth Moreland
72cd0107ee Deprecate Execute with policy
The version of `Filter::Execute` that takes a policy as an argument is now
deprecated. Filters are now able to specify their own fields and types,
which is often why you want to customize the policy for an execution. The
other reason is that you are compiling VTK-m into some other source that
uses a particular types of storage. However, there is now a mechanism in
the CMake configuration to allow you to provide a header that customizes
the "default" types used in filters. This is a much more convenient way to
compile filters for specific types.

One thing that filters were not able to do was to customize what cell sets
they allowed using. This allows filters to self-select what types of cell
sets they support (beyond simply just structured or unstructured). To
support this, the lists `SupportedCellSets`, `SupportedStructuredCellSets`,
and `SupportedUnstructuredCellSets` have been added to `Filter`. When you
apply a policy to a cell set, you now have to also provide the filter.
2020-05-18 12:38:41 -06:00
NAThompson
d961c185ac Deprecate ReadPortal().Get pattern. 2020-05-12 15:43:40 -04:00
Sudhanshu Sane
5198447820 Fix order of initialized seeds to match output format 2020-05-12 11:18:33 -07:00
Robert Maynard
51e600e7e2 Remove no_discard warnings from unneeded calls of a rng 2020-05-12 09:38:18 -04:00
Nick
990ae4b9a6 Merge topic 'readportalget2'
afe9c2a2b Update UnitTestTimer.cxx
46faf574f ReadPortal().Get(idx) is slow in a loop.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2078
2020-05-08 18:25:14 -04:00
Li-Ta Lo
08da38bd49 use the new VTKDataSetReader 2020-05-08 11:14:47 -06:00
NAThompson
46faf574fa ReadPortal().Get(idx) is slow in a loop. 2020-05-08 11:30:59 -04:00
Li-Ta Lo
8c0787b5de Merge branch 'master' into marching_cell_wedge 2020-05-07 16:51:35 -06:00
Li-Ta Lo
aef44b5c97 change sample input file in unit test 2020-05-05 14:24:21 -06:00
Li-Ta Lo
52f0d5b2d5 Fix MarchingCell for Wedge
Fixed error in one entry of number_of_triangles table for MarchineCells that results in missing triangles for wedge cell type as reported by issue #496.
2020-05-04 15:32:41 -06:00
Robert Maynard
1e5c19a285 ContourTreeUniformAugmented compiles with visual studio + cuda 2020-05-04 12:02:56 -04:00
Nick
becb289694 Merge topic 'deprecate_reader'
9a68931c0 Do not add half-baked 1.6 release notes; let Robert consolidate release notes.
01b61be46 Start release notes for 1.6
697369fc1 Remove deprecation warnings throughout the project.
d610176ab First commit demos backwards compatibility and printing of warnings.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2067
2020-05-01 07:53:21 -04:00
Kenneth Moreland
1c703b94c4 Merge topic 'filter-specifies-own-field-types'
882dcacca Have filter specify its own field types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2064
2020-04-30 10:01:20 -04:00
NAThompson
697369fc14 Remove deprecation warnings throughout the project. 2020-04-30 08:12:04 -04:00
NAThompson
b82051746c Test that no warnings are generated and tests pass. 2020-04-29 11:30:18 -04:00
Kenneth Moreland
882dcacca4 Have filter specify its own field types
Previously, the policy specified which field types the filter should
operate on. The filter could remove some types, but it was not able to
add any types.

This is backward. Instead, the filter should specify what types its
supports and the policy may cull out some of those.
2020-04-28 10:31:44 -06:00
Robert Maynard
f06a5db9af Merge topic 'add_gitlab_ci'
d7ab1a608 Improve parallelization when compiling filter tests
142d151ca Update CONTRIBUTING.md to cover gitlab piplines
5bc09b976 Add gitlab-ci infrastructure
ef7ef5fb2 Add documentation for the what/why of using Gitlab ci
36d1a2d6a Add dockerfiles to be used by VTK-m Gitlab ci
b16e4fc17 Add ECP CI support to vtk-m

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1987
2020-03-26 15:39:28 -04:00
Robert Maynard
d7ab1a6084 Improve parallelization when compiling filter tests 2020-03-26 13:40:47 -04:00
Vicente Bolea
a25f023413 Merge topic 'fix-418-gradient-throw-error'
df2dba346 throws an exception if Gradient input is scalar

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2009
2020-03-26 09:55:56 -04:00
Robert Maynard
e1ccaced3e Merge topic 'add_flying_edges'
91c56d680 Update Contour tests to be aware of flying edge output
1b256281f Convert contour worklet to expect isovalues to a std::vector
c2bab6c6b Introduce FlyingEdges for 3d structured datasets
1995e5204 Correct minor issues from refactoring MarchingCells worklets
d3512879d Remove unneeded template parameters from Gradient.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2005
2020-03-25 16:53:21 -04:00
Vicente Adolfo Bolea Sanchez
df2dba3467 throws an exception if Gradient input is scalar
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-03-25 12:08:47 -04:00
Robert Maynard
91c56d680c Update Contour tests to be aware of flying edge output 2020-03-25 08:23:10 -04:00
Robert Maynard
1b256281f4 Convert contour worklet to expect isovalues to a std::vector
This reduces an ugly component of the Contour API
2020-03-25 08:23:10 -04:00
Kenneth Moreland
42bc9a393c Fix gaps in type support
With recent changes to allow a configuration to change the default
types, storage, and cell sets, it is possible to feed filters and other
components types they were not previously expecting. Fix feature gaps
where these components were not accepting the types they should.
2020-03-19 17:07:11 -06:00
Kenneth Moreland
dc112b5169 Enable changing policy used for library compiles
Previously, the PolicyDefault used to compile all the filters was hard-
coded. The problem was that if any external project that depends on VTK-
m needs a different policy, it had to recompile everything in its own
translation units with a custom policy.

This change allows an external project provide a simple header file that
changes the type lists used in the default policy. That allows VTK-m to
compile the filters exactly as specified by the external project.
2020-03-19 15:07:07 -06:00
Kenneth Moreland
783bc15ffd Do not rely on implict copy constructors when destructor defined
As a general C++ "rule of three," if one of a copy constructor, copy
assignment, or destructor is defined, all three should be defined. Some
compilers issue warnings if this rule of three is violated.

It is sometimes the case that we define a destructor simply because it
is only valid in the control environment. When doing so, add
implementations for copy constructor and assignment as well.
2020-03-18 14:53:14 -06:00
Kenneth Moreland
10e8a4a7f9 Remove locking control ArrayPortals
Previously, when a ReadPortal or a WritePortal was returned from an
ArrayHandle, it had wrapped in it a Token that was attached to the
ArrayHandle. This Token would prevent other reads and writes from the
ArrayHandle.

This added safety in the form of making sure that the ArrayPortal was
always valid. Unfortunately, it also made deadlocks very easy. They
happened when an ArrayPortal did not leave scope immediately after use
(which is not all that uncommon).

Now, the ArrayPortal no longer locks up the ArrayHandle. Instead, when
an access happens on the ArrayPortal, it checks to make sure that
nothing has happened to the data being accessed. If it has, a fatal
error is reported to the log.
2020-03-16 07:10:10 -06:00
Vicente Bolea
46d5ab9539 Merge topic 'fix-424-use-scanextended'
9d0da855b ConvertNumComponentsToOffsets using ScanExtented vs. ScanExclusive

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1964
2020-03-11 10:03:54 -04:00
Robert Maynard
01b370296f Merge topic 'fix-301'
e4aa20594 Output CoordinateSystemTransforms results in Coordinates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1970
2020-03-10 10:21:33 -04:00
Sudhanshu Sane
424dfbaf52 Add call to UpdateSeedResoltuion() to set output dataset resolution. 2020-03-07 21:13:06 -08:00
Vicente Adolfo Bolea Sanchez
e4aa20594a Output CoordinateSystemTransforms results in Coordinates
This commit changes how CoordinateSystemTransforms write their result.

Before theoy would write their result in a DataSet in which the new
Coords where stored in a field with the name of:
 - cylindricalCoordinateSystemTransform
 - sphericalCoordinateSystemTransform

Now, they write their results as a DataSet in which its first Coords
are the transformed Coords. Previous Coordinates are appended

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-03-05 15:21:47 -05:00
Vicente Adolfo Bolea Sanchez
9d0da855b3 ConvertNumComponentsToOffsets using ScanExtented vs. ScanExclusive
This commit also:
- Removes a corner case not longer used at ArrayPortalGroupVecVariable::get
- Changes doc regarding the number of offset elements in the input
  array handler of ConvertNumComponentsToOffsets.
- Updates invokation of make_ArrayGroupVectVariable in multiple files
- Adds its corresponding changelog entry
2020-03-05 10:57:34 -05:00
Kenneth Moreland
ec34cb56c4 Use new ways to get array portal in control environment
Also fix deadlocks that occur when portals are not destroyed
in time.
2020-02-26 13:10:46 -07:00
Kenneth Moreland
47249ee3c0 Merge branch 'master' into oruebel/vtk-m-cleanup/contourtreeaugmented 2020-02-24 20:53:47 -07:00
Oliver Ruebel
392854ee35 Replace C-tyle casts with C++ style 2020-02-24 11:19:37 -08:00
Robert Maynard
a5e8ed4580 Merge topic 'allow_multiple_compilations_of_image_connectivity_filter'
576ff5ec8 ImageConnectivity didn't support multiple TU's compiling it

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1971
2020-02-21 16:18:24 -05:00
Robert Maynard
576ff5ec87 ImageConnectivity didn't support multiple TU's compiling it 2020-02-21 13:01:51 -05:00
Sudhanshu Sane
e68b283e8b Delete commented, unused class variables 2020-01-28 10:27:58 -08:00