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

Christian Engwer christian.engwer at uni-muenster.de
Thu Jun 25 16:16:34 CEST 2015


Hi Oli,

can please cookup a MWE, which we can use to track down the problem?

Thanks
Christian

On Tue, Jun 23, 2015 at 12:46:50PM +0200, Oliver Sander wrote:
> >>> 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
> > 
> 
> 



-- 
Prof. Dr. Christian Engwer 
Institut für Numerische und Angewandte Mathematik
Fachbereich Mathematik und Informatik der Universität Münster
Einsteinstrasse 62
48149 Münster

E-Mail	christian.engwer at uni-muenster.de
Telefon	+49 251 83-35067
FAX		+49 251 83-32729




More information about the dune-pdelab mailing list