Skip to content
Snippets Groups Projects
Commit 21e34367 authored by Martin Nolte's avatar Martin Nolte
Browse files

backported patch 5094 (correctly expand 2D data to 3D)

[[Imported from SVN: r5321]]
parent 8e55d4e2
Branches
Tags
No related merge requests found
......@@ -358,6 +358,9 @@ namespace Dune
for (FunctionIterator it=celldata.begin(); it!=celldata.end(); ++it)
{
blocklength = ncells * (*it)->ncomps() * sizeof(float);
//vtk file format: a vector data always should have 3 comps(with 3rd comp = 0 in 2D case)
if((*it)->ncomps()==2)
blocklength = ncells * (3) * sizeof(float);
stream.write(blocklength);
for (CellIterator i=cellBegin(); i!=cellEnd(); ++i)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment