Commit Graph

6583 Commits

Author SHA1 Message Date
Robert Maynard
5cd47a7065 DataSetBuilders don't require a cellset name 2019-09-02 09:05:56 -04:00
Robert Maynard
89fa2c0293 Remove multiple vtkm::cont::CellSet from vtkm::cont::DataSet
By removing the ability to have multiple CellSets in a DataSet
we can simplify the following things:

  - Cell Fields now don't require a CellSet name when being constructed
  - Filters don't need to manage what the active cellset is
2019-09-02 09:04:51 -04:00
Kenneth Moreland
80fa659e3f Merge topic 'fix-polygon-gradient'
74e0c5804 Fix some precision warnings
75a060a24 Fix cell derivatives for polygon cell shape
b0b000263 Write out all test data sets in VTKDataSetWriter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1819
2019-08-30 14:44:06 -04:00
Kenneth Moreland
74e0c58046 Fix some precision warnings 2019-08-30 11:33:17 -06:00
Kenneth Moreland
75a060a243 Fix cell derivatives for polygon cell shape
For polygon cell shapes (that are not triangles or quadrilaterals),
interpolations are done by finding the center point and creating a
triangle fan around that point. Previously, the gradient was computed in
the same way as interpolation: identifying the correct triangle and
computing the gradient for that triangle.

The problem with that approach is that makes the gradient discontinuous
at the boundaries of this implicit triangle fan. To make things worse,
this discontinuity happens right at each vertex where gradient
calculations happen frequently. This means that when you ask for the
gradient at the vertex, you might get wildly different answers based on
floating point imprecision.

Get around this problem by creating a small triangle around the point in
question, interpolating values to that triangle, and use that for the
gradient. This makes for a smoother gradient transition around these
internal boundaries.
2019-08-29 17:37:42 -06:00
Kenneth Moreland
b0b000263e Write out all test data sets in VTKDataSetWriter
Although convenient, one of the issues of creating data with
MakeTestDataSet is that it is hard to look at the data created. It is
often helpful to be able to bring in the data into something like
ParaView or VisIt to play with it. To enable that, write them all out as
part of UnitTestVTKDataSetWriter.
2019-08-29 16:48:53 -06:00
Dave Pugmire
4b0b0bcfc9 Merge topic 'simplifyParticleAdvectionExample'
e34639818 Add example data file.
cbc6e2e7c don't need know the pos in string::find.
c56e53b6c Simplify particle advection example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1816
2019-08-29 14:25:40 -04:00
Nickolas Davis
5aa026ec3b Merge topic 'remove-array-portal-shrink'
2d9f7ea95 add changelog entry
cdcc311dc removed ArrayPortalShrink

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1796
2019-08-28 15:39:23 -04:00
Nick Davis
2d9f7ea95b add changelog entry 2019-08-28 12:45:44 -06:00
nadavi
cdcc311dc2 removed ArrayPortalShrink 2019-08-28 12:45:44 -06:00
Dave Pugmire
e34639818c Add example data file. 2019-08-28 11:14:30 -04:00
Dave Pugmire
cbc6e2e7c6 don't need know the pos in string::find. 2019-08-28 07:54:10 -04:00
Dave Pugmire
c56e53b6c4 Simplify particle advection example 2019-08-28 07:48:20 -04:00
Robert Maynard
39d215c8c0 Merge topic 'properly_export_cuda_requires_static_libs'
a65afa11b Export CUDA static library requirements properly
6b0614e57 EXTEND_VTKM used to determine consumers by vtkm_add_target_information

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1815
2019-08-27 17:25:47 -04:00
Robert Maynard
a65afa11ba Export CUDA static library requirements properly
This is a work around while we wait on requiring CMake 3.15 for all
cuda builds. At that point we can replace this with setting
`requires_static_builds` as part of the EXPORT_PROPERTIES of the
vtkm_cuda target.

This has been tested with the ascent proxy
2019-08-27 13:34:49 -04:00
Robert Maynard
6b0614e577 EXTEND_VTKM used to determine consumers by vtkm_add_target_information
The EXTEND_VTKM is now checked to determine when a shared library
consumer of VTK-m is allowed.
2019-08-27 13:32:29 -04:00
Kenneth Moreland
871b444800 Merge topic 'vtk-file-metadata-information-skip'
a9bbb6ead Permute cells inline
d37ab7732 Add ability to read FIELD section in vtk legacy files
19a610f5e Fix skipping over information in vtk files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1797
2019-08-27 09:24:48 -04:00
Dan Lipsa
b9c7396184 Merge topic 'circular-dependency'
001617b2a Fix comment and install.
60711eb19 Remove circular dependency between GridEvaluators and Integrators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1813
2019-08-27 09:02:04 -04:00
Dan Lipsa
001617b2ad Fix comment and install. 2019-08-27 08:41:50 -04:00
Dan Lipsa
60711eb193 Remove circular dependency between GridEvaluators and Integrators 2019-08-26 23:26:37 -04:00
Kenneth Moreland
0e0fae5769 Merge topic 'point-transform-transforms-points'
1f8030a6e Add non-const version of DataSet::Get methods
69226803c Make PointTransform actually transform the points

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1803
2019-08-26 18:46:24 -04:00
Robert Maynard
064f59692b Merge topic 'yet_again_export_cuda_flags'
3c1339504 Another turn on the wheel to get VTK-m to export CUDA flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1812
2019-08-26 17:25:40 -04:00
Allison Vacanti
555880877c Merge topic 'fix-orient-normals-device'
93c5c50b9 Ensure that the serial device is enabled during part of OrientNormals test.
ff7db9780 Add RuntimeDeviceTracker::PrintSummary for debugging.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1810
2019-08-26 17:18:08 -04:00
Robert Maynard
3c1339504f Another turn on the wheel to get VTK-m to export CUDA flags
This is a work around while we wait on requiring CMake 3.15 for all
cuda builds. At that point we can replace this with setting
`cuda_architecture_flags` as part of the EXPORT_PROPERTIES of the
vtkm_cuda target.

This has been tested with the ascent proxy
2019-08-26 16:54:43 -04:00
Allison Vacanti
93c5c50b9c Ensure that the serial device is enabled during part of OrientNormals test.
Once #377 is implemented we won't need this, but for now we have to
use the serial connectivity tables while validating the OrientNormals
output. Ensure that the serial device can be used during the validation
stage.
2019-08-26 16:44:24 -04:00
Robert Maynard
6221bd5fcb Merge topic 're-enable_all_vtkm_tests'
683f2a2c1 Correct a bug which stopped VTK-m from testing against all devices

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1808
2019-08-26 16:20:44 -04:00
Kenneth Moreland
1f8030a6e8 Add non-const version of DataSet::Get methods
A non-const version of GetCoordinateSystem was added to implement a
change to the point transform filter. To make things symmetric (and
provide likely future needs), also add non-const versions of getting the
fields and cell sets.
2019-08-26 13:58:11 -06:00
Kenneth Moreland
a9bbb6ead9 Permute cells inline
The poly data and unstructured grid readers have to permute the cell
data to componsate for differences between VTK and VTK-m cell shapes.
Previously, this permutation was implemented by casting the read data to
a type and then changing the data. However, some code paths caused the
cast to fail. Get around that by doing the permutation in line when the
data are read.
2019-08-26 13:35:20 -06:00
Allison Vacanti
ff7db97807 Add RuntimeDeviceTracker::PrintSummary for debugging. 2019-08-26 14:58:31 -04:00
Kenneth Moreland
d37ab77326 Add ability to read FIELD section in vtk legacy files
Previously, the VTK file readers just skipped over everything in FIELD
sections. However, it is common for many point and cell fields to be
written in this section (it is how ParaView writes out most of its
data). This change will allow these fields to be read in correctly.
2019-08-26 12:36:55 -06:00
Kenneth Moreland
19a610f5e9 Fix skipping over information in vtk files
Previously, if a legacy VTK file had a METADATA section with an
INFORMATION subsection, the reader did not skip over it correctly.
Instead, it just read the rest of the file (and often encountered an
error). Change this to read and skip over the INFORMATION subsection
correctly.
2019-08-26 12:36:54 -06:00
Kenneth Moreland
69226803c2 Make PointTransform actually transform the points
The primary (likely only) use of PointTransform is to perform affine
transform on the position of the mesh. However, PointTransform did not
actually move the mesh. Rather, it just created a new field with the
transformed points.

Now, the output has its coordinate system replaced with the transformed
one generated (in addition to be added as a field). This can be turned
off (but defaults to on).

Also changed the constructor to turn on UseCoordinateSystemAsField so
that by default the filter operates on the existing coordinate system
and replaces it with the new coordinate system.

Also removed the template parameter on the filter. That added an
unnecessary complication to using it.
2019-08-26 12:29:24 -06:00
Robert Maynard
683f2a2c10 Correct a bug which stopped VTK-m from testing against all devices
The testing code wouldn't generate tests except for the first
device, when multiple devices had been enabled.
2019-08-26 12:28:49 -04:00
Allison Vacanti
673e3d38df Merge topic '372_unify_atomic_interfaces'
884616788 Simplify and extend AtomicArray implementation.
9560c4f63 Limit testing dispatch of atomic array to only atomic types.
0e728c800 Update atomic interfaces to support Add/CAS for UInt32/64.
720b452eb Force AtomicArray to use only basic storage arrays.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1802
2019-08-26 10:07:10 -04:00
Robert Maynard
f45e3ae1b8 Merge topic 'cast_and_call_for_cellset_extrude'
adc9e63df vtkm::cont::CastAndCall now supports CellSetExtrude

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1805
2019-08-23 17:13:10 -04:00
Robert Maynard
b32b92de8e Merge topic 'examples_compile_under_cuda'
c45471407 Examples now compile when CUDA is enabled.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1807
2019-08-23 17:11:50 -04:00
Allison Vacanti
884616788a Simplify and extend AtomicArray implementation.
- Use AtomicInterface to implement device-specific atomic operations.
- Remove DeviceAdapterAtomicArrayImplementations.
- Extend supported atomic types to include unsigned 32/64-bit ints.
- Add a static_assert to check that AtomicArray type is supported.
- Add documentation for AtomicArrayExecutionObject, including a CAS
  example.
- Add a `T Get(idx)` method to AtomicArrayExecutionObject that does
  an atomic load, and update existing CAS usage to use this instead
  of `Add(idx, 0)`.
2019-08-23 15:40:37 -04:00
Allison Vacanti
9560c4f633 Limit testing dispatch of atomic array to only atomic types. 2019-08-23 15:40:37 -04:00
Allison Vacanti
0e728c8000 Update atomic interfaces to support Add/CAS for UInt32/64.
These will be used for the AtomicArray implementation.
2019-08-23 15:40:37 -04:00
Allison Vacanti
720b452eb4 Force AtomicArray to use only basic storage arrays.
The StorageType template parameter is misleading, since
TransportTagAtomicArray errors out for non-basic storage.
2019-08-23 15:40:37 -04:00
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
Allison Vacanti
1a73641f9d Merge topic '391_reduce_device_transfers'
3eb91af96 Use ArrayGetValue where possible in worklets.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1799
2019-08-23 10:14:43 -04:00
Robert Maynard
adc9e63df9 vtkm::cont::CastAndCall now supports CellSetExtrude 2019-08-23 10:02:01 -04:00
Ben Boeckel
7b8b223c53 Merge topic 'fix-taotuple-import'
Fix taotuple import

Acked-by: Robert Maynard <robert.maynard@kitware.com
Merge-request: !1801
2019-08-23 09:00:44 -04:00
Ben Boeckel
427f961f6e Merge topic 'update-diy'
Update diy

Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com
Merge-request: !1800
2019-08-23 08:59:51 -04:00
Dave Pugmire
caa4c0f071 Merge topic 'streamSrfFilter'
326c04f46 Rework internals of stream surface filter.
c1ee0109b Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into streamSrfFilter
5ef882463 Add filter for stream surface worklet.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1782
2019-08-23 07:46:12 -04:00
Allison Vacanti
3eb91af961 Use ArrayGetValue where possible in worklets.
Replace code such as `myArray.GetPortalControl().Get(0)` with
`vtkm::cont::ArrayGetValue(0, myArray)`, which will just retrieve
the single value without transferring the entire contents of
`myArray` to the host. This should prevent memory thrashing.

Also did some general style clean-ups and fixed loops that called
`GetPortalControl` in the loop body.
2019-08-22 16:42:17 -04:00
Dave Pugmire
8594936015 Merge topic 'tubeFilter'
0c25daf90 compile warnings.
43ddcab81 Add support for field mapping.
cbc972f10 Add Tube Filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1781
2019-08-22 15:09:49 -04:00
Ben Boeckel
f5b3e23573 Merge branch 'upstream-taotuple' into fix-taotuple-import
* upstream-taotuple:
  taotuple 2019-06-05 (990962ae)
2019-08-22 14:10:06 -04:00
TaoCpp Tuple Upstream
5c34b7918e taotuple 2019-06-05 (990962ae)
Code extracted from:

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

at commit 990962ae6278efcd7f04ab1b40643a5da4395cf3 (for/vtk-m).
2019-08-22 14:10:06 -04:00