Commit Graph

6524 Commits

Author SHA1 Message Date
Robert Maynard
c454714079 Examples now compile when CUDA is enabled.
We some case sensitive issues, and some missing markup for
what files need to be compiled with CUDA
2019-08-23 11:11:39 -04:00
Robert Maynard
0586525b74 Merge topic 'update_cmake_defaults_for_better_experience'
3a47058cb Use cache variables.
76ef9d15b Take advice of Robert and Kenneth on build system.
89fc012a2 Change CMakeLists.txt defaults in order to be more user-friendly.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1771
2019-08-22 12:15:19 -04:00
Robert Maynard
d553a55e43 Merge topic 'correct_openmp_reduce_odd_processor_count'
c90c3a675 OpenMP optimzed reduce support odd processor counts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1795
2019-08-22 11:56:39 -04:00
Kenneth Moreland
5e2ee3627b Merge topic 'fix-contour-test'
709b12c5b Add checks for size of contour worklet outputs
a3131d4e1 Fix bad normals in contour test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !1794
2019-08-22 11:19:15 -04:00
Allison Vacanti
8bb9873389 Merge topic '355_fetch_single_value'
bfe357319 Add a missing header to StorageExtrude.
d3fbe535f Check the source array's active device in ArrayCopy.
399f23963 Add ArrayGetValue[s] to address issue #355.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1790
2019-08-22 11:18:00 -04:00
Allison Vacanti
bfe357319e Add a missing header to StorageExtrude.
This is needed after cleaning up headers in ArrayCopy.
2019-08-22 11:16:16 -04:00
Allison Vacanti
d3fbe535f2 Check the source array's active device in ArrayCopy. 2019-08-22 11:16:16 -04:00
Allison Vacanti
399f23963e Add ArrayGetValue[s] to address issue #355. 2019-08-22 11:16:16 -04:00
Kenneth Moreland
709b12c5bb Add checks for size of contour worklet outputs 2019-08-22 08:28:53 -06:00
Allison Vacanti
5e253d9f6b Merge topic 'fixup_shadowed_typedef'
64533c5c8 Rename shadowing typedef in TriangleWinding test.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1793
2019-08-22 09:56:13 -04:00
Robert Maynard
f1c09529d1 Merge topic 'correct_improper_cellset_indexing'
fa9ffac7c Correct improper cellset indexing
b0c6e18ea DataSet queries for cellset and coordinate index won't trow

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1777
2019-08-22 08:39:36 -04:00
Robert Maynard
169480e4f0 Merge topic 'make_more_of_vtkm_vec_constexpr'
a529b90c7 vtkm::Vec const& operator[] is now constexpr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1792
2019-08-22 08:35:51 -04:00
Robert Maynard
a529b90c73 vtkm::Vec const& operator[] is now constexpr
This allows for developers to do things such as the following
as constexpr's:
```cxx
constexpr vtkm::Id2 dims(16,16);
constexpr vtkm::Float64 dx = vtkm::Float64(4.0 * vtkm::Pi()) / vtkm::Float64(dims[0] - 1);
```
2019-08-22 08:34:25 -04:00
Robert Maynard
c90c3a6753 OpenMP optimzed reduce support odd processor counts 2019-08-21 18:31:20 -04:00
Kenneth Moreland
42f0e962bd Merge topic 'fix-implicit-functions'
bf96d921d Add extra braces around std::array initializers
9bbf4a5a6 Corrections and expanded testing of implicit functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1776
2019-08-21 18:20:57 -04:00
Kenneth Moreland
a3131d4e18 Fix bad normals in contour test
The contour worklet test was experiencing normals that were set to NaN
due to problems with computing the gradient of the original field. It
was determined that the problem was caused by the clip filter creating
degenerate cells because the clip plane exactly intersected the points
of the mesh. Although a problem, we found that this behavior also exists
in existing tools like ParaView and VisIt. Thus, it sounds like a
problem to be pushed off to a later day. Instead, just move the plane a
little bit to get it into general position.
2019-08-21 14:39:51 -06:00
Kenneth Moreland
54456bea76 Merge topic 'threshold-explicit-cells'
d7bfbbda8 Remove GhostCellRemove::ConvertOutputToUnstructured option
42e8a9125 Copy Threshold output to a CellSetExplicit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Merge-request: !1791
2019-08-21 16:23:04 -04:00
Allison Vacanti
cdd7c8993b Merge topic 'extrude_serialize'
67f1a772d Fix IsArrayHandleWritable for Extrude arrays.
38748a220 Add serialization code for Extrude data structures.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1788
2019-08-21 15:21:07 -04:00
Robert Maynard
fa9ffac7c9 Correct improper cellset indexing 2019-08-21 15:16:26 -04:00
Allison Vacanti
64533c5c82 Rename shadowing typedef in TriangleWinding test. 2019-08-21 15:04:07 -04:00
Kenneth Moreland
d7bfbbda82 Remove GhostCellRemove::ConvertOutputToUnstructured option
Now that Threshold automatically converts its output to CellSetExplicit,
this option is no longer necessary (and the previous implementation did
not work correctly).
2019-08-21 13:00:38 -06:00
Robert Maynard
2dcfacc42a Merge topic 'find_mpi_work_with_older_cmake_version_when_cuda_disabled'
978650b06 FindMPI works with CMake 3.8's separate_arguments
1f99fbc35 FindMPI will now work when CUDA is disabled and CMake <= 3.11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !1787
2019-08-21 14:35:32 -04:00
Robert Maynard
978650b063 FindMPI works with CMake 3.8's separate_arguments
CMake 3.8 separate_arguments command doesn't support NATIVE_COMMAND
so we have to do that logic for it.
2019-08-21 09:55:15 -04:00
Sujin Philip
3f9503469a Merge topic 'update-diy'
a4d07730c diy 2019-08-20 (166f7d1b)
eea4225d8 Fix update.sh for diy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1789
2019-08-21 09:36:01 -04:00
Robert Maynard
1f99fbc357 FindMPI will now work when CUDA is disabled and CMake <= 3.11
This was causing issues for downstream users of VTK-m as it exposed
a bug in CM ( cmake#17952 ) where it was evaluating against the set of
enabled languages instead of possible languages.
2019-08-21 09:25:32 -04:00
Kenneth Moreland
8373adc654 Merge topic 'array-handle-soa'
aebafc9e5 Use SFINAE to write Set/Get methods in ArrayPortalSOA
20c758108 Add make_ArrayHandleSOA for std::vectors and C arrays
c50857246 Make SOA Portal test more type safe
918766e7a Fix VS 2015 compile issue with HasVecTraits
869d66580 Add ArrayHandleSOA

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1758
2019-08-21 09:24:35 -04:00
Diy Upstream
a4d07730cc diy 2019-08-20 (166f7d1b)
Code extracted from:

    https://gitlab.kitware.com/third-party/diy2.git

at commit 166f7d1bf6b4940b9edd3f91c78acf8ea6aa5bca (for/vtk-m).
2019-08-21 09:16:05 -04:00
Sujin Philip
eea4225d8e Fix update.sh for diy 2019-08-21 09:15:56 -04:00
Robert Maynard
8c4730da22 Merge topic 'opt_into_all_cmake_315_policies'
267f963d3 Opt into all CMake 3.15 policies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1786
2019-08-21 08:18:19 -04:00
Kenneth Moreland
42e8a9125d Copy Threshold output to a CellSetExplicit
Perhaps a better title for this change would be "Make the Threshold
filter not totally useless."

A long standing issue with the Threshold filter is that its output
CellSet was stored in a CellSetPermutation. This made Threshold hyper-
efficient because it required hardly any data movement to implement.
However, the problem was that any other unit that had to use the CellSet
failed. To have VTK-m handle that output correctly in other filters and
writers, they all would have to check for the existance of
CellSetPermutation. And CellSetPermutation is templated on the CellSet
type it is permuting, so all units would have to compile special cases
for all these combinations. This is not likely to be feasible in any
static solution.

The simple solution, implemented here, is to deep copy the cells to a
CellSetExplicit, which is a known type that is already used everywhere
in VTK-m. The solution is a bit disappointing since it requires more
memory and time to build. But it is on par with solutions in other
libraries (like VTK). And it really does not matter how efficient the
old solution was if it was useless.
2019-08-20 16:04:26 -06:00
Kenneth Moreland
1473c12e66 Merge topic 'more-gradient-testing'
c19b312e5 Fix gradient issue at apex of pyramid cells

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !1785
2019-08-20 17:03:28 -04:00
Robert Maynard
267f963d32 Opt into all CMake 3.15 policies 2019-08-20 15:38:27 -04:00
Kenneth Moreland
aebafc9e5a Use SFINAE to write Set/Get methods in ArrayPortalSOA
Because ArrayPortalSOA calls a delegate portal to get the actual values,
it can only implement its own Set or Get if the delegate portal supports
it. Previously this was done by calling an overloaded internal method
based on the result of PortalSupportsSets/Gets. However, regardless of
whether the delegate portal supported Set or Get, ArrayPortalSOA
provided one. Thus, if something else tried to use PortalSupportsSets/
Gets on ArrayPortalSOA, it would always report true even if it was not
really supported.

Instead, use SFINAE to remove the Set or Get if that method is not
supported in the delegate portal.

Since ArrayHandleSOA is only really used for portals from basic storage
arrays, it will be rare that Set or Get is not supported. However, a
device adapter is free to remove one of these methods on a device
portal. For example, if you call PrepareForInput on an ArrayHandle, it
is possible that the device adapter will create a portal that has no Set
method because the array is not writable.

Thanks to Allison Vacanti for recomending this solution.
2019-08-20 12:10:16 -06:00
Kenneth Moreland
20c758108c Add make_ArrayHandleSOA for std::vectors and C arrays 2019-08-20 12:09:57 -06:00
Kenneth Moreland
c508572460 Make SOA Portal test more type safe
I kept getting warnings from different compilers about type conversions
because I was making values by adding an index to them. Change how we
create and test values so that these type issues are less likely to come
up.
2019-08-20 12:09:56 -06:00
Kenneth Moreland
918766e7ab Fix VS 2015 compile issue with HasVecTraits
Apparently, the Visual Studio 2015 has a bug where the result of a
decltype might not be considered a type. Attempt to get around this
problem by putting the decltype inside of a struct and then have the
using statement use the typename keyword. Hopefully if you literally say
that something is a typename, the compiler will treat it like a type
name.
2019-08-20 12:09:55 -06:00
Kenneth Moreland
869d665806 Add ArrayHandleSOA
This ArrayHandle should behave just like the one with basic storage but
external arrays stored by component can be shallow-copied to them.
2019-08-20 12:09:54 -06:00
Allison Vacanti
67f1a772df Fix IsArrayHandleWritable for Extrude arrays.
The portal Set methods should be left unimplemented for immutable
array handles.
2019-08-20 14:08:56 -04:00
Allison Vacanti
38748a2208 Add serialization code for Extrude data structures. 2019-08-20 14:08:01 -04:00
Li-Ta Lo
50bdb79833 Merge topic 'contour_hackathon'
9b0a79f19 let's see if I fixe the one last bug
e66af369b removed isosurface example, add clipped tangle to Contour unit test
0a020c77a fixed error in TetrahedralizedExplicit, rename MarchineCubes to Contour
e9e35159a change MarchingCubes to Contour that was missed before merge
c2e29f5c4 Merge branch 'master' into contour_hackathon
6a54d5f75 supress warning about converting vtkm::Id to vtkm::IdComponent
27a9962f3 rename MarchingCubes to Contour in benchmarks
414effa8e remove unused contour unit test
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1780
2019-08-20 10:25:31 -04:00
Robert Maynard
7c25929dae Merge topic 'nice_field_construction_docs'
78c7a8d8e Add changelog for make_Field changes
5087b1725 Add changelog for CreateResult changes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1784
2019-08-20 09:58:45 -04:00
Robert Maynard
78c7a8d8e8 Add changelog for make_Field changes 2019-08-20 08:23:20 -04:00
Robert Maynard
5087b17250 Add changelog for CreateResult changes 2019-08-20 08:23:20 -04:00
Kenneth Moreland
c19b312e58 Fix gradient issue at apex of pyramid cells
The gradient is malformed at the apex of a pyramid. To get around this,
steal a trick from the VTK source where in this case interpolate some
values a little bit into the interior of the cell.

Also expand the gradient worklet tests to include all cell types.
2019-08-19 16:40:58 -06:00
Li-Ta Lo
9b0a79f19a let's see if I fixe the one last bug 2019-08-19 14:41:49 -06:00
Li-Ta Lo
e66af369ba removed isosurface example, add clipped tangle to Contour unit test 2019-08-19 13:36:28 -06:00
Li-Ta Lo
0a020c77a8 fixed error in TetrahedralizedExplicit, rename MarchineCubes to Contour 2019-08-19 11:45:58 -06:00
Li-Ta Lo
e9e35159ab change MarchingCubes to Contour that was missed before merge 2019-08-19 08:56:11 -06:00
Robert Maynard
b0c6e18ea7 DataSet queries for cellset and coordinate index won't trow
Queries for cellset and coordinates by name will not throw exceptions
when looking just for the index value. Instead they will return -1
2019-08-19 09:36:03 -04:00
Li-Ta Lo
c2e29f5c41 Merge branch 'master' into contour_hackathon 2019-08-18 14:49:08 -06:00