Unable to write data to VTK file for 1D Vectors.

Asked by Charles

Trying to write a 1D vector to a file produces the following error:

*** -------------------------------------------------------------------------
*** Error: Unable to write data to VTK file.
*** Reason: Don't know how to handle vector function with dimension other than 2 or 3.
*** Where: This error was encountered inside VTKFile.cpp.
*** Process: 0
*** -------------------------------------------------------------------------

The calling code:

  File ustarfile("results/u.pvd");
  ustarfile << u;

Where u is a Function on a VectorElement("Lagrange", interval, 2)

Should I be writing the data files in a different way?

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Charles
Solved:
Last query:
Last reply:
Revision history for this message
Jan Blechta (blechta) said :
#1

Writing Function of dim 1 to VTK is not implemented. You can implement this (if supported by VTK) or use another format.

Revision history for this message
Jan Blechta (blechta) said :
#2

> Writing Function of dim 1 to VTK is not implemented.
FIX: Of course I mean function defined on space of dim 1

Revision history for this message
Charles (rodbourn) said :
#3

I've just interpolated onto a scalar function for now - its just to debug :)