Hello again,
In the meantime I have found the problem with the binary ensight gold
reader.
Whenever the variable-files are read for a time steps greater than 1,
Paraview has to jump in the binary file to the desired timestep. This is
done by partially parsing and skipping blocks until the correct "BEGIN
TIME STEP" is found. In order to skip the correct block length, Paraview
uses the number of points (numPts) from the current geometry step. This
breaks with a varying number of points per timestep.
As an example my first step contains 2 points and the second step 6
points, therefore when Paraview skips the first time step, it skips a
block length equivalent to 6 points. The correct number would be 2
points. It therefore skips past the next "BEGIN TIME STEP".
In order to verify my theory I have implemented a little hack which
looks for the next "BEGIN TIME STEP" by brute force. In case someone
wants to try this I have attached a patch which can be used in
conjunction with the examples in my previous mail.
A clean solution would be to skip the correct number of points for every
given timestep. Unfortunately I do not have enough insight into the
Paraview/VTK ensight reader to implement this and would appreciate any
help in finding a clean solution to this.
Cheers,
Georg
On 27/02/13 08:17, Georg Hammerl wrote:
Hello,
I have problems when I try to visualize my results in Paraview which
include changing geometries. I can load the first time step but when I
switch to the next step (in which 4 points are added), paraview
freezes and htop shows 100% load for this process. Surprisingly, this
only happens when I use binary ensight gold format. The same results
written in ascii ensight gold format work. The ens_checker tells me
for both cases that I have valid output files. Attached are the binary
and ascii version of the result. It would be nice to use binary output
for my results.
I work on a 64 bit Linux system and I have checked out the latest
repository version of Paraview (but I have also tried older versions:
3.14 and 3.6) giving me the same result.
Thanks in advance for your help.
Cheers,
Georg
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview
--
Dipl.-Ing. Georg Hammerl
Lehrstuhl für Numerische Mechanik
Technische Universität München
Boltzmannstrasse 15, D-85747 Garching b. München
phone +49 89 289 15237
fax +49 89 289 15301
[email protected]
http://www.lnm.mw.tum.de
diff --git a/IO/EnSight/vtkEnSightGoldBinaryReader.cxx b/IO/EnSight/vtkEnSightGoldBinaryReader.cxx
index 81cfdd0..a58d9a5 100644
--- a/IO/EnSight/vtkEnSightGoldBinaryReader.cxx
+++ b/IO/EnSight/vtkEnSightGoldBinaryReader.cxx
@@ -1317,36 +1317,19 @@ int vtkEnSightGoldBinaryReader::ReadScalarsPerNode(
}
this->ReadLine(line); // skip the description line
- if (measured)
- {
- output = static_cast<vtkDataSet*>(
- this->GetDataSetFromBlock(compositeOutput, this->NumberOfGeometryParts));
- numPts = output->GetNumberOfPoints();
- if (numPts)
- {
- this->ReadLine(line);
- // Skip sclalars
- this->IFile->seekg(sizeof(float)*numPts, ios::cur);
- }
- }
-
- while (this->ReadLine(line) &&
- strncmp(line, "part", 4) == 0)
- {
- this->ReadPartId(&partId);
- partId--; // EnSight starts #ing with 1.
- realId = this->InsertNewPartId(partId);
- output = static_cast<vtkDataSet*>(
- this->GetDataSetFromBlock(compositeOutput, realId));
- numPts = output->GetNumberOfPoints();
- if (numPts)
- {
- this->ReadLine(line); // "coordinates" or "block"
- // Skip sclalars
- this->IFile->seekg(sizeof(float)*numPts, ios::cur);
- }
- }
- }
+ std::streampos position = this->IFile->tellg();
+ char tmp[16];
+ this->IFile->readsome(tmp, 16);
+ tmp[15] = '\0';
+ while (strncmp(tmp, "BEGIN TIME STEP", 15) != 0)
+ {
+ position = position+1;
+ this->IFile->seekg(position);
+ this->IFile->readsome(tmp, 16);
+ tmp[15] = '\0';
+ }
+ this->IFile->seekg(position);
+ }
this->ReadLine(line);
while (strncmp(line, "BEGIN TIME STEP", 15) != 0)
{
@@ -1518,36 +1501,19 @@ int vtkEnSightGoldBinaryReader::ReadVectorsPerNode(
}
this->ReadLine(line); // skip the description line
- if (measured)
- {
- output = static_cast<vtkDataSet*>(
- this->GetDataSetFromBlock(compositeOutput, this->NumberOfGeometryParts));
- numPts = output->GetNumberOfPoints();
- if (numPts)
- {
- this->ReadLine(line);
- // Skip vectors.
- this->IFile->seekg(sizeof(float)*3*numPts, ios::cur);
- }
- }
-
- while (this->ReadLine(line) &&
- strncmp(line, "part", 4) == 0)
+ std::streampos position = this->IFile->tellg();
+ char tmp[16];
+ this->IFile->readsome(tmp, 16);
+ tmp[15] = '\0';
+ while (strncmp(tmp, "BEGIN TIME STEP", 15) != 0)
{
- this->ReadPartId(&partId);
- partId--; // EnSight starts #ing with 1.
- realId = this->InsertNewPartId(partId);
- output = static_cast<vtkDataSet*>(
- this->GetDataSetFromBlock(compositeOutput, realId));
- numPts = output->GetNumberOfPoints();
- if (numPts)
- {
- this->ReadLine(line); // "coordinates" or "block"
- // Skip comp1, comp2 and comp3
- this->IFile->seekg(sizeof(float)*3*numPts, ios::cur);
- }
- }
+ position = position+1;
+ this->IFile->seekg(position);
+ this->IFile->readsome(tmp, 16);
+ tmp[15] = '\0';
}
+ this->IFile->seekg(position);
+ }
this->ReadLine(line);
while (strncmp(line, "BEGIN TIME STEP", 15) != 0)
{
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview