[Dune] How to write vector fields using VTKWriter?
Andreas Lauser
andreas.lauser at iws.uni-stuttgart.de
Sat Jun 18 15:57:23 CEST 2011
Hi,
I have attached a modified version of the sample code I send earlier today plus
the resulting vtp file. Note that there are three scalar fields called "foo[0]",
"foo[1]" and "foo[2]" instead of just one vector field.
cheers
Andreas
Am Samstag, 18. Juni 2011, 15:36:01 schrieb Jö Fahlke:
> Am Sat, 18. Jun 2011, 15:26:41 +0200 schrieb Andreas Lauser:
> > Thanks, now it compiles and runs, but all my nice vectors still get split
> > in the output, i.e. I get nComp scalar fields instead of one vector
> > field with nComp components. If my understanding of the VTK file format
> > is correct, it would be possible to write out vector fields using the
> > DataArray tag's NumberOfComponents attribute. I have not found a way to
> > do this via VTKWriter, though. Is it possible?
>
> Should actually work out-of-the-box. Can you send us the VTKWriter-related
> code and the resulting VTK file (or an excerpt that only includes the
> metadata if it's large)?
>
> Bye,
> Jö.
--
Andreas Lauser
Lehrstuhl für Hydromechanik und Hydrosystemmodellierung
Universität Stuttgart - Institut für Wasserbau
Pfaffenwaldring 61
D-70569 Stuttgart
Tel: (+49) 0711/ 685-64719
Fax: (+49) 0711/ 685-60430
e-mail: andreas.lauser at iws.uni-stuttgart.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: writevectorfields.cc
Type: text/x-c++src
Size: 898 bytes
Desc: not available
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20110618/aef1b626/attachment.cc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bar.vtp
Type: application/xml
Size: 1302 bytes
Desc: not available
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20110618/aef1b626/attachment.wsdl>
More information about the Dune
mailing list