Commit Graph

6612 Commits

Author SHA1 Message Date
Kenneth Moreland
6323d6803e Add recursive component queries to VecTraits
Added a BaseComponentType to VecTraits that recursively finds the base
(non-Vec) type of a Vec. This is useful when dealing with potentially
nested Vec's (e.g. Vec<Vec<T, M>, N>) and you need to keep the structure
but know the base type.

Also added a couple of templates for keeping the structure but changing
the type. These are ReplaceComponentType and ReplaceBaseComponentType.
These allow you to create new Vec's with the same structure as the query
Vec but with differen component types.
2019-09-09 08:19:15 -06:00
Kenneth Moreland
dca71a60de Merge topic 'data-set-builder-uses-floatdefault'
a0df206c9 Use default float to build explicit data sets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1830
2019-09-09 10:16:31 -04:00
Kenneth Moreland
a0df206c93 Use default float to build explicit data sets
The DataSetBuilderExplicitIterative class used to use an ArrayHandle of
vtkm::Vec3f_32 values, which are always of type Float32. This can cause
unexpected results when using double precision by default (i.e. when
FloatDefault is set to Float64). Change that to give Float32 values by
default.
2019-09-08 14:44:57 -06:00
Abhishek Yenpure
7c94c82d32 Merge topic 'lcs_flowamp_fix'
8ece545dc Fixing compiler warning
c9bc005f8 Addressing Ken's review suggestions
1925e356b Merge branch 'master' of gitlab.kitware.com:vtk/vtk-m into lcs_flowamp_fix
45eeab4df Fix LCS filter to use flowmaps

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1809
2019-09-08 10:50:26 -04:00
Abhishek Yenpure
73185eeb44 Merge topic 'grid_eval_curvilinear_grids'
1df07f739 Adding testing paths for Curvilinear case
f45491281 Merge branch 'master' of gitlab.kitware.com:vtk/vtk-m into grid_eval_curvilinear_grids
1697ca48c Adding testing paths for Curvilinear case
507336f14 More cases for Grid Evaluator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Merge-request: !1811
2019-09-07 23:19:13 -04:00
Abhishek Yenpure
8ece545dc1 Fixing compiler warning 2019-09-06 15:14:51 -06:00
Abhishek Yenpure
c9bc005f83 Addressing Ken's review suggestions
1. Removing `cswap` which caused confusion in understanding stuff.
2. Fixing 64 bit coords issue for Lagrangian Strucutres Test
2019-09-06 12:06:15 -06:00
Abhishek Yenpure
1925e356b2 Merge branch 'master' of gitlab.kitware.com:vtk/vtk-m into lcs_flowamp_fix 2019-09-05 14:21:19 -06:00
Allison Vacanti
30733609eb Merge topic '411_copy_fancy_arrays'
6f426a57b Allow ArrayCopy to copy read-only implicit arrays.
12ab99b30 Simplify IsWritableArrayHandle usage.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1826
2019-09-05 08:11:26 -04:00
Abhishek Yenpure
1df07f7395 Adding testing paths for Curvilinear case
Adding testing paths for curvilinear case

Changing names of interpolation helpers to be consistent

Rectifying interpolation helper error messages to reflect correct
location and types of failures
2019-09-04 16:53:02 -06:00
Abhishek Yenpure
f454912813 Merge branch 'master' of gitlab.kitware.com:vtk/vtk-m into grid_eval_curvilinear_grids 2019-09-04 14:34:32 -06:00
Abhishek Yenpure
1697ca48c5 Adding testing paths for Curvilinear case 2019-09-04 14:33:20 -06:00
Allison Vacanti
6f426a57be Allow ArrayCopy to copy read-only implicit arrays. 2019-09-04 15:11:52 -04:00
Allison Vacanti
12ab99b300 Simplify IsWritableArrayHandle usage.
IsWritableArrayHandle can now be used directly as `std::true_type` or
`std::false_type` without having to pull the `type` member out of a
dependent namespace.
2019-09-04 15:11:51 -04:00
Allison Vacanti
e8afcfd7d8 Merge topic '405_partitioned_ds'
63050f68f `MultiBlock` renamed to `PartitionedDataSet`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !1821
2019-09-04 07:22:07 -04:00
Allison Vacanti
e143eaf2e6 Merge topic 'ScanExclusiveExtend'
afe1bd12d Add `ScanExtended` device algorithm.
1480efaeb Add perf logging to DeviceAdapterAlgorithmSerial.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1824
2019-09-04 07:21:37 -04:00
Robert Maynard
41ac138d6d Merge topic 'cellsets_dont_have_names'
3b89bc0db CellSet classes don't require a name
5cd47a706 DataSetBuilders don't require a cellset name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1820
2019-09-03 15:37:32 -04:00
Allison Vacanti
afe1bd12dd Add ScanExtended device algorithm.
This behaves just like `ScanExclusive`, but rather than returning the
total sum, it is appended to the end of the output array.

This is in preparation for the CellSetExplicit refactoring described in
issue #408.
2019-09-03 15:02:41 -04:00
Robert Maynard
95c8c2180a Merge topic 'langrangian_cleanup'
9cd6cd85d Lagrangian now doesn't output to std::cout

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Abhishek Yenpure <abhishek@uoregon.edu>
Merge-request: !1823
2019-09-03 14:44:50 -04:00
Allison Vacanti
1480efaeba Add perf logging to DeviceAdapterAlgorithmSerial. 2019-09-03 14:19:10 -04:00
Robert Maynard
9cd6cd85d0 Lagrangian now doesn't output to std::cout 2019-09-03 14:11:50 -04:00
Allison Vacanti
63050f68fc MultiBlock renamed to PartitionedDataSet
The `MultiBlock` class has been renamed to `PartitionedDataSet`, and its API
has been refactored to refer to "partitions", rather than "blocks".
Additionally, the `AddBlocks` method has been changed to `AppendPartitions` to
more accurately reflect the operation performed. The associated
`AssignerMultiBlock` class has also been renamed to
`AssignerPartitionedDataSet`.

This change is motivated towards unifying VTK-m's data model with VTK. VTK has
started to move away from `vtkMultiBlockDataSet`, which is a hierarchical tree
of nested datasets, to `vtkPartitionedDataSet`, which is always a flat vector
of datasets used to assist geometry distribution in multi-process environments.
This simplifies traversal during processing and clarifies the intent of the
container: The component datasets are partitions for distribution, not
organizational groupings (e.g. materials).

Ref #405
2019-09-03 12:42:23 -04:00
Kenneth Moreland
b20c903b4d Merge topic 'human-readable-size-id'
11aed6a79 Add template cases to GetHumanReadableSize/GetSizeString
02987c383 Enable human readable sizes for vtkm::Id

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1822
2019-09-02 23:29:52 -04:00
Kenneth Moreland
11aed6a794 Add template cases to GetHumanReadableSize/GetSizeString
One of the dashboard compilers was complaining about not being able to
resolve which overload to use for std::size_t. (Perhaps on CUDA
std::size_t is sometimes not an unsigned 64-bit integer.) Try to correct
this by adding a templated method that casts anything to vtkm::UInt64.
2019-09-02 18:12:20 -06:00
Kenneth Moreland
02987c3839 Enable human readable sizes for vtkm::Id
The functions GetHumanReadableSize and GetSizeString accepted a
vtkm::UInt64 as the size, which should hold pretty much any reasonable
memory size and is compatible with std::size_t. But it has a different
sign-ness as vtkm::Id. So if you are holding an array size with vtkm::Id
(which is common), you could get a compiler warning when using these
functions, which is annoying. So, for convenience add a second form of
these methods that takes a vtkm::Id and automatically converts.
2019-09-02 11:19:23 -06:00
Robert Maynard
3b89bc0db2 CellSet classes don't require a name 2019-09-02 10:39:58 -04:00
Robert Maynard
5cd47a7065 DataSetBuilders don't require a cellset name 2019-09-02 09:05:56 -04:00
Robert Maynard
f203ccbd91 Merge topic 'dataset_only_have_single_cellsets'
89fa2c029 Remove multiple vtkm::cont::CellSet from vtkm::cont::DataSet

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1818
2019-09-02 09:05:49 -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