Commit Graph

214 Commits

Author SHA1 Message Date
Kenneth Moreland
245fc3a983 Compile IO library without device compiler 2022-01-24 12:17:23 -07:00
Julien Schueller
a6dcac2cb1 Fix build with MinGW
Co-authored-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2022-01-19 16:41:42 +00:00
Kenneth Moreland
4650a1da96 Deprecate old methods from DynamicCellSet
The `DynamicCellSet` (and the related `DynamicCellSetBase`) are
deprecated and replaced with `UnknownCellSet` (and `UncertainCellSet`).
Thus, `UnknownCellSet` has some methods inherited from `DynamicCellSet`
but replaced with other functionality. These methods are now marked as
deprecated and their use is removed.
2022-01-05 08:18:17 -07:00
Kenneth Moreland
0a89a5fff5 Store UnknownCellSet instead of DynamicCellSet in DataSet
`UnknownCellSet` is an updated replacement for `DynamicCellSet`. The
next step in the replacement is to change `DataSet` to use the new
class.

Also replaced `DynamicCellSet` with `UnknownCellSet` in a few
places where `DynamicCellSet.h` was not directly included (and
therefore now no longer included at all). This change would have
to be made at some point anyway.
2022-01-03 13:52:30 -07:00
Kenneth Moreland
a2ab460f5d Compile more sources without device compiler
We have been doing a better job at hiding device code (and moving code
into libraries). Smoke out source that no longer needs to be compiled by
device compilers.
2022-01-03 08:23:04 -07:00
Li-Ta Lo
942653bbe2 Extract implementation of MakeTestDataSet to .cxx 2021-12-13 19:11:40 -07:00
Li-Ta Lo
1de5fef122 minor fix 2021-10-14 14:42:02 -06:00
Li-Ta Lo
5e87ed858c make most of the vtkm_io library not DEVICE_SOURCE 2021-10-14 12:38:52 -06:00
Li-Ta Lo
08ad08b138 Merge branch 'master' into osc_refactor 2021-10-13 15:32:28 -06:00
Li-Ta Lo
b9c2ddf9d1 add missing #include 2021-10-13 13:22:26 -06:00
Kenneth Moreland
8f1c453c0b Support writing binary files to legacy VTK files
The legacy VTK file writer writes out in ASCII. This is helpful when a
human is trying to read the file. However, if you have more than a
trivial amount of data, the file can get impractically large. To get
around this, `VTKDataSetWriter` now has a flag that allows you to write
the data in binary format.
2021-10-11 13:08:59 -06:00
Kenneth Moreland
b1343474c1 Consolidate count-to-offset algorithms
For no particularly good reason, there were two functions that converted
and array of counts to an array of offsets: `ConvertNumComponentsToOffsets`
and `ConvertNumIndicesToOffsets`. These functions were identical, except
one was defined in `ArrayHandleGroupVecVariable.h` and the other was
defined in `CellSetExplicit.h`.

These two functions have been consolidated into one (which is now called
`ConvertNumComponentsToOffsets`). The consolidated function has also been
put in its own header file: `ConvertNumComponentsToOffsets.h`.

Normally, backward compatibility would be established using deprecated
features. However, one of the things being worked on is the removal of
device-specific code (e.g. `vtkm::cont::Algorithm`) from core classes like
`CellSetExplicit` so that less code needs to use the device compiler
(especially downstream code).

Part of this change removed unnecessary includes of `Algorithm.h` in
`ArrayHandleGroupVecVariable.h` and `CellSetExplicit.h`. This header had to
be added to some classes that were not including it themselves.
2021-09-16 14:24:41 -06:00
Sujin Philip
9bb10b3961 Fix VTKDataSetWriter writing char types 2021-08-06 09:58:26 -04:00
Kenneth Moreland
1fb1141723 Update code to use ArrayCopyShallowIfPossible
There were several places in the code that had to check the type of an
`UnknownArrayHandle` and conditionally get or copy that array. This code
is simplified by using `ArrayCopyShallowIfPossible`.
2021-07-15 08:53:52 -06:00
Ben Boeckel
4c7fe13a98 cmake: avoid adding testing directories if testing is disabled
Some testing directories have side effects such as installing headers or
compiling code that ultimately doesn't end up getting used.
2021-06-01 18:40:40 -04:00
Sujin Philip
57f5168114 Support reading Global and Pedigree ids 2021-05-17 09:52:21 -04:00
Sujin Philip
a01e4335d2 Support reading new format cells 2021-05-17 09:51:21 -04:00
Sujin Philip
d7b2fec447 Fix reading of string arrays 2021-05-17 09:51:12 -04:00
Kenneth Moreland
68f39b86a8 Deprecate VariantArrayHandle
`VaraintArrayHandle` has been replaced by `UnknownArrayHandle` and
`UncertainArrayHandle`. Officially make it deprecated and point users to
the new implementations.
2021-04-07 16:12:38 -06:00
nadavi
7f86a16b37 add missing include 2021-04-07 17:54:34 +00:00
nadavi
78e3cbb501 Move regression test images into subdirs, implement io library support 2021-03-24 22:57:32 +00:00
Nick Thompson
4cb661006e Implement GetIndices. 2021-03-12 14:40:27 -05:00
Nick Thompson
2d35ab05ac Write CellSetExtrude as CellSetExplicit. 2021-03-08 10:18:42 -05:00
mclarsen
1c060d9c50 more missing sstream headers 2021-02-26 13:49:42 -08:00
mclarsen
5be6fb0c50 add another missing header 2021-02-26 07:35:26 -08:00
mclarsen
572840f492 add another missing header 2021-02-26 07:29:18 -08:00
Kenneth Moreland
04f020ae65 Update Field to use new ArrayRangeCompute features
Reduces the amount of code that has to be generated. Also improves the
number of arrays supported and has better support for deprecated
versions of `GetRange`.
2021-02-17 09:18:36 -07:00
Caitlin Ross
40185ee440 attempting to fix various build and linking errors 2021-02-10 15:20:35 -05: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
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
Li-Ta Lo
081f8aaea8 reformat if statements, add comments on the HDF5 macros 2021-01-15 15:05:52 -07:00
Li-Ta Lo
e65c0713b8 move #include of hdf5.h into .cxx files 2021-01-15 09:12:52 -07:00
Li-Ta Lo
ff0b8fd0bb changed to CMake files based on Robert's feedback 2021-01-14 14:23:05 -07:00
Li-Ta Lo
ca0ce4de7b Merge branch 'master' into hdf5_image_io 2021-01-14 14:08:00 -07:00
Kenneth Moreland
a6edc832da Merge topic 'soa-array-default'
cecd81d5d Add types appropriate for Ascent
865855ea0 Add changelog for making ArrayHandleSOA a default array
50ff9c22a Add support of `ArrayHandleSOA` as a default storage type
bc09a9cd1 Add precompiled versions of `ArrayRangeCompute` for `ArrayHandleSOA`
77f9ae653 Support `ArrayHandleSOA` only for `Vec` value types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2349
2021-01-14 12:40:58 -05:00
Kenneth Moreland
b4ca18607c Merge topic 'recombine-vec-array'
f941cb607 Move Fetch specializations to vtkm/exec/arg
439c18cfc Add changedoc for ArrayHandleRecombineVec
9833f3d0d Fix issue with using recombined vec as an output array
7dd9b4252 Add UnknownArrayHandle::ExtractArrayFromComponents
755af739e Add ArrayHandleRecombineVec

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2372
2021-01-11 13:50:57 -05:00
Kenneth Moreland
50ff9c22aa Add support of ArrayHandleSOA as a default storage type 2021-01-06 13:20:58 -07:00
Li-Ta Lo
d81f08eedb correct copyright mesage 2021-01-05 13:29:35 -07:00
Li-Ta Lo
6af7c3122a making WriteDataSet virtual 2021-01-05 12:59:52 -07:00
Kenneth Moreland
7dd9b4252a Add UnknownArrayHandle::ExtractArrayFromComponents
This method allows you to extract an `ArrayHandle` from
`UnknownArrayHandle` when you only know the base component type.

Also removed the `Read/WritePortalForBaseComponentType` method
from `UnknownArrayHandle`. This functionality is subsumed by
`ExtractArrayFromComponents`.
2021-01-04 14:17:24 -07:00
Li-Ta Lo
fac489644f HDF5 unit tests
Move HDF5ImageWriter/Reader to its own unit test. Use user supplied
field name as HDF5 dataset name.
2021-01-04 10:01:49 -07:00
Li-Ta Lo
03cb5cb43c rename file names and add reference to the specification 2021-01-04 09:04:08 -07:00
Robert Maynard
90c607c999 Correct CMake checking for targets before creation 2020-12-30 12:42:51 -05:00
Robert Maynard
7897d23c39 Cleanup some minor CMake style issues 2020-12-28 10:36:00 -05:00
Li-Ta Lo
da7d6aaf19 Add HDF5 Image file support 2020-12-25 16:02:08 -07:00
Kenneth Moreland
67507185ce Add ability to extract components in UnknownArrayHandle
This allows you to handle just about every type of array with about 10
basic types. It allows you to ignore both the size of `Vec`s and the
actual storage of the data.
2020-12-16 17:23:27 -07:00
nadavi
1818a885bf Generate and test regression-test images with io library updates 2020-12-02 16:24:07 +00:00
Nick Thompson
2addc19eac Merge topic 'less_verbose_logging'
5d4c3f0c6 Less verbose logging.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2329
2020-11-25 13:54:23 -05:00
Nick Thompson
5d4c3f0c61 Less verbose logging. 2020-11-20 15:12:23 -05:00
Nick Thompson
0019c0b3af Missing include file. 2020-11-20 13:46:59 -05:00