Commit Graph

6699 Commits

Author SHA1 Message Date
Robert Maynard
c4e1262e14 Correct symbol visibility issues found by ubsan testing 2019-09-11 08:30:49 -04:00
Robert Maynard
1a70c6f9ed Merge topic 'remove_unneeded_function_from_some_filters'
16a6af585 Some filters had unnecessary DoMapField methods.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1834
2019-09-11 07:59:55 -04:00
Dave Pugmire
a83629e957 compile error. 2019-09-11 07:45:43 -04:00
Dave Pugmire
52fe3c403c compile warnings. 2019-09-11 07:44:16 -04:00
Dave Pugmire
5af465efdb Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into particleAdvectionFloatType 2019-09-11 07:32:31 -04:00
Robert Maynard
16a6af5857 Some filters had unnecessary DoMapField methods.
The CrossProduct and DotProduct are field filters and therefore
fields are automatically propagated instead of calling DoMapField.

As GhostCellClassify is passing through all fields, it can
override `MapFieldOntoOutput` and skip the deduction of the
Field to an ArrayHandle for better compile time.
2019-09-10 15:26:16 -04:00
Kenneth Moreland
b95b7d6109 Merge topic 'get-cast-array-from-field'
630768600 Suppress CUDA warnings
5fa02057a Rely less on overload resolution for ApplyPolicy
26d7bfd0d Force ArrayPolicy of a specific type to the right template
6c136b978 Remove vtkm::BaseComponent
07c59fcf7 Update filters with secondary fields to use new policy method
3039a18ba Add ability to get an array from a Field for a particular type
2b6e6da6c Add ability to get VariantArrayHandle as an ArrayHandleMultiplexer
6323d6803 Add recursive component queries to VecTraits

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1829
2019-09-10 12:05:13 -04:00
Robert Maynard
d57a560997 Merge topic 'correct_warnings_found_by_clang8'
ce67b4f15 Correct signed/unsigned warnings found by clang 8

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1833
2019-09-10 11:17:21 -04:00
Robert Maynard
ce67b4f157 Correct signed/unsigned warnings found by clang 8 2019-09-10 10:49:48 -04:00
Kenneth Moreland
6307686008 Suppress CUDA warnings
There was a warning comes from the functors in support of the portals
for ArrayHandleMultiplexer. The template has no good way to determine
whether the object it is calling is for control or execution, so it
supports both. It is not useful to warn when it happens to compile only
for the host.
2019-09-09 18:33:38 -06:00
Allison Vacanti
9e7da35c8e Merge topic 'fix_particle_advection_cuda_stack'
b9affb7ed Disable copy for RAII helper.
ea0bbfeef Increase CUDA stack size for ParticleAdvection worklets.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1832
2019-09-09 19:38:41 -04:00
Abhishek Yenpure
9e38f02546 Merge topic 'fix_temporal_example'
9b78276ca Updating usage statement for temporal advection example
8e27562ce Adding information about sample datasets in example
fd23bb3c7 Update attributes to include all files in data to lfs
01d735e1a Merge branch 'master' of gitlab.kitware.com:vtk/vtk-m into fix_temporal_example
d9b038fdd Updating method name in unit test
b7191e257 Fixing temporal advection example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1814
2019-09-09 18:52:18 -04:00
Kenneth Moreland
5fa02057ae Rely less on overload resolution for ApplyPolicy
Previously, all the ApplyPolicy functions had the same name and used
template resolution to figure out which one to use. This was pretty
clear at first when there was just one for fields and one for cell sets.
But then it grew to several different types, particularly for fields. It
was hard to look at the code and figure out which form of ApplyPolicy
was being used, and compilers were starting to get confused.

Resolve the problem by giving all the methods unique names to make it
clear which one you expect to be called.
2019-09-09 16:08:11 -06:00
Abhishek Yenpure
9b78276ca8 Updating usage statement for temporal advection example
Update usage message and comments for example data
Add parameter for velocity field
Fix warnings
2019-09-09 15:59:40 -06:00
Allison Vacanti
b9affb7edc Disable copy for RAII helper. 2019-09-09 17:59:38 -04:00
Allison Vacanti
ea0bbfeefc Increase CUDA stack size for ParticleAdvection worklets.
Sometimes the CUDA runtime would not allocate sufficient stack
space for the particle advection code to run. This issue was exposed by
!1737 -- for some reason, once those changes to unrelated filters/worklets
are added to VTK, CUDA allocates less stack and the following tests would
fail:

UnitTestLagrangianFilterCUDA
UnitTestLagrangianStructuresFilterCUDA
UnitTestStreamlineFilterCUDA
UnitTestStreamSurfaceFilterCUDA

These were fixed by increasing the stack size in the particle advection
worklet Run(...) methods.

An RAII helper has been added that will restore the previous stack size
in case an exception is thrown, and the KDTree code has been updated
to use this helper when it adjusts the CUDA stack allocation.
2019-09-09 16:06:23 -04:00
Kenneth Moreland
26d7bfd0db Force ArrayPolicy of a specific type to the right template
There is a form of ApplyPolicy that takes a field and a value type and
returns an ArrayHandle with that value type that can be used directly.
This is implemented with an ArrayHandleMultiplexer.

For some reason, this version of ApplyPolicy magically stopped working.
The compiler, for some reason, grabbed a different overload and then
complained because it tried to use the ValueType as a list. I'm not sure
why this didn't get ignored due to SFINAE. (Maybe a compiler bug.)

At any rate, the problem is fixed by renaming that ApplyPolicy to
ApplyPolicyFieldOfType to make it clear what we are doing and to help
the compiler along.
2019-09-09 13:12:56 -06:00
Kenneth Moreland
6c136b978e Remove vtkm::BaseComponent
This functionality has been superseded by VecTraits::BaseComponentType.
The new functionality also supports replacing the BaseComponentType.
2019-09-09 13:01:03 -06:00
Kenneth Moreland
07c59fcf72 Update filters with secondary fields to use new policy method
Rather than do a CastAndCall on all possible field types when calling a
worklet with two fields (where they all typically get cast to the same
type as the primary field), use the new mechanism with
ArrayHandleMultiplexer to create one code path.

Also update the ApplyPolicy to accept the Field type, which is used to
determine any additional storage types to support.
2019-09-09 08:19:16 -06:00
Kenneth Moreland
3039a18baf Add ability to get an array from a Field for a particular type
This is done through a new version of ApplyPolicy. This version takes
a type of the array as its first template argument, which must be
specified.

This requires having a list of potential storage to try. It will use
that to construct an ArrayHandleMultiplexer containing all potential
types. This list of storages comes from the policy. A StorageList
item was added to the policy.

Types are automatically converted. So if you ask for a vtkm::Float64 and
field contains a vtkm::Float32, it will the array wrapped in an
ArrayHandleCast to give the expected type.
2019-09-09 08:19:15 -06:00
Kenneth Moreland
2b6e6da6ca Add ability to get VariantArrayHandle as an ArrayHandleMultiplexer 2019-09-09 08:19:15 -06:00
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
Dave Pugmire
bd9bc91ac8 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into particleAdvectionFloatType 2019-09-09 07:54:02 -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
Dave Pugmire
c057f6b839 Merge branch 'particleAdvectionFloatType' of gitlab.kitware.com:dpugmire/vtk-m into particleAdvectionFloatType 2019-09-06 08:18:37 -04:00
Dave Pugmire
9ca4cc2d01 type cleanup. 2019-09-06 08:14:55 -04:00
Dave Pugmire
dff3845725 Use vtkm::FloatDefault for particle advection code. 2019-09-05 16:57:37 -04: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
Abhishek Yenpure
8e27562cea Adding information about sample datasets in example 2019-09-04 10:09:36 -06:00
Abhishek Dilip Yenpure (-EXP)
fd23bb3c74 Update attributes to include all files in data to lfs
Originally, only files in the base directory were put into lfs.
With this change, all files in any subdirectory are also put into
lfs.
Also adding the test files for temporal advection to the data directory.
2019-09-04 09:23:50 -06: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
Abhishek Dilip Yenpure (-EXP)
01d735e1aa Merge branch 'master' of gitlab.kitware.com:vtk/vtk-m into fix_temporal_example 2019-09-03 11:53:00 -06: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