Commit Graph

61 Commits

Author SHA1 Message Date
Kenneth Moreland
bb9e7a0d6f Handle any Vec size in VTKDataSetReader
The legacy VTK file reader previously only supported a specific set of Vec
lengths (i.e., 1, 2, 3, 4, 6, and 9). This is because a basic array
handle has to have the vec length compiled in. However, the new
`ArrayHandleRuntimeVec` feature is capable of reading in any vec-length
and can be leveraged to read in arbitrarily sized vectors in field
arrays.
2023-05-22 06:19:11 -06:00
Dave Pugmire
3efa8bb744 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into add_visit_file_reader 2023-03-20 10:58:55 -04:00
Dave Pugmire
6db8c316ad Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into add_visit_file_reader 2023-03-15 09:23:03 -04:00
Dave Pugmire
c989550111 Better error checking and logging. 2023-03-14 15:15:06 -04:00
Kenneth Moreland
796ec9638e Document data that comes from VisIt tutorial
Some of the data sets that are included from VTK-m are derived from the
VisIt Tutorial Data (https://www.visitusers.org/index.php?title=Tutorial_Data).
These are covered by the VisIt license, as communicated by Eric Brugger.

Although the license for these data is compatible with VTK-m's license,
we should still attribute the source of the data and make clear the
copyrights. The data are moved into the third_party directory, and
readmes are added to document everything.

The noise.vtk and noise.bov files have been renamed example.vtk and
example_temp.bov to match the name of the file in the VisIt tutorial
data archive. The ucd3d.vtk file, which is similar to the curv3d.silo
data but altered, has been removed. It was not used for any tests. It
was referenced in a couple of example programs, but the reference is
easily changed.
2023-03-14 12:25:21 -06:00
Dave Pugmire
f60f437000 Add VisIt file reader. 2023-03-13 16:13:21 -04:00
Kenneth Moreland
5aba6e1bea Remove unlicensed data
Some of the test data sets are derived from data sets that are commonly
distributed to test visualization algorithms and are featured in
numerous papers. However, I am unable to track down the original source
let alone identify what license, if any, they were released under. To
avoid any complications with data ownership, remove these data sets and
replace them with in house data sets that we explicitly own.
2023-03-13 13:54:44 -06:00
Kenneth Moreland
2d30e6d45a Coordinate systems are stored as Fields
Previously, `DataSet` managed `CoordinateSystem`s separately from `Field`s.
However, a `CoordinateSystem` is really just a `Field` with some special
attributes. Thus, coordiante systems are now just listed along with the
rest of the fields, and the coordinate systems are simply strings that
point back to the appropriate field. (This was actually the original
concept for `DataSet`, but the coordinate systems were separated from
fields for some now obsolete reasons.)
2022-11-11 06:17:58 -07:00
Kenneth Moreland
d81cbc6e37 Fix reading global ids of permuted cells
The legacy VTK reader sometimes has to permute cell data because some
VTK cells are not directly supported in VTK-m. (For example, triangle
strips are not supported. They have to be converted to triangles.)

The global and petigree identifiers were not properly getting permuted.
This is now fixed.
2022-10-31 16:07:47 -06:00
Kenneth Moreland
ea560e9486 Remove deprecated virtual methods
Several revisions ago, the ability to use virtual methods in the
execution environment was deprecated. Completely remove this
functionality for the VTK-m 2.0 release.
2022-10-28 10:56:52 -06:00
Dave Pugmire
7740ba5bc1 Merge topic 'partitioned_dataset_fields'
0fb721207 Kick the dashboard builds.
30d1d86a0 Method was deprecated during the rename within the MR. (Not a new method).
a215ac320 Use {} initialization of FieldCollection.
4b60978a0 Simplify implementation of CreateResult.
98994026b Change GetPartitionField to GetFieldFromPartition.
fbe78b45c Change all usage of IsField* to Is*Field.
e395fe8fe Rename methods for consistency.
019d6cbc6 fix build error due to typo.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2853
2022-08-30 21:25:46 -04:00
Dave Pugmire
fbe78b45cf Change all usage of IsField* to Is*Field. 2022-08-29 14:42:02 -04:00
Vicente Adolfo Bolea Sanchez
c92abc4093 lodepng: remove interface dependency
It also avoid installing lodepng.a in the vtk-m shared build.
2022-08-22 21:54:49 -04:00
Kenneth Moreland
b2ce30e690 Fix bug with voxels in legacy vtk files
The legacy VTK file reader for unstructured grids had a bug when reading
cells of type voxel. VTK-m does not support the voxel cell type in
unstructured grids (i.e. explicit cell sets), so it has to convert them to
hexahedron cells. A bug in the reader was mangling the cell array index
during this conversion.
2022-07-06 09:37:29 -06:00
Kenneth Moreland
f8f41e0ef5 Update use of field association enumerations
The enumerations in `vtkm::cont::Field::Association` were renamed in the
previous commit. The old names still exist, but are deprecated. Change
the rest of the code to use the new names.
2022-03-17 11:02:37 -06: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
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
Sujin Philip
57f5168114 Support reading Global and Pedigree ids 2021-05-17 09:52:21 -04:00
Sujin Philip
d7b2fec447 Fix reading of string arrays 2021-05-17 09:51:12 -04: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
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
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
ca0ce4de7b Merge branch 'master' into hdf5_image_io 2021-01-14 14:08:00 -07:00
Kenneth Moreland
50ff9c22aa Add support of ArrayHandleSOA as a default storage type 2021-01-06 13:20:58 -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
nadavi
1818a885bf Generate and test regression-test images with io library updates 2020-12-02 16:24:07 +00:00
Nick Thompson
5d4c3f0c61 Less verbose logging. 2020-11-20 15:12:23 -05: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
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
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
dpugmire
4744730630 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into betterParticleAdvectionDiffs2 2020-06-17 11:12:11 -04:00
dpugmire
447e8aff04 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into betterParticleAdvectionDiffs2 2020-06-16 11:49:21 -04:00
NAThompson
0f0c465c1b Deprecate Camera::Activate() and Camera::Finish() 2020-06-14 11:04:06 -04:00
NAThompson
755137a822 Particle advection tests with file. 2020-06-13 10:58:45 -04:00
NAThompson
db8f3c9fc9 Remove Initialize() boilerplate. 2020-06-05 13:38:18 -04:00