Commit Graph

86 Commits

Author SHA1 Message Date
Kenneth Moreland
18c4190d85 Update classes using RuntimeDeviceTracker
They now grab the global runtime device tracker. In some cases, I've
added the ability to set/get the tracker to change it from the global.
In others I just removed the local copy, since it was just hooked into
the global tracker.
2017-02-23 09:54:41 -07:00
Kenneth Moreland
b9d3206ea6 Move RuntimeDeviceTracker to vtkm::cont
Before it was in the vtkm::cont::internal namespace. However, we expect
to be using this feature quite a bit more as we want VTK-m to handle
multiple devices effectively (as in, just figure it out and go).
2017-02-22 13:33:52 -07:00
Kenneth Moreland
d339025a1b Merge topic 'external-face-more-generic'
dcbbb727 Merge branch 'master' into external-face-more-generic
0703139a Make Keys class do in-place sort
059c7f6d Fix issue with ExternalFaces on CellSetSingleType
876514ba Add better test for external faces
53679dfc Update ExternalFaces to support mixed face types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brent Lessley <blessley@cs.uoregon.edu>
Merge-request: !662
2017-02-16 10:28:56 -05:00
Thomas Otahal
9d9c39e197 Merge topic 'vector_magnitude_field_filter'
ba2be2fe Added FilterTraits and code cleanup.
f6d5d24c Removed integer vector field from vector magnitude filter unit test
70e145fd Attempt to fix Visual Studio 2013/2015 warning message
f1300c61 Changed vtkm::Abs() to return input type
71b2348d Adjusted Math.h.in for const vtkm::Float32 function inputs
7d6601d7 Modified Math.h.in and VectorAnalysis.h to support integral types.
cd95cbe9 Modified Math.h.in instead of Math.h
5777c4ca Merge branch 'master' into vector_magnitude_field_filter
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !666
2017-02-10 11:34:28 -05:00
Thomas J. Otahal
ba2be2fe3a Added FilterTraits and code cleanup. 2017-02-09 10:58:49 -07:00
Kenneth Moreland
dcbbb72784 Merge branch 'master' into external-face-more-generic
Update exception methods to new names.
2017-02-08 17:10:17 -07:00
David C. Lonie
f601e38ba8 Simplify exception hierarchy.
Remove the ErrorControl class such that all subclasses now inherit from
error. Renamed all exception classes via s/ErrorControl/Error/.

See issue #57.
2017-02-07 15:42:38 -05:00
Thomas J. Otahal
f6d5d24c82 Removed integer vector field from vector magnitude filter unit test
Integer vector field was causing link errors on Windows with Visual
Studio.
2017-02-07 11:38:52 -07:00
Kenneth Moreland
059c7f6db0 Fix issue with ExternalFaces on CellSetSingleType
The ExternalFaces filter should work fine on a CellSetSingleType.
However, the filter was not operating on them because it a templated
method that is a placeholder for "this cell set type not supported" was
matching it. This simple change allows a CellSetSingleType to match the
template for a CellSetExplicit (which is the superclass).
2017-01-26 13:35:51 -07:00
Kenneth Moreland
53679dfc9c Update ExternalFaces to support mixed face types
Previously, ExternalFaces really only supported tetrahedral meshes that
have only triangular faces. These changes support all mixes of cells and
their faces.
2017-01-26 13:35:46 -07:00
Thomas J. Otahal
7d6601d794 Modified Math.h.in and VectorAnalysis.h to support integral types.
Unary operations on scalars and vectors will return vtkm::Float64 for
integral input types and vtkm::Float64 input types. Unary operations will
return vtkm::Float32 for vtkm::Float32 input vectors and scalars.
2017-01-26 13:30:28 -07:00
Thomas J. Otahal
5777c4caa5 Merge branch 'master' into vector_magnitude_field_filter
Conflicts:
	vtkm/worklet/testing/CMakeLists.txt
2017-01-24 09:55:31 -07:00
Robert Maynard
2c916780a0 Reduce the amount of output the UnitTestHistogramFilter generates
It was producing about 40MB of output when saved by cdash/buildbot so
lets reduce that and make web pages load again.
2017-01-24 09:21:43 -05:00
Kenneth Moreland
5004e64c3e Fix CleanGrid when compact point fields is off
There was an error in the CleanGrid filter where if the
CompactPointFields flag was off it would still try to compact the point
coordinates. Add an extra check so that the coordinate systems are just
passed when this flag is off.
2017-01-19 14:10:40 -07:00
Thomas J. Otahal
556b922733 Created a filter for the vector magnitude worklet.
Modified the vector magnitude worklet to accept VecAll instead
of Vec3 and return Scalar. Modified the Magnitude() and Sqrt() functions
to return FloatDefault for all inputs except for Float64.

Perhaps we should modify other functions in Math.h and VectorAnalysis.h to
return float types for intergral arguments instead of integral types?
2017-01-19 13:27:42 -07:00
Robert Maynard
4a56e9f129 Merge branch 'contour-tree' into 'master'
Contour tree

See merge request !658
2017-01-17 17:00:54 -05:00
Kenneth Moreland
713cf4228a Make it not possible to create a cell set without specifying num points
The CellSetExplicit and CellSetSingleType classes have an ivar that
marks the number of points. There were several instances of code
creating cell sets without specifying the number of points. This can be
very bad if subsequent code needs that information.
2017-01-12 13:02:10 -07:00
Patricia Kroll Fasel - 090207
b3b5149b28 Use cont/testing/MakeTestDataSet.h and add contour tree tests.
Remove worklet/contourtree/PrintVectors.h from CMakeLists.txt.
2017-01-12 10:40:29 -07:00
Kenneth Moreland
f23ff9fa49 Fix warnings about assignment operators not being generated
For some reason when VTK-m was being compiled as an accelerator in VTK,
Visual Studio 2013 gave a bunch of warnings about not being able to generate
assignment operators for many classes. This happened for classes with a
const ivar that could not be automatically set. (Automatic copy constructors
are fine on this count.) I'm not sure why these warnings did not happen
when just compiling VTK-m, nor am I sure why they were generated at all as
no code actually used the copy constructors.

This commit fixes the problems by adding a private declaration for assignment
operators that cannot be automatically created. No implementation is
provided, nor should any be needed.
2017-01-10 11:10:38 -07:00
Patricia Kroll Fasel - 090207
62a1cceea6 Add file that creates test data sets and use that instead for contour tree. 2017-01-09 15:50:23 -07:00
Patricia Kroll Fasel - 090207
f6140c39e2 Add LANL/LLC copyright notification. 2017-01-09 14:53:59 -07:00
Patricia Kroll Fasel - 090207
9412584bf2 First implementation of contour tree 2D and 3D, serial and cuda. 2017-01-09 13:54:47 -07:00
Robert Maynard
8828e8809f Merge topic 'tag_intersection'
c27bb01f Introduces ListTagUniversal which represents a list of everything.
9eb28841 vtkm::filter now deduces the subset of valid field types.
49c5e822 vtkm can now find the intersection of two ListTags.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !649
2017-01-01 13:35:58 -05:00
Robert Maynard
c27bb01f26 Introduces ListTagUniversal which represents a list of everything.
This makes the FilterTraits design simpler and easier to understand.
2016-12-30 15:44:21 -05:00
Robert Maynard
9eb288419e vtkm::filter now deduces the subset of valid field types.
Previously the ApplyPolicy logic was to use the filters
field set, and ignore the policy field set.

But this caused problems, as a filter couldn't express that
it was able to work on all valid types. This caused
certain complex types Vec of Vec's to fail to work properly,
and would cause compile use code paths that would never
be valid for a given policy.
2016-12-30 08:30:44 -05:00
Robert Maynard
c064e0066c The Average filters now obey the policy when casting DynamicCellSets. 2016-12-29 11:19:30 -05:00
Robert Maynard
66fc2fa5d7 PointGradients now use the proper device adapter. 2016-12-23 15:11:56 -05:00
Robert Maynard
b0a6b17924 Add support for computing divergence to the gradient filter. 2016-12-23 09:34:33 -05:00
Robert Maynard
5eade282ee Restrict Gradient to scalar values and vec<3> of scalar values. 2016-12-23 09:03:35 -05:00
Kenneth Moreland
eb0691f5df Fix example data set for marching cubes test
It was not properly setting the number of points.
2016-12-20 13:03:24 -07:00
Robert Maynard
d5c80802c4 Merge topic 'add_vorticity_and_qcriterion'
f71f3ed0 Allow the gradient filter to compute Vorticity and QCriterion.
efb119ea Sort the worklet headers, as they should be in alphabetical order.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !638
2016-12-19 15:31:33 -05:00
Robert Maynard
f71f3ed011 Allow the gradient filter to compute Vorticity and QCriterion. 2016-12-16 08:42:16 -05:00
Kenneth Moreland
22b3a4a72a Add a small test data set
This new explicit data set example is interesting in that it contains
several different cell types (one of every 3D cell shape currently
defined).
2016-12-15 16:04:38 -07:00
Robert Maynard
854e298be6 CellAverage filter now verifies the field is a point field. 2016-12-15 09:10:33 -05:00
Robert Maynard
b85cb2dd33 Add a PointAverage Filter. 2016-12-14 15:10:43 -05:00
Robert Maynard
839d8e8392 CellAverage first control parameter is now the cellset.
This was done so that it consistently matches other cell based worklets,
and the majority of examples inside the VTK-m Users Guide.
2016-12-14 14:04:57 -05:00
Robert Maynard
eba19df361 Add a filter that handles all the gradient computations. 2016-12-14 11:00:07 -05:00
Kenneth Moreland
eb26b88cec Change DefaultPolicy to PolicyDefault
This is more in line with the VTK-m coding standards.
2016-11-23 14:05:16 -07:00
Kenneth Moreland
bb32e40804 Allow all policies to inherit defaults
Previously, all declared policies had to implement every tag required by
the policy, even if it was the same as the default. In addition to being
annoying, this makes us less forward compatible because if we add a new
item to the policy any unchanged policy would become incorrect.

This change moves the default policy declarations from the default
policy to PolicyBase. The default policy inherits all of them without
any change. Other policies need only override those that are different
than the default.
2016-11-23 14:00:49 -07:00
Kenneth Moreland
c6cd9d02ba Implement CleanGrid filter 2016-11-22 17:16:49 -07:00
Kenneth Moreland
fdaccc22db Remove exports for header-only functions/methods
Change the VTKM_CONT_EXPORT to VTKM_CONT. (Likewise for EXEC and
EXEC_CONT.) Remove the inline from these macros so that they can be
applied to everything, including implementations in a library.

Because inline is not declared in these modifies, you have to add the
keyword to functions and methods where the implementation is not inlined
in the class.
2016-11-15 22:22:13 -07:00
Kenneth Moreland
adfb0bba55 Fix ApplyPolicy for CoordinateSystem objects
There was a mismatch in the ApplyPolicy function for CoordinateSystem
objects. The return type declared for the function was not the same as
the type of object actually returned.

Also added a test that actually uses a filter with a CoordinateSystem as
a field to actually test this functionality.
2016-10-23 11:51:09 -04:00
Robert Maynard
2d31774b3b Add a Clip filter that can do iso value clipping. 2016-08-23 16:12:22 -04:00
Kenneth Moreland
e488967c8f Use general TryExecute for filter execution
The TryExecute function was based off of the ResolveFieldTypeAnd*
classes made for filters. To reduce the amount of code duplication,
modify these two filter classes to use the more general TryExecute
functionality.
2016-08-17 14:13:51 -06:00
Robert Maynard
31156d2e99 Add a histogram filter. 2016-08-12 08:40:11 -04:00
Robert Maynard
856b8b547d Express in the the threshold filter policy it only handles scalars. 2016-08-08 16:51:09 -04:00
Robert Maynard
08a33675f6 Prefer vtkm::cont::CastAndCall function over the member method. 2016-08-05 15:29:39 -04:00
T.J. Corona
e177e5a9ff Add device list to filter policy. 2016-08-03 10:17:20 -04:00
T.J. Corona
8ad8eeda77 In DynamicCellSet, expose CellSet API.
Also changes GetCellSet() to CastToBase().
2016-08-02 13:39:25 -04:00
Robert Maynard
73440ccb4e vtkm::filter::MarchingCubes now uses vtkm::worklet
Instead of having two separate implementations of MarchingCubes, we have
a single implementation in worklet, and filter uses that.

That does mean that the version in worklet has been updated to support
merging of duplicate point coordinates.
2016-07-28 08:52:34 -04:00