[Dune] [Dune-Commit] dune-grid r6768 - trunk/dune/grid/io/file/vtk

Jö Fahlke jorrit at jorrit.de
Wed Jun 9 14:19:34 CEST 2010


Am Wed,  9. Jun 2010, 11:54:42 +0200 schrieb Benedikt Oswald:
> Hi Jö, I have a question related to the VTK writer which is not 2D but 3D
> but might still be applicable to 2d as well:
> 
> What are the location at which the VTK function provided by Dune
> samples the field in an element ?
> 
> Is this at one single point or can I somehow specify that sampling
> takes place at more than one point ?

With the stock VTKWriter, the sampling points depend on whether you use
addCellData() or addVertexData() to add your Function to the writer.  With
cell data, there is one (vector of) values associated with each cell, and the
VTKWriter samples at the local center of the Element to get that value.  With
vertex data, there is one (vector of) values associated with each vertex, and
the VTKWriter samples at the position of the vertices.

Since these are the only two possibilities, the VTK data format only supports
piecewise constant and piecewise linear functions.

> This is important for us when we want to use a mesh with higher
> order basis functions but not so fine a mesh.

For higher order functions use the SubsamplingVTKWriter.  This will divide
each Element into smaller ones for the purpose of writing it to the .vtu and
sample the function at the new vertices as well.  This subdivision happens
without actually modifying the grid.

Bye,
Jö.

-- 
A mathematician is a device to turn coffee into theorems.
-- Paul Erdös
-------------- 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/20100609/a1037e54/attachment.sig>


More information about the Dune mailing list