Commit Graph

199 Commits

Author SHA1 Message Date
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
Nick Thompson
3a9e97bb88 Write more digits in VTKDataSetWriter.cxx. 2020-11-20 11:39:30 -05:00
Kenneth Moreland
07d6c06c73 Convert ArrayHandleCartesianProduct to new buffer-style array 2020-11-17 12:17:28 -07:00
Kenneth Moreland
f7cc03107d Fix deprecated warnings
Supress the deprecated class warnings for the implementation of
deprecated features.
2020-09-09 06:13:07 -06:00
Kenneth Moreland
63ef84ed78 Optionally remove all use of ArrayHandleVirtual
As we remove more and more virtual methods from VTK-m, I expect several
users will be interested in completely removing them from the build for
several reasons.

1. They may be compiling for hardware that does not support virtual
methods.
2. They may need to compile for CUDA but need shared libraries.
3. It should go a bit faster.

To enable this, a CMake option named `VTKm_NO_DEPRECATED_VIRTUAL` is
added. It defaults to `OFF`. But when it is `ON`, none of the code that
both uses virtuals and is deprecated will be built.

Currently, only `ArrayHandleVirtual` is deprecated, so the rest of the
virtual classes will still be built. As we move forward, more will be
removed until all virtual method functionality is removed.
2020-09-04 22:52:45 -06:00
Kenneth Moreland
66a4a23ebf Fix issue of getting pointer from std::vector of size 0
C++11 introduced the `std::vector::data()` method. In addition to being
more syntatically pleasing, it should correctly handle the condition
when the `std::vector` is size 0 and therefore has no real pointer.
(Expressions like `&v[0]` are undefined when the `vector` is empty.)
2020-09-02 12:04:34 -06:00
Kenneth Moreland
3f8da6e7e1 Fix some debugging code that should not have been there 2020-09-01 14:21:09 -06:00
Kenneth Moreland
52cecefba0 Fix crash when loading poly data with no cells 2020-09-01 14:20:11 -06:00
Kenneth Moreland
a8fa143351 Move UnitTestVTKDataSetReader files to git-lfs
The `UnitTestVTKDataSetReader` test reads in .vtk files of multiple
formats. The origins of this test predate the use of git-lfs and a data
directory, so the test defined in the source code several strings
containing the contents of the files.

That is no longer necessary. This change removes those strings from the
file and creates actual files in the data directory. This is easier to
manage as well as more convenient if you want to use the same data in a
different test or just take a look at the data in a different program
(such as VisIt or ParaView).
2020-08-25 07:23:13 -06:00
Kenneth Moreland
571aa9f3d7 Simplify getting test file names
The testing helper class provided a method named `GetTestDataBasePath`
that returned the base path to all the data files stored in the VTK-m
repo. This is fine, but it was a little cumbersome to build filenames.

To make things easier, there is now a new method named `DataPath` that
takes a string of the filename (or, rather, subpath) to the file in that
directory and automatically builds the path to it.
2020-08-25 06:17:59 -06:00
Kitware Robot
cf0cdcf7d1 clang-format: reformat the repository with clang-format-9 2020-08-24 14:01:08 -04:00
Vicente Adolfo Bolea Sanchez
ab0fecda7f VTKDataSetWriter: remove just_points argument
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-07-24 15:54:13 -04:00
Kenneth Moreland
f6b13df513 Support coordinates of both float32 and float64
Previously there were issues if the coordinate system was using floating
point values that were not FloatDefault. This remedies that issue.
2020-07-14 08:53:01 -06:00
Kenneth Moreland
453e314044 Deprecate ArrayHandleVirtualCoordinates
We are in the process of deprecating virtual classes in VTK-m
(that run in the execution environment).
2020-07-14 08:51:47 -06:00
Kenneth Moreland
be7f06bbe7 CoordinateSystem data is VariantArrayHandle
`CoordinateSystem` differed from `Field` in that its `GetData`
method returned an `ArrayHandleVirtualCoordinates` instead of
a `VariantArrayHandle`. This is probably confusing since
`CoordianteSystem` inherits `Field` and has a pretty dramatic
difference in this behavior.

In preparation to deprecate `ArrayHandleVirtualCoordinates`, this
changes `CoordiantSystem` to be much more like `Field`. (In the
future, we may change the `CoordinateSystem` to point to a `Field`
rather than be a special `Field`.)

A method named `GetDataAsMultiplexer` has been added to
`CoordinateSystem`. This method allows you to get data from
`CoordinateSystem` as a single array type without worrying
about creating functors to handle different types and without
needing virtual methods.
2020-07-14 08:50:39 -06:00
Kenneth Moreland
058927c82f Write uniform and rectilinear grids to legacy VTK files
As a programming convenience, all `vtkm::cont::DataSet` written by
`vtkm::io::VTKDataSetWriter` were written as a structured grid. Although
technically correct, it changed the structure of the data. This meant that
if you wanted to capture data to run elsewhere, it would run as a different
data type. This was particularly frustrating if the data of that structure
was causing problems and you wanted to debug it.

Now, `VTKDataSetWriter` checks the type of the `CoordinateSystem` to
determine whether the data should be written out as `STRUCTURED_POINTS`
(i.e. a uniform grid), `RECTILINEAR_GRID`, or `STRUCTURED_GRID`
(curvilinear).
2020-07-08 19:12:14 -06:00