Commit Graph

244 Commits

Author SHA1 Message Date
Robert Maynard
b9e0e541b8 VTK-m once again uses consistent include style 2019-03-28 14:12:08 -04:00
Sujin Philip
d4e1c18254 Update existing code to use the new functions 2019-03-15 13:28:55 -04:00
Robert Maynard
d6f66d17a3 Testing run methods now take argc/argv to init logging/runtime device
`vtkm::cont::testing` now initializes with logging enabled and support
for device being passed on the command line, `vtkm::testing` only
enables logging.
2019-01-17 13:16:27 -06:00
Kenneth Moreland
d59ce11c00 Allow VariantArrayHandle CastAndCall to cast to concrete types
When you call VariantArrayHandle::CastAndCall, it now tries both basic
storage and virtual storage. You can modify the types of storages tried
by giving a type list of storage tags as the first argument.
2019-01-16 22:31:55 -06:00
Robert Maynard
0a40c620ac Rename ArrayHandleVariant to VariantArrayHandle. 2018-12-27 14:35:56 -05:00
Robert Maynard
39929d5a7c Update vtkm/io to work with vtkm::cont::ArrayHandleVariant 2018-12-27 14:35:56 -05:00
Allison Vacanti
16deb120da Add std::string constructor to VTKDataSetReader. 2018-08-23 11:50:55 -04:00
Robert Maynard
8e38e383b7 VTKDataSetWriter now uses const ref wherever possible to reduce copies. 2018-06-01 10:32:43 -04:00
Shreeraj Jadhav
16b06c8577 Fix VTKDataSetWriter::WriteDataset() overload const correctness
Compilation error (C2666) is caused by ambiguous call to overloaded function
vtkm::io::writer::VTKDataSetWriter::WriteDataSet().
One of the overloaded functions was not constant (though it is supposed to be).
This fixes compilation error in example "ParticleAdvection" when building
in Windows 7 Visual Studio 2015.
2018-05-29 14:36:07 -04:00
Haocheng LIU
5c797169ec Use the strong typed enums for vtkm::cont::Field
Since Field association is used either when creating or working
with 'vtkm::cont::Field', it's put in the class itself.
2018-05-22 11:44:51 -04:00
Sujin Philip
0c1634bbc3 Fix a few more warnings
These warnings were detected on my local machine.
2018-05-09 17:49:45 -04:00
Robert Maynard
8808b41fbd Merge branch 'master' into vtk-m-cmake_refactor 2018-03-29 22:51:26 -04:00
Robert Maynard
7c54125b66 Switch over from static const to static constexpr where possible. 2018-03-10 11:39:58 -05:00
Robert Maynard
ee69c7a4b7 Remove VS2013 workarounds from VTK-m. 2018-02-23 15:39:39 -05:00
Robert Maynard
e630ac5aa4 Merge branch 'master' into vtk-m-cmake_refactor 2018-02-23 14:52:00 -05:00
luz.paz
80b11afa24 Misc. typos
Found via `codespell -q 3` via downstream VTK
2018-01-30 06:51:47 -05:00
Robert Maynard
4f239ed3b9 Correct casting warnings found with new cmake code 2018-01-16 15:42:36 -05:00
Sujin Philip
70fcd1d1cc Update CoordinateSystem to use the Virtual Array 2018-01-10 10:19:19 -05:00
Dave Pugmire
1d8165344f Local var for the array portal instead of inside the for loop. 2017-12-19 11:48:38 -05:00
Robert Maynard
fe8b75f7bf Consistenly use nullptr in vtk-m. 2017-09-25 09:57:23 -04:00
Robert Maynard
311618a15f Enable highest level of warnings(W4) under MSVC
This will make VTK-m warning level match the one used by VTK. This commit
also resolves the first round of warnings that W4 exposes.
2017-09-22 13:04:28 -04:00
Robert Maynard
abf038b181 vtkm/io now prefers 'using' over typedef. 2017-09-21 13:54:36 -04:00
Kenneth Moreland
c3a3184d51 Update copyright for Sandia
Sandia National Laboratories recently changed management from the
Sandia Corporation to the National Technology & Engineering Solutions
of Sandia, LLC (NTESS). The copyright statements need to be updated
accordingly.
2017-09-20 15:33:44 -06:00
Dave Pugmire
1c0f721b96 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into streamline_returntype 2017-08-28 15:27:04 -04:00
Dave Pugmire
3759887aed Merge branch 'master' of gitlab.kitware.com:dpugmire/vtk-m 2017-07-28 10:07:37 -04:00
Dave Pugmire
6a480bad65 Fix compiler warnings. Add ArrayHandle method for getting cell id 2017-07-27 10:10:43 -04:00
ayenpure
f209d670be Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into PICS 2017-07-07 15:01:24 -04:00
ayenpure
0495b2f224 Updated BOV reader and removed unnecessary files.
Removed the PICS.h file which was the initial file for the particle advection
filter. Updated the BOV reader for compile warning fixes and formatting issues.
2017-07-07 14:05:56 -04:00
ayenpure
b2765881df removing most of the compile warnings, and adding CUDA and TBB tests for rectilinear grids 2017-07-07 13:46:45 -04:00
ayenpure
fc8d2a27b2 improved regular grid evaluator and added rectilinear grid evaluator 2017-07-07 13:46:45 -04:00
Dave Pugmire
e1ca111b9c remove warning for now... 2017-07-07 13:45:52 -04:00
Dave Pugmire
b38ace16f9 temp fix for path issues in BOV 2017-07-07 13:45:52 -04:00
Dave Pugmire
9fb82e9832 Fix for BOV files and relative paths. 2017-07-07 13:45:52 -04:00
Dave Pugmire
d956f000e4 Enhanced PICS filter and added BOV reader.
Add a particle advection test program for doing studies using BOV files.
Added state recording particles
Cleanup in the filter.
2017-07-07 13:43:58 -04:00
Dave Pugmire
d04a1043ab Add a BOV file reader. 2017-07-07 13:43:58 -04:00
Robert Maynard
5dd346007b Respect VTK-m convention of parameters all or nothing on a line
clang-format BinPack settings have been disabled to make sure that the
VTK-m style guideline is obeyed.
2017-05-26 13:53:28 -04:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
Sujin Philip
3a7a62673c Fix VTKRectilinearGridReader
Fix for cases when the coordinate types in the file do not match
vtkm::FloatDefault. This resulted in bad dynamic cast exceptions.
2017-05-24 11:47:46 -04:00
Kitware Robot
efbde1d54b clang-format: sort include directives 2017-05-18 12:59:33 -04:00
David C. Lonie
4807b3c472 Silence warnings about unavoidable weak vtables.
- Exception classes cannot be exported due to MSVC's design decisions.
  See http://stackoverflow.com/questions/24511376. We must leave these
  classes as header only and silence the warnings.
- TransferResource in BufferState.h must remain a header-only class since
  there is no vtkm_interop library to compile the class into.
- The VTKDataSetReader hierarchy must similarly remain header-only since
  there is no vtkm_io library.
- The OptionParser Action classes are part of a header-only utility and
  cannot be easily compiled into a library.
-
2017-04-13 14:06:33 -04:00
Dave Pugmire
ca93142512 Merge branch 'master' of gitlab.kitware.com:dpugmire/vtk-m 2017-03-28 09:30:13 -04:00
Dave Pugmire
69f9125663 Experiment with speeding up the GetHexahedronClassification. 2017-03-28 09:28:03 -04:00
Sujin Philip
07cb111904 Fix more issues with the readers
1) Fix parsing issues related to visit style field data
2) Create appropriate dimension cellset for structured cell sets
2017-03-13 13:46:26 -04:00
Sujin Philip
6d6b599115 Support reading VTK files with empty title 2017-03-09 15:48:25 -05:00
Sujin Philip
a88807fd7e Catch all exceptions by reference 2017-02-23 13:25:01 -05:00
David C. Lonie
f601e38ba8 Simplify exception hierarchy.
Remove the ErrorControl class such that all subclasses now inherit from
error. Renamed all exception classes via s/ErrorControl/Error/.

See issue #57.
2017-02-07 15:42:38 -05:00
Robert Maynard
bd1ff7a5ac Allow vtkm errors to properly work with shared libraries. 2017-01-16 09:17:38 -05:00
Kenneth Moreland
713cf4228a Make it not possible to create a cell set without specifying num points
The CellSetExplicit and CellSetSingleType classes have an ivar that
marks the number of points. There were several instances of code
creating cell sets without specifying the number of points. This can be
very bad if subsequent code needs that information.
2017-01-12 13:02:10 -07:00
Dave Pugmire
cef40f853e Fix compiler warnings. 2016-11-30 12:52:40 -05:00
Dave Pugmire
3046d45900 Fix some compiler warnings.
Add another rectilinear test.
2016-11-30 12:41:59 -05:00
Dave Pugmire
8383f21a81 Add VTK reader for rectilinear grids. 2016-11-30 10:39:32 -05:00
Kenneth Moreland
fdaccc22db Remove exports for header-only functions/methods
Change the VTKM_CONT_EXPORT to VTKM_CONT. (Likewise for EXEC and
EXEC_CONT.) Remove the inline from these macros so that they can be
applied to everything, including implementations in a library.

Because inline is not declared in these modifies, you have to add the
keyword to functions and methods where the implementation is not inlined
in the class.
2016-11-15 22:22:13 -07:00
Matt Larsen
e15c858f8c Merge topic 'fix/dataset_reader'
4f482474 Fixing error in data set reader that zeroed out cell asscociated fields in unstructured data sets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !587
2016-10-21 12:35:18 -04:00
Robert Maynard
5ec273aade Remove all occurrences of boost::lexical_cast from vtk-m.
Replaced with the new std::stof/stoi functions.
2016-10-20 16:55:15 -04:00
Robert Maynard
37efba159c CellSetSingleType now can be constructed with proper number of points
This is important so that when we execute a Cell->Point worklet we
don't have to compute the number of points from the connectivity array.
2016-10-20 08:33:16 -04:00
Matt Larsen
4f482474e9 Fixing error in data set reader that zeroed out cell asscociated fields in unstructured data sets 2016-10-19 15:00:39 -07:00
Matt Larsen
69d4ced2ac Fixing typo 2016-09-21 14:14:27 -07:00
Matt Larsen
a564ca0f3e Casting size_t 2016-09-21 14:14:26 -07:00
Matt Larsen
0015e3150b Adding static cast to suppress warnings 2016-09-21 14:14:26 -07:00
Matt Larsen
d9bd4cb698 Adding else statement 2016-09-21 14:14:26 -07:00
Matt Larsen
f623400151 Adding support in the vtk data set reader for skipping strings in field data 2016-09-21 14:14:26 -07:00
Robert Maynard
c9834283ea Remove vtkm usage of boost::shared and scoped pointers.
Now we are using c++11 shared_ptr and unique_ptr
2016-09-01 09:38:25 -04:00
Robert Maynard
f81c42b9b4 Replace NULL with nullptr where applicable. 2016-09-01 09:38:25 -04:00
Robert Maynard
12810165bb Switch over to c++11 type_traits. 2016-08-31 16:11:26 -04:00
Robert Maynard
08a33675f6 Prefer vtkm::cont::CastAndCall function over the member method. 2016-08-05 15:29:39 -04:00
T.J. Corona
8ad8eeda77 In DynamicCellSet, expose CellSet API.
Also changes GetCellSet() to CastToBase().
2016-08-02 13:39:25 -04:00
Kenneth Moreland
eaa5747527 Fix conversion warning
This warning happened on GCC 4.8.0.
2016-06-09 11:00:06 -06:00
Kenneth Moreland
3a8c9421bd Merge branch 'reader-field-names' into 'master'
Reader should name fields only with their field name

The Legacy VTK file reader was augmenting all the field names with the
type of field. For example, if you had a point scalar field named
"elevation", it would be loaded as "SCALARS:elevation".

This is bad for two reasons. First, it is downright confusing. A tool
like ParaView or VisIt will tell me the field is named "elevation", but
VTK-m will report that field does not exist. Second, the writer does not
follow the same convention. Thus, if you have a loop of read file,
modify, write file, you could end up with fields named
"SCALARS:SCALARS:SCALARS:...".

See merge request !432
2016-06-01 09:27:27 -04:00
Kenneth Moreland
2e285c3409 Fix endian flip when reading vector arrays
The legacy VTK file reader has a condition to flip the bytes in values
when the endian does not match the current system. The problem was that
when reading in a vector, the flip was happening on all bytes of a Vec.
This caused the last components of the Vec to be flipped with the first
components. Instead, we want each component to be flipped independently.
2016-05-31 17:36:08 -06:00
Kenneth Moreland
0d5885c0a9 Name fields only with their field name
The Legacy VTK file reader was augmenting all the field names with the
type of field. For example, if you had a point scalar field named
"elevation", it would be loaded as "SCALARS:elevation".

This is bad for two reasons. First, it is downright confusing. A tool
like ParaView or VisIt will tell me the field is named "elevation", but
VTK-m will report that field does not exist. Second, the writer does not
follow the same convention. Thus, if you have a loop of read file,
modify, write file, you could end up with fields named
"SCALARS:SCALARS:SCALARS:...".
2016-05-31 12:57:44 -06:00
Kenneth Moreland
cc497e6a1b Remove cont/Assert.h and exec/Assert.h
These asserts are consolidated into the unified Assert.h. Also made some
minor edits to add asserts where appropriate and a little bit of
reconfiguring as found.
2016-04-20 15:41:14 -06:00
Robert Maynard
265b778ab9 Fix unused warning in VTKDataSetReaderBase. 2016-03-31 14:37:50 -04:00
Jeremy Meredith
ba8517eb67 removing all references to field order. 2016-03-23 10:38:14 -04:00
Kenneth Moreland
6aaf85baa6 Fix compile error with ofstream.
Not all STD implementations allow constructing an ofstream with a filename
in a std::string. Get the c string instead.
2016-03-17 08:53:35 -06:00
Kenneth Moreland
e863ee991a Change interface of VTKDataSetWriter
Make it match VTKDataSetReader better. It's also a bit easier to use
because you just have to give it a filename rather than open your own file
stream.
2016-03-16 15:35:38 -06:00
Kenneth Moreland
0731bd4a53 Fix compiler error about difference_type
Whoops. Pointers are not classes and do not have a difference_type
member. You have to get that from iterator_traits. I'm not sure why this
succeeded on MSVC, but it was clearly wrong.
2016-01-26 17:09:10 -07:00
Kenneth Moreland
cadf0e53ab Fix MSVC warnings
Fix your typical batch of MSVC warnings including picky type conversions
and using "unsafe" std functions on pointers for iterators.
2016-01-26 16:23:00 -07:00
Kenneth Moreland
feaed27cb0 Fixes related to changes in how the Dynamic class do casting
A recently merged topic branch changed the methods of how the Dynamic
classes do casting and type checking. The
support_visit_structured_points topic branch was started before these
changes and merged to master afterward. It used an old version of IsType
that did not conflict and caused a compile error. This fixes the compile
error.
2016-01-21 15:27:25 -07:00
Robert Maynard
27c25bd72f Merge topic 'support_visit_structured_points'
c8c0556d Fixed issues that Sujin found during code review.
33b20a8d All readers now support Fields before data (aka VisIt files).
10d59c17 StructuredPointsReader supports multiple visit fields.
735462f8 Update the io readers to handle visit style structured points files.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !313
2016-01-21 13:41:02 -05:00
Robert Maynard
c8c0556dbb Fixed issues that Sujin found during code review. 2016-01-21 12:44:14 -05:00
Robert Maynard
33b20a8d18 All readers now support Fields before data (aka VisIt files). 2016-01-20 15:58:41 -05:00
Kenneth Moreland
9ccd7fa9c7 Change Regular to Uniform
There was an inconsistency in naming classes where axes-aligned grids
with even spacing were sometimes called "uniform" and sometimes called
"regular". Maintain consistency by always calling them uniform.
2016-01-19 15:54:05 -07:00
Kenneth Moreland
ed43dad6ca Simplify and unify cast interface.
Previously, DynamicArrayHandle and DynamicCellSet had slightly different
interfaces to their CastTo feature. It was a bit confusing and not all
that easy to use.

This change simplifies and unifies them by making each class have a single
CopyTo method that takes a reference to a cast object (an ArrayHandle or
CellSet, respectively) and fills that object with the data contained if
the cast is successfull. This interface gets around having to declare
strange types.

Each object also has a Cast method that has to have a template parameter
specified and returns a reference of that type (if possible).

In addition, the old behavior is preserved for DynamicArrayHandle (but
not DynamicCellSet). To avoid confusion, the name of that cast method is
CastToTypeStorage. However, the method was chaned to not take parameters
to make it consistent with the other Cast method.

Also, the IsType methods have been modified to reflect changes in
cast/copy. IsType now no longer takes arguments. However, an alternate
IsSameType does the same thing but does take an argument.
2016-01-18 15:58:04 -07:00
Robert Maynard
10d59c176b StructuredPointsReader supports multiple visit fields. 2016-01-14 13:10:24 -05:00
Robert Maynard
735462f891 Update the io readers to handle visit style structured points files. 2016-01-14 10:13:24 -05:00
dpugmire
ab268c2c18 Fix some compile errors introduced in the merge. 2015-12-02 13:55:37 -05:00
Dave Pugmire
29e4f06691 remove explicitdataset1, which was identical to dataset0. 2015-12-01 17:24:52 -05:00
Sujin Philip
066e1bf3b1 Convert unsupported cell types to supported types 2015-11-24 13:56:23 -05:00
Sujin Philip
c6a562aeba Fix for MSVC conversion warning 2015-11-12 10:29:30 -05:00
Sujin Philip
503f9197fd Fix VTK DataSet IO to work correctly with DynamicArrayHandle 2015-11-12 10:28:22 -05:00
Sujin Philip
668b0e47db Change 'writers' to 'writer' 2015-11-04 14:23:16 -05:00
Sujin Philip
cf372c7014 Add legacy VTK file readers 2015-11-04 14:23:16 -05:00
Jeremy Meredith
42d213a898 renaming exporters to writers. 2015-10-30 15:45:38 -04:00
Jeremy Meredith
a78e735b3c adding VTK file exporter and test cases. 2015-10-22 17:18:33 -04:00