[dune-pdelab] Writing subtree of a CompositeGridFunctionSpace to VTK

Christian Engwer christian.engwer at uni-muenster.de
Tue Jun 23 12:27:02 CEST 2015


Hi Oli,

> There is one problem, though: The first subtree my space is a displacement field.
> When using my original code, that subtree appeared in ParaView as one data set 'displacement',
> and I could use the warp-by-vector filter, for example.

this was a special trick that PDELab could use, as the GFS contains
the VectorGridFunctionSpace in the tree.

> When using the code snippet you
> propose, the three components of the displacement appear as separate scalar fields 'displacement0',
> 'displacement1', 'displacement2'.  How can I keep them as a single data set?

As the SubTree is now an object on its own and doesn't exhibit the
VectorGridFunctionSpace tag anymore the transformation doesn't detect
the vector type of your GFS anymore. You would have to abjust the
transformations employed when constructing the SubGFS. I'm not sure
how difficult it is. As a work-around you can merge them again in
paraview, using the calculator:

Result = iHat * displacement0 + jHat * displacement1 + kHat * displacement2


Christian




More information about the dune-pdelab mailing list