[dune-functions] Question about the VTKWriter

Carsten Gräser graeser at mi.fu-berlin.de
Thu Mar 26 20:57:10 CET 2015


Am 26.03.2015 um 16:27 schrieb Oliver Sander:
> Hi guys,
> I must have missed a detail.  At the end of poisson-pq2.cc it says:
> 
>   Dune::Functions::DiscreteScalarGlobalBasisFunction<decltype(feBasis),decltype(x)> xFunction(feBasis,x);
>   auto localXFunction = localFunction(xFunction);
>   SubsamplingVTKWriter<GridView> vtkWriter(gridView,2);
>   vtkWriter.addVertexData(localXFunction, VTK::FieldInfo("x", VTK::FieldInfo::Type::scalar, 1));
>   vtkWriter.write("poisson-pq2");
> 
> Why does the writer get a _local_ function?  Shouldn't it be able to request all the
> information it needs from the DiscreteScalarGlobalBasisFunction?
I don't know. I just looked at the VTKWriter code to figure
out what to pass and adjusted the example accordingly.
However I'd also say that passing the grid function directly
would be nicer.

Best,
Carsten

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-functions/attachments/20150326/6732a0fd/attachment.sig>


More information about the dune-functions mailing list