Commit Graph

244 Commits

Author SHA1 Message Date
Gunther H. Weber
124c58eb48 Minor fixes for distributed contour tree example 2024-05-10 15:09:03 -07:00
Kenneth Moreland
5b8c282e9f Continue transfer of Users' Guide text
These changes complete the using part of the guide.
2023-11-21 10:33:45 -07:00
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
Kenneth Moreland
af6218936f Merge topic 'vectraits-for-all'
ac889b500 Implement VecTraits class for all types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3018
2023-03-21 12:55:00 -04: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
Kenneth Moreland
94d8698d16 Merge topic 'data-license'
f545feba8 Add changelog for documenting data license
a24358a1a Document source of WarpX files
60559ce9b Document the source of venn250.vtk
796ec9638 Document data that comes from VisIt tutorial
06391c4e6 Clarify license for ECL data

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3016
2023-03-20 09:42:41 -04:00
Kenneth Moreland
ac889b5004 Implement VecTraits class for all types
The `VecTraits` class allows templated functions, methods, and classes to
treat type arguments uniformly as `Vec` types or to otherwise differentiate
between scalar and vector types. This only works for types that `VecTraits`
is defined for.

The `VecTraits` templated class now has a default implementation that will
be used for any type that does not have a `VecTraits` specialization. This
removes many surprise compiler errors when using a template that, unknown
to you, has `VecTraits` in its implementation.

One potential issue is that if `VecTraits` gets defined for a new type, the
behavior of `VecTraits` could change for that type in backward-incompatible
ways. If `VecTraits` is used in a purely generic way, this should not be an
issue. However, if assumptions were made about the components and length,
this could cause problems.

Fixes #589
2023-03-16 12:59:38 -06:00
Dave Pugmire
97b460110f Fix issues....... 2023-03-15 12:45:45 -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
39cb7a653b kick the build machines. 2023-03-14 21:06:02 -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
Kenneth Moreland
7ddf3d85c5 Merge topic 'remove-unlicensed-data'
5aba6e1be Remove unlicensed data

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3012
2023-03-14 11:42:03 -04:00
Dave Pugmire
2a6220726d Error checking for number of blocks. 2023-03-13 16:26:58 -04: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
oruebel
565772854a Merge branch 'master' into add_hdf5_reader 2023-01-16 17:56:36 -08:00
Kenneth Moreland
3e1339f9a7 Remove deprecated features from VTK-m
With the major revision 2.0 of VTK-m, many items previously marked as
deprecated were removed. If updating to a new version of VTK-m, it is
recommended to first update to VTK-m 1.9, which will include the deprecated
features but provide warnings (with the right compiler) that will point to
the replacement code. Once the deprecations have been fixed, updating to
2.0 should be smoother.
2022-11-17 07:12:31 -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
Kenneth Moreland
ad1e7b5bdb Add module mechanism
This mechanism sets up CMake variables that allow a user to select which
modules/libraries to create. Dependencies will be tracked down to ensure
that all of a module's dependencies are also enabled.

The modules are also arranged into groups.
Groups allow you to set the enable flag for a group of modules at once.
Thus, if you have several modules that are likely to be used together,
you can create a group for them.

This can be handy in converting user-friendly CMake options (such as
`VTKm_ENABLE_RENDERING`) to the modules that enable that by pointing to
the appropriate group.
2022-10-26 12:51:05 -06:00
Oliver Ruebel
b0952365f6 Merge remote-tracking branch 'origin/master' into add_hdf5_reader 2022-09-20 00:07:40 -07: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
Dave Pugmire
f69e598225 Change of Field::Association names. 2022-08-29 06:40:42 -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
Gunther H. Weber
e076c11a26 Add missing linking to to vtkmio 2022-07-01 19:10:19 -04: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
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