I try to write out some VTI indicator masks for my geometry and dynamics type. Does anyone know what is wrong with the following simple code:
// a simple test: // nx=2, ny=2 // write matrix [0 1; 1 2] as int8 ScalarField2D<double> playMask(2,2); playMask.construct(); playMask = 0; playMask = 1; playMask = 1; playMask = 2; VtkImageOutput2D<double> playVtkOut("playMask", 1); playVtkOut.writeData<char>(playMask, "playName", (char)1);
The code runs and gives no error message. The file “playMask.vti” is created but nothing is written to the file.
I tried an analogous example with VtkImageOutput3D: The result is the same, except when choosing nx=ny=nz=10 or larger. Then the vtk file is written with correct header, but the size of the stream is wrong.
It would be great if someone has an idea, since I would like to avoid getting into technical details of serializing and base64 encoding…