Re: [Paraview] VTK XML Binary Output

2009-04-01 Thread David Mulholland
David Mulholland Cc: Thorsten Hater ; paraview@paraview.org Subject: Re: [Paraview] VTK XML Binary Output I thought my C code may be helpful to you. I have 5 data array of different size, and I do like this: nvar=5; /* Bytes and offsets for ParaView file */ bytes[0] = (ndim*nnod)*sizeof(

Re: [Paraview] VTK XML Binary Output

2009-04-01 Thread David Mulholland
Sent: Wednesday, April 01, 2009 1:59 PM To: David Mulholland Cc: Thorsten Hater ; paraview@paraview.org Subject: Re: [Paraview] VTK XML Binary Output I thought my C code may be helpful to you. I have 5 data array of different size, and I do like this: nvar=5; /* Bytes and offsets for Pa

Re: [Paraview] VTK XML Binary Output

2009-04-01 Thread David Mulholland
the k components? This is how my data is structured in memory and would make it a lot easier. Thanks David -- From: "Thorsten Hater" Sent: Wednesday, April 01, 2009 2:27 PM To: "David Mulholland" Cc: Subject: Re: [Paraview] VTK XM

Re: [Paraview] VTK XML Binary Output

2009-04-01 Thread Thorsten Hater
Exactly, sorry for the typo. thorsten Olesen, Mark schrieb: I just tried that and it is now giving me a segmentation fault... I am using the following line: file.write(reinterpret_cast(size), 4); The segfault isn't surprising. If you obtain the address of the variable first, I suspec

Re: [Paraview] VTK XML Binary Output

2009-04-01 Thread Olesen, Mark
> I just tried that and it is now giving me a segmentation fault... I am > using the following line: > file.write(reinterpret_cast(size), 4); The segfault isn't surprising. If you obtain the address of the variable first, I suspect you'll be much happier: int size; file.write(reinterpret_cas

Re: [Paraview] VTK XML Binary Output

2009-04-01 Thread Hom Nath Gharti
rom:* Thorsten Hater > *Sent:* Wednesday, April 01, 2009 10:55 AM > *To:* David Mulholland > *Cc:* paraview@paraview.org > *Subject:* Re: [Paraview] VTK XML Binary Output > > Hello David, > > the offset parameter is relevant if you append mulitple data sections into > a

Re: [Paraview] VTK XML Binary Output

2009-04-01 Thread David Mulholland
... Thanks David From: Thorsten Hater Sent: Wednesday, April 01, 2009 10:55 AM To: David Mulholland Cc: paraview@paraview.org Subject: Re: [Paraview] VTK XML Binary Output Hello David, the offset parameter is relevant if you append mulitple data sections into a single file. Every DataArray

Re: [Paraview] VTK XML Binary Output

2009-04-01 Thread Thorsten Hater
Mulholland Cc: paraview@paraview.org Subject: Re: [Paraview] VTK XML Binary Output Hello, the solution might be to append your data as < DataArray ... format="appended"> < AppendedData encoding="raw"> _Data where you should replace NNN

Re: [Paraview] VTK XML Binary Output

2009-03-31 Thread David Mulholland
files from paraview and it wasnt obvious how it was calculated. Thanks David From: Thorsten Hater Sent: Tuesday, March 31, 2009 2:23 PM To: David Mulholland Cc: paraview@paraview.org Subject: Re: [Paraview] VTK XML Binary Output Hello, the solution might be to append your data as < DataArr

Re: [Paraview] VTK XML Binary Output

2009-03-31 Thread Thorsten Hater
Hello, the solution might be to append your data as < DataArray ... format="appended"> < AppendedData encoding="raw"> _Data where you should replace with a four byte integer containing the number of bytes in the data array as 4 chars. Setting the encoding to "raw" tells ParaView

[Paraview] VTK XML Binary Output

2009-03-31 Thread David Mulholland
Hello, I am currently trying to write my own quick output routine to generate a binary file using C++. I am currently trying to avoid having to use the vtk libraries because I only need a very basic output that doesn't change much. I so far have the ASCII output working no problem but I can't g