View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002197 | OpenFOAM | Bug | public | 2016-08-17 16:19 | 2016-09-03 16:42 |
Reporter | dlonie | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | no change required | ||
Summary | 0002197: Detecting element size of binary data | ||||
Description | This is a followup to bug #2196 (I tried to add a note to that one, but it didn't seem to allow me to). The issue with ParaView reading the test case is that our binary reader expects binary data to be encoded as 32-bit floats, but this file is storing the data as 64-bit floats. A google search turned up this discussion: http://www.cfd-online.com/Forums/openfoam/79655-binary-files.htm which seems to imply that the binary data format is determined by the compilation settings of the writer, and this information is not communicated in the actual data set. Is this correct? As a general purpose reader, we need some way of knowing what sort of data to expect when reading a file, since we are not tightly coupled with any particular writer. Is there any way of knowing how the data is stored from inspecting metadata? | ||||
Tags | No tags attached. | ||||
|
Generally OpenFOAM is compiled with 64bit scalars and 32bit labels although it may be compiled single precision, i.e. 32bit scalars, and there is now an option to compile with 64bit labels for very large cases. When writing binary the data is dumped directly from memory and hence contains the size of data corresponding to the build options of OpenFOAM. Correspondence is guaranteed between the OpenFOAM and the reader module we supply with OpenFOAM by compiling that reader with the same options used for the rest of OpenFOAM and using the same IO code for both. This ensures consistence of all IO options, data structures, memory layout etc. |
|
I see. So to confirm, these options are not stored in the data format itself? In that case, since ParaView does not use the OpenFOAM reader module, I think the best we can do is provide options for a user to specify the data sizes themselves. |
|
> So to confirm, these options are not stored in the data format itself? Correct > In that case, since ParaView does not use the OpenFOAM reader module, I think the best we can do is provide options for a user to specify the data sizes themselves. Right |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-08-17 16:19 | dlonie | New Issue | |
2016-08-17 16:37 | henry | Note Added: 0006694 | |
2016-08-17 16:40 | dlonie | Note Added: 0006695 | |
2016-08-17 16:50 | henry | Note Added: 0006696 | |
2016-09-03 16:41 | henry | Status | new => closed |
2016-09-03 16:42 | henry | Assigned To | => henry |
2016-09-03 16:42 | henry | Resolution | open => no change required |