[Dune] SubsamplingVTKWriter
Jö Fahlke
jorrit at jorrit.de
Thu Oct 20 15:40:29 CEST 2011
Am Thu, 20. Oct 2011, 14:04:39 +0200 schrieb S. Swayamjyoti:
> I am using the *SubsamplingVTKWriter *to write some of my grid data to a vtu
> file, as follows.
>
> *Dune::SubsamplingVTKWriter<GridType::LeafGridView> vtksubwriter(gv,6);
> vtksubwriter.addVertexData(rho_i, "rho_i");
> vtksubwriter.write("j_grid");*
>
> But, I get an error saying that addVertexData is a private member.
>
> */home/sj/dune/dune-grid/dune/grid/io/file/vtk/subsamplingvtkwriter.hh:111:10:
> error: ‘void Dune::SubsamplingVTKWriter<GridView>::addVertexData(const V&,
> const string&, int) [with V = Dune::DynamicVector<double>, GridView =
> Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::UGGrid<3>,
> (Dune::PartitionIteratorType)4u> >, std::string = std::basic_string<char>]’
> is private*
>
> That's strange because, in the class documentation, addVertexData is a
> public member for SubsamplingVTKWriter.
>
> http://www.dune-project.org/doc-2.0/doxygen/html/classDune_1_1VTKWriter.html#6b0db5736b59f8c1d8c66f77a7371ded
The class documentation is old. In that version of dune it was discovered
that addVertexData() with a data vector (as opposed to a VTKFunction) would
produce incorrect results. Since nobody really needed this functionality on
the SubsamplingVTKWriter at that time, we simply disabled it.
Most people use some kind of discretization module, which probably will
provide a VTKFunction (e.g. for PDELab that would be VTKGridFunctionAdapter).
If you are really using bare dune-grid, you'll have to write the apropriate
VTKFunction implementation yourself.
Bye,
Jö.
--
Jorrit (Jö) Fahlke, Interdisciplinary Center for Scientific Computing,
Heidelberg University, Im Neuenheimer Feld 368, D-69120 Heidelberg
Tel: +49 6221 54 8890 Fax: +49 6221 54 8884
This is the first age that's paid much attention to the future, which
is a little ironic since we may not have one.
-- Arthur C Clarke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20111020/5ade42ae/attachment.sig>
More information about the Dune
mailing list