Commit Graph

3092 Commits

Author SHA1 Message Date
mclarsen
2f9fb6eecb Almost finished refactoring 2017-03-13 17:03:37 -07:00
mclarsen
237df547ec Adding classes to reduce the ammount of redundant code 2017-03-13 11:49:29 -07:00
Sujin Philip
07cb111904 Fix more issues with the readers
1) Fix parsing issues related to visit style field data
2) Create appropriate dimension cellset for structured cell sets
2017-03-13 13:46:26 -04:00
Sujin Philip
566d70c450 Merge topic 'fix-windows_h-include-logic'
25f9f88f Fix windows.h include logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !722
2017-03-13 09:59:24 -04:00
Sujin Philip
25f9f88f3e Fix windows.h include logic
windows.h was only being included for MSVC, while in UnitTestTimer.cxx, the
Windows function Sleep was being called after check for _WIN32. This was
causing compilation failure in MINGW.

Fixes #122
2017-03-10 16:28:13 -05:00
Robert Maynard
2cbf97e705 Merge topic 'support-vtkfiles-empty-titles'
6d6b5991 Support reading VTK files with empty title

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !725
2017-03-10 09:18:12 -05:00
Robert Maynard
f6094304d8 Merge topic 'mc_classify_checks_cellshape'
f2f928ce MarchingCubes classify step now makes sure we have hex elements.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !723
2017-03-10 09:17:50 -05:00
Li-Ta Lo - 194699
6ce8a0135a Merge branch 'master' into unified-memory 2017-03-09 14:54:03 -07:00
Li-Ta Lo - 194699
b470175f98 new unified memory effort with the new Thrust device 2017-03-09 14:51:45 -07:00
Kenneth Moreland
6bf8f26ed0 Merge topic 'array-range-compute-hidden'
5355a432 Remove unnecessary library dependencies
6fdc7eb8 Add Field::GetRange and CoordinateSystem::GetBounds to library
c16236ce Use ArrayRangeCompute without specifying a device

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !710
2017-03-09 16:25:38 -05:00
Sujin Philip
6d6b599115 Support reading VTK files with empty title 2017-03-09 15:48:25 -05:00
Robert Maynard
f2f928ceae MarchingCubes classify step now makes sure we have hex elements.
We now explicitly verify that each cell is a hex element, so that
we don't try to execute on incorrect cells
2017-03-09 14:05:37 -05:00
Kenneth Moreland
5355a432f3 Remove unnecessary library dependencies
The vtkm_library macro was making all VTK-m libraries depend on all
other VTK-m libraries previously defined. This potentially creates
unnecessary linking. Instead, only depend on the backend libraries (like
TBB) and libraries explicitly given.
2017-03-09 13:18:36 -05:00
Kenneth Moreland
6fdc7eb8c0 Add Field::GetRange and CoordinateSystem::GetBounds to library
Following what was done with ArrayRangeCompute, the GetRange and
GetBounds methods are embedded into the vtkm_cont library for the most
common type lists.

Also, and probably more importantly, the device adapter is no longer one
of the arguments for either of these methods. It is no longer needed as
ArrayRangeCompute no longer needs it.
2017-03-09 13:18:36 -05:00
Kenneth Moreland
c16236ce69 Use ArrayRangeCompute without specifying a device
Most uses of ArrayRangeCompute just want to get the range of the data
and probably don't have a particular device in mind. Thus, it is better
to use a TryExecute internally use whatever devices are available.

Note that when using TryExecute, the calling code is expected to be able
to support all devices. That might not always be the case. Thus, I am
experimenting a bit with how we incorporate this in a library. The
advantage of having the code compiled in a library is that you only have
to compile it once and the calling code does not need to worry about
CUDA, etc.

However, because ArrayRangeCompute is templated, we can only pre-compile
some subset of array handle types. The most common are compiled into the
code (matching all the predefined ArrayHandles as well as some special
cases). If the code wants to use some other type, it has to include
ArrayRangeCompute.hxx. The only place where this is necessary is a test
that intentially trys to find the range on an uncommon type.

If array portals were to support virtual methods, then we should be able
to modify this code so that we could precompile for all array handle
types.
2017-03-09 13:18:36 -05:00
Kenneth Moreland
c1dc5b67f2 Merge topic 'algorithms-on-small-arrays'
8b33f2bc Fix device adapter algorithms for small arrays
72654641 ArrayHandle reallocations of 0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !724
2017-03-09 13:17:03 -05:00
Patricia Kroll Fasel - 090207
be73dec0cb Default for selected points changed to CompactPoints = true 2017-03-09 09:16:41 -07:00
Kenneth Moreland
8b33f2bc79 Fix device adapter algorithms for small arrays
There were some issues for device adapter algorithms (like scan and
reduce) for empty arrays or arrays of size 1. This adds tests for these
short arrays to the device adapter algorithm tests and fixes these
problems.
2017-03-08 19:05:28 -05:00
Kenneth Moreland
726546419d ArrayHandle reallocations of 0
The basic storage has an implicit invariant that if the size of the
storage is 0 then the array is a null pointer. That invariant was broken
if the array was allocated and then Shrink or Allocate was called with
0. In that case, the array remained allocated by the size was set to 0.

This fixes the problem by making sure a Shrink(0) actually does an
Allocate(0) (to clear out the data) and that the basic storage always
frees its memory when allocating a 0 sized array.
2017-03-08 18:53:06 -05:00
Patricia Kroll Fasel - 090207
fa0b9bee73 MaskPoints worklet and filter added 2017-03-08 16:04:12 -07:00
Patricia Kroll Fasel - 090207
c1b2d1f50a Add filter and unit test to ThresholdPoints.
Allow for CompactPoints to call CleanGrid.
2017-03-08 13:25:27 -07:00
Sujin Philip
149fd79386 Merge topic 'move-BaseComponentOf-to-vtkm_BaseComponent'
b455636b Move BaseComponentOf to vtkm::BaseComponent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !721
2017-03-08 12:37:13 -05:00
Patricia Kroll Fasel - 090207
040b0420ab Merge branch 'master' into extract-subset 2017-03-07 14:06:23 -07:00
Patricia Kroll Fasel - 090207
dee28a3089 ThresholdPoints first attempt 2017-03-07 14:03:22 -07:00
Sujin Philip
b455636bcd Move BaseComponentOf to vtkm::BaseComponent 2017-03-07 14:46:55 -05:00
Sujin Philip
1ceb46f802 Merge topic 'externalfaces-cleangrid'
e2efb839 External Faces filter add CompactPoints option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !720
2017-03-07 13:59:23 -05:00
Sujin Philip
e2efb839a7 External Faces filter add CompactPoints option 2017-03-07 11:05:52 -05:00
Robert Maynard
fa04226b05 Merge topic 'array_range_compute_use_single_reduce_call'
d5dfb1f6 Restore ArrayRangeCompute to using a single Reduce call.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !719
2017-03-07 08:31:41 -05:00
Robert Maynard
d5dfb1f673 Restore ArrayRangeCompute to using a single Reduce call.
We can easily compute the min and max of an array using a single reduction
2017-03-06 16:14:48 -05:00
Sujin Philip
dbdcfc50a8 Merge topic 'rename-StreamCompact-to-CopyIf'
9eddce6c Rename StreamCompact to CopyIf

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !717
2017-03-06 14:17:19 -05:00
Kenneth Moreland
e51105e84b Merge topic 'input-domain-tag-invocation'
297c1b07 Add InputDomainTag to Invocation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !718
2017-03-06 11:13:38 -05:00
Sujin Philip
9eddce6c99 Rename StreamCompact to CopyIf
Plus, removes the version that uses one array as both input and stencil.
2017-03-06 11:08:27 -05:00
Sujin Philip
e28037876d Merge topic 'ExternalFacesFilter-MappPointFields'
269691e7 Map point fields in ExternalFaces filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !716
2017-03-06 08:26:38 -05:00
Kenneth Moreland
297c1b0709 Add InputDomainTag to Invocation 2017-03-03 20:20:35 -07:00
Sujin Philip
269691e7ff Map point fields in ExternalFaces filter 2017-03-03 15:43:52 -05:00
Sujin Philip
f1bc19f4a2 Merge topic 'improve-ExternalFaces-filter'
b1d6e743 Improve ExternalFaces filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !714
2017-03-03 08:33:30 -05:00
Sujin Philip
b1d6e74353 Improve ExternalFaces filter
Now it can work with more types of input CellSets.
2017-03-02 16:31:01 -05:00
David Lonie
e634946a2d Merge topic 'marching_cubes_normals_name'
8d5f4eb6 Expose the normal array's name in the MarchingCubes filter.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !713
2017-03-02 13:37:11 -05:00
Robert Maynard
82647e411c Merge topic 'correct_rendering_symbol_vis_osx_issue'
ae9a8fd0 Fix CellSet* typeid to consistent across dynamic libraries.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <mlarsen@cs.uoregon.edu>
Reviewed-by: Berk Geveci <berk.geveci@kitware.com>
Merge-request: !712
2017-03-02 13:35:23 -05:00
David C. Lonie
8d5f4eb690 Expose the normal array's name in the MarchingCubes filter. 2017-03-02 12:15:20 -05:00
Robert Maynard
ae9a8fd0a4 Fix CellSet* typeid to consistent across dynamic libraries.
Since we don't have explicit template instantiations for CellSetExplicit
and CellSetSingleType we need to mark them as being exported from all
libraries.
2017-03-01 17:12:46 -05:00
Sujin Philip
57f5881538 Merge topic 'use-c++11=delete'
8c4bbc39 Use C++11 =delete keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !708
2017-02-24 13:31:57 -05:00
Kenneth Moreland
3e77f4e18b Merge topic 'refactor-runtime-device-tracker'
18c4190d Update classes using RuntimeDeviceTracker
200928ef Add a global RuntimeDeviceTracker
a3573117 Compile RuntimeDeviceTracker.cxx with CUDA when appropriate
814b2db1 Add the implementation of RuntimeDeviceTracker to cont library
b9d3206e Move RuntimeDeviceTracker to vtkm::cont

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !707
2017-02-24 10:50:19 -05:00
Sujin Philip
8c4bbc39ad Use C++11 =delete keyword 2017-02-24 09:39:22 -05:00
David Lonie
69fe31005b Merge topic 'verbose_castandcall_errors'
7e34f861 Append newline to ArrayHandle summaries.
6f417a38 Add type information to array summaries and cast/call errors.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !705
2017-02-24 09:03:31 -05:00
Sujin Philip
e5bc34e9f5 Merge topic 'catch-by-reference'
a88807fd Catch all exceptions by reference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !704
2017-02-23 16:36:00 -05:00
David Lonie
12a9a390f7 Merge topic 'clip_filter_output_clipped_coords'
14f216d5 Update the output coordinates for the clip filter.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !706
2017-02-23 15:45:05 -05:00
Sujin Philip
a88807fd7e Catch all exceptions by reference 2017-02-23 13:25:01 -05:00
David C. Lonie
7e34f86115 Append newline to ArrayHandle summaries. 2017-02-23 12:48:32 -05:00
David C. Lonie
14f216d58e Update the output coordinates for the clip filter.
The clip worklet will change the number of points in the result
set by adding points at the clip boundaries. The filter was updating
the clipped scalar array to reflect the new points, but not the actual
coordinate array.

This patch will cause the clip filter's result dataset to contain the
correct number of points and no longer automatically map the scalar
array onto the output, since this is easily done via the filter API.
2017-02-23 12:41:40 -05:00