Commit Graph

244 Commits

Author SHA1 Message Date
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