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

Oliver Sander sander at igpm.rwth-aachen.de
Tue Jun 23 12:46:50 CEST 2015


>>> 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.
>>
>> Hmm, why should that tag disappear?  On first sight this sounds like a bug to me,
>> but I'm sure in a second you will tell me that there is a good reason for it :-)
> 
> I'm not totally sure how the transformations work in the end, the code
> is quite involved, but the quick answer is if consider
> 
> struct A
> {
> 	typdef X tag;
> };
> 
> and
> 
> template<typename T>
> struct S
> {
> 	A a;
> };
> 
> S<A> will not contain the tag anymore. The TypeTree::ProxyNode is used
> to wrap the actual node and perhaps that is the place where things go wrong.

So we need to ask the master.  Steffen, are you there?


> 
>>> 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
>>
>> I'd dislike doing this, but it seems like I have to:  in 3d my overall space has
>> 8 components, and the VTKWriter flat-out refuses to write that.
> 
> I just saw an alternative possibility...
> 
> you can pass a predicate to addSolutionToVTKWriter. the predicate is
> called with a local function space and returns true if the data
> associated with this space should be written. By this you could call
> addSolutionToVTKWriter for the whole GFS and use the predicate to
> filter the subspaces.

That sounds good.  Do you have example code that shows how to do this?

Thanks,
Oliver

> 
> Christian
> 


-------------- 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-pdelab/attachments/20150623/f3a585e8/attachment.sig>


More information about the dune-pdelab mailing list