Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue2798 - BOV Reader #2809

Merged
merged 30 commits into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fd3482f
pop spaces at end of line
sgpearse Jul 13, 2021
3a53e0d
some bugs fixed
sgpearse Jul 13, 2021
eb6d032
add relative file path search
sgpearse Jul 13, 2021
38f17f9
incremental time fix
sgpearse Jul 14, 2021
05ab55c
inc
sgpearse Jul 14, 2021
e29fbd7
limits test
sgpearse Jul 14, 2021
6ccdc21
close if guard
sgpearse Jul 14, 2021
c58ee0a
clang format
sgpearse Jul 14, 2021
a4f4924
clang format
sgpearse Jul 14, 2021
9058cf2
Merge branch 'main' into issue2798
sgpearse Jul 15, 2021
2bba7e4
updated error handling in BOV reader
sgpearse Jul 20, 2021
8725d20
clang format
sgpearse Jul 20, 2021
cdbe3fc
remove unnecessary error check
sgpearse Jul 20, 2021
1b5027d
remove stat.h for windows, and remove directory checker
sgpearse Jul 20, 2021
5c50ff6
fix typo
sgpearse Jul 20, 2021
94d1a52
clang-format
sgpearse Jul 20, 2021
ff4cc09
merge main
sgpearse Jul 20, 2021
7735fac
merge with windows fix
sgpearse Jul 20, 2021
de19617
remove fileTooBig error
sgpearse Jul 20, 2021
2dede48
switch to climits
sgpearse Jul 20, 2021
527fa55
update DCBOV.h documentation
sgpearse Jul 20, 2021
8dd8e2a
remove windows funk
sgpearse Jul 21, 2021
eed8cea
use more FileUtils
sgpearse Jul 21, 2021
f70d912
Fix review requests
sgpearse Jul 21, 2021
e599b72
Add more comments
sgpearse Jul 21, 2021
22f8615
add more documentation, add varname validator
sgpearse Jul 21, 2021
48241d0
Address sam's comments
sgpearse Jul 21, 2021
ea9376e
fix variable name and delete pointer
sgpearse Jul 22, 2021
aec3ade
remove duplicate zeros from variable scrubber
sgpearse Jul 22, 2021
4108550
new return code for fread
sgpearse Jul 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions include/vapor/BOVCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ class BOVCollection : public Wasp::MyBase {
DC::XType GetDataFormat() const;
std::array<double, 3> GetBrickOrigin() const;
std::array<double, 3> GetBrickSize() const;
std::string GetDataEndian() const;

template<class T> int ReadRegion(std::string varname, size_t ts, const std::vector<size_t> &min, const std::vector<size_t> &max, T region);

private:
std::string _currentFilePath;

float _time;
std::vector<float> _times;
std::string _dataFile;
Expand All @@ -51,7 +52,6 @@ class BOVCollection : public Wasp::MyBase {
// assigning to "actual" values such as _gridSize, declaired above.
std::array<size_t, 3> _tmpGridSize;
DC::XType _tmpDataFormat;
std::string _tmpDataEndian;
std::array<double, 3> _tmpBrickOrigin;
std::array<double, 3> _tmpBrickSize;
size_t _tmpByteOffset;
Expand All @@ -60,7 +60,6 @@ class BOVCollection : public Wasp::MyBase {
bool _formatAssigned;
bool _brickOriginAssigned;
bool _brickSizeAssigned;
bool _dataEndianAssigned;
bool _byteOffsetAssigned;

// _dataFileMap allows us to access binary data files with a
Expand All @@ -79,15 +78,16 @@ class BOVCollection : public Wasp::MyBase {

void _findTokenValue(std::string &line) const;

int _sizeOfFormat(DC::XType) const;
void _swapBytes(void *vptr, size_t size, size_t n) const;
int _sizeOfFormat(DC::XType) const;

int _invalidDimensionError(std::string token) const;
int _invalidFormatError(std::string token) const;
int _failureToReadError(std::string token) const;
int _inconsistentValueError(std::string token) const;
int _invalidValueError(std::string token) const;
int _missingValueError(std::string token) const;
int _invalidFileSizeError(size_t numElements) const;
int _invalidFileError() const;
int _invalidDimensionError(const std::string &token) const;
int _invalidFormatError(const std::string &token) const;
int _failureToReadError(const std::string &token) const;
int _inconsistentValueError(const std::string &token) const;
int _invalidValueError(const std::string &token) const;
int _missingValueError(const std::string &token) const;

static const std::string TIME_TOKEN;
static const std::string DATA_FILE_TOKEN;
Expand Down
2 changes: 1 addition & 1 deletion include/vapor/DCBOV.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ class BOVCollection;
//! The following BOV tags are optional:
//! - BRICK_ORIGIN
//! - BRICK_SIZE
//! - DATA_ENDIAN
//! - TIME
//! - VARIABLE
//!
//! The following BOV tags are currently unsupported:
//! - DATA_ENDIAN
//! - CENTERING
//! - BYTE_OFFSET
//! - DIVIDE_BRICK
Expand Down
Loading