Commit Graph

558 Commits

Author SHA1 Message Date
Nick Thompson
f1cf6c762a Refactor to more idiomatic use of worklets. 2021-04-09 14:56:19 -04:00
Nick Thompson
7b95ef5975 Refactor the structs to classes. 2021-04-09 14:54:12 -04:00
Nick Thompson
eac6c21c84 Workletize the logistic map. 2021-04-09 12:42:40 -04:00
Kenneth Moreland
a6725b3acd Remove use of deprecated ImplicitFunctions with virtual methods
Unfortunately, this introduces a backward-incompatible change with the
filters that use ImplicitFunctions. Before, they would get an
ImplicitFunctionHandle. This class is deprecated, and there is no easy
way to get back the actual type of implicit function stored in it.
2021-02-22 06:40:02 -07:00
Kenneth Moreland
047d79672a Fix CUDA compilation error with Lagrangian filter
CUDA architecture has a limited amount of memory available for
constants. The CUDA compiler uses this space to hold constants for some
optimizations. However, for large kernels, the number of constants
needed might be larger than the constant space available. For these
conditions, you have to disable this form of optimization with the `-
Xptxas --disable-optimizer-constants` flags.

Currently, the only file that seems to have this issue is the test for
the Lagrangian filter. Someone should take a closer look to see if this
filter in particular is making unnecessarily large worklet/kernel. (In
particular, why does the Lagrangian filter have a larger kernel than the
streamline and stream surface filters?)

If this occurance happens more often, we might need to add some ways to
configure it in the build.
2021-02-16 13:25:11 -07:00
Kenneth Moreland
1faed3712e Remove the use of ResetTypes for ArrayCopy
It used to be the case where you needed to call `ResetTypes` on a
`VariantArrayHandle` before using `ArrayCopy` to limit the types it gets
compiled for. However, there is now a general form for
`UnknownArrayHandle`, so `ResetTypes` no longer does anything useful in
this case. Remove the use of that.
2021-02-02 17:34:08 -07:00
Kenneth Moreland
26ea2ab420 Break circular dependency of ArrayCopy.h and UnknownArrayHandle.h
The circular dependency came from UnknownArrayHandle.h needing
VTKmDefaultTypes.h, which needed all the cell set types. Some of those
cell sets used ArrayCopy in templated functions. Changed those functions
to directly deep copy the ArrayHandle.
2021-02-02 17:33:08 -07:00
Gunther H. Weber
7ed0cd1562 Fix deprecation warning 2021-02-02 13:46:14 -08:00
Oliver Ruebel
c9af28756c Fix ValueType error in pre-split data read 2021-02-02 13:46:01 -08:00
Kenneth Moreland
8b133288ce Fix deprecation warnings
There was an error that caused deprecation warnings in VTK-m to be
suppressed, which meant that many uses of deprecated features went
unnoticed. This fixes those deprecation warnings.

The majority of the warnings were caused by the use of the deprecated
`Cast`, `CopyTo`, and `ResetTypes` methods of `UnknownArrayHandle` (or
`VariantArrayHandle`). Both `Cast` and `CopyTo` have been subsumed by
`AsArrayHandle` (to make the functionality more clear). `ResetTypes` now
requires a second template argument to define the storage types to try.

Also fixed some issues with `SerializableField` being deprecated.
This class is no longer necessary because `Field` can now be directly
serialized.
2021-01-26 07:56:39 -07:00
Nick Thompson
c6c4492469 Fix CUDA build for logistic map example. 2021-01-19 15:20:58 -05:00
Nick Thompson
18a6b12509 Merge topic 'logistic'
61522fde7 Add #includes and explicitly identify the field name.
1bad28a3e Logistic map as an example of how to use the ImageWriter.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nickolas Davis <nadavi@sandia.gov>
Merge-request: !2385
2021-01-19 14:42:42 -05:00
Nick Thompson
61522fde7b Add #includes and explicitly identify the field name. 2021-01-19 08:13:35 -05:00
Nick Thompson
1bad28a3ec Logistic map as an example of how to use the ImageWriter. 2021-01-16 15:13:33 -05:00
Kenneth Moreland
11a4c9867e Change Field to hold UnknownArrayHandle rather than VariantArrayHandle
The `VariantArrayHandle` will soon be deprecated for its replacement of
`UnknownArrayHandle`. Thus, `Field` and related classes should start
using the new `UnknownArrayHandle`.
2021-01-14 17:01:22 -07:00
Oliver Ruebel
6db948c685 Remove commented ifdef guard 2020-12-02 14:29:17 -08:00
Oliver Ruebel
c18f5bb5f7 Automatically enable --useFullBoundary option when using marching cubes 2020-12-02 14:29:17 -08:00
Oliver Ruebel
f536b825e4 Remove unused code in distributed contour tree app 2020-12-02 14:29:17 -08:00
Gunther H. Weber
a868b02bdb Add --saveTreeCompilerData option to hact_test.sh 2020-12-02 14:29:17 -08:00
Gunther H. Weber
226606276d Temprarily print error message when trying to use MC connectvitiy without full boundary 2020-12-02 14:29:17 -08:00
Oliver Ruebel
08447c24b1 Add support for using only necessary boundary vertices 2020-12-02 14:29:16 -08:00
Gunther H. Weber
4b14c84ec5 Fix 3D split data Python helper tool. 2020-12-02 14:29:16 -08:00
Oliver Ruebel
a75e539686 Add barriers in distributed contour tree example to improve timing 2020-12-02 14:29:16 -08:00
Oliver Ruebel
94f4fcb408 Added saveTreeCompilerData option for distributed contour tree app example 2020-12-02 14:29:15 -08:00
Oliver Ruebel
17f2f845e7 Minor fixed for performane logging 2020-12-02 14:29:15 -08:00
Oliver Ruebel
b4ac4cdef9 Made log levels and summary forwarding configurable in distributed contour tree example 2020-12-02 14:29:15 -08:00
Oliver Ruebel
d71259fdb7 Add contour tree, boundary tree, and interior forest array stat print 2020-12-02 14:29:15 -08:00
Gunther H. Weber
0ac6707269 Fix reading BOV files and depracation warning. 2020-12-02 14:29:14 -08:00
Gunther H. Weber
8b00e8ec48 Add command line option to select pre split files at runtime. 2020-12-02 14:29:14 -08:00
Oliver Ruebel
4f8c28a82a Make dot print configurable 2020-12-02 14:29:13 -08:00
Gunther H. Weber
c247c7d0e3 Save block extents and block index to files and read them instead of approximating them 2020-12-02 14:29:13 -08:00
Gunther H. Weber
391dba57e2 Add VTK-m copyright statement to tree compiler 2020-12-02 14:29:12 -08:00
Gunther H. Weber
8b21a8e07d Add test scripts to run tests via example application. 2020-12-02 14:29:12 -08:00
Gunther H. Weber
7a77b1ad89 Added serial (via DIY) unit test for distributed contour tree filter. 2020-12-02 14:29:12 -08:00
Gunther H. Weber
e007405fee Read blocks per dim from file instead of trying to figure it out via approximation 2020-12-02 14:29:12 -08:00
Gunther H. Weber
7661b17e5b Return fields required by TreeCompiler as vtk-m data set from filter. 2020-12-02 14:29:12 -08:00
Gunther H. Weber
f433790a17 Ported distributed contour tree prototype to vtk-m 2020-12-02 14:29:11 -08:00
Gunther H. Weber
1074c0172b Commented out incomplete code creating a warning 2020-09-18 06:33:09 -07:00
Gunther H. Weber
af697e4527 Use std::swap instead of manual swap 2020-09-15 13:46:11 -07:00
Gunther H. Weber
991f7a85ad Refactor mesh classes: switch from row/col/slice to vtkm::Id2/Id3 2020-09-15 11:15:27 -07:00
Dave Pugmire
596ec20e90 Change particle type in examples 2020-08-26 09:36:09 -04:00
Kitware Robot
cf0cdcf7d1 clang-format: reformat the repository with clang-format-9 2020-08-24 14:01:08 -04:00
dpugmire
c806403e2a distributed memory support for streamline and particleadvect filters. 2020-08-13 09:53:57 -04:00
Petar Hristov
ad497e2619 Merged with master. 2020-07-27 16:27:14 +01:00
Petar Hristov
ce653c78f1 Fixed contour tree example app. 2020-07-24 14:17:36 +01:00
Kenneth Moreland
d1a4aecc59 Improvements to moving data into ArrayHandle
We have made several improvements to adding data into an `ArrayHandle`.

## Moving data from an `std::vector`

For numerous reasons, it is convenient to define data in a `std::vector`
and then wrap that into an `ArrayHandle`. It is often the case that an
`std::vector` is filled and then becomes unused once it is converted to an
`ArrayHandle`. In this case, what we really want is to pass the data off to
the `ArrayHandle` so that the `ArrayHandle` is now managing the data and
not the `std::vector`.

C++11 has a mechanism to do this: move semantics. You can now pass
variables to functions as an "rvalue" (right-hand value). When something is
passed as an rvalue, it can pull state out of that variable and move it
somewhere else. `std::vector` implements this movement so that an rvalue
can be moved to another `std::vector` without actually copying the data.
`make_ArrayHandle` now also takes advantage of this feature to move rvalue
`std::vector`s.

There is a special form of `make_ArrayHandle` named `make_ArrayHandleMove`
that takes an rvalue. There is also a special overload of
`make_ArrayHandle` itself that handles an rvalue `vector`. (However, using
the explicit move version is better if you want to make sure the data is
actually moved.)

## Make `ArrayHandle` from initalizer list

A common use case for using `std::vector` (particularly in our unit tests)
is to quickly add an initalizer list into an `ArrayHandle`. Now you can
by simply passing an initializer list to `make_ArrayHandle`.

## Deprecated `make_ArrayHandle` with default shallow copy

For historical reasons, passing an `std::vector` or a pointer to
`make_ArrayHandle` does a shallow copy (i.e. `CopyFlag` defaults to `Off`).
Although more efficient, this mode is inherintly unsafe, and making it the
default is asking for trouble.

To combat this, calling `make_ArrayHandle` without a copy flag is
deprecated. In this way, if you wish to do the faster but more unsafe
creation of an `ArrayHandle` you should explicitly express that.

This requried quite a few changes through the VTK-m source (particularly in
the tests).

## Similar changes to `Field`

`vtkm::cont::Field` has a `make_Field` helper function that is similar to
`make_ArrayHandle`. It also features the ability to create fields from
`std::vector`s and C arrays. It also likewise had the same unsafe behavior
by default of not copying from the source of the arrays.

That behavior has similarly been depreciated. You now have to specify a
copy flag.

The ability to construct a `Field` from an initializer list of values has
also been added.
2020-07-23 10:53:38 -06:00
Li-Ta Lo
537557ef91 Merge topic 'worket_invoker_dispatcher2'
0dcc6cc16 reverse #include on CellNeighborhood
2489da125 restore comment, add needed #include
f33318247 Reverse Invoker, Dispatcher and Worklet dependency

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2192
2020-07-22 14:20:35 -04:00
Li-Ta Lo
2489da1259 restore comment, add needed #include 2020-07-21 18:21:44 -06:00
Li-Ta Lo
f333182476 Reverse Invoker, Dispatcher and Worklet dependency 2020-07-21 17:25:43 -06:00
dpugmire
246be1b7f0 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into generalizeField 2020-07-21 15:03:08 -04:00