[dune-pdelab] mapping of PowerGridFunctionSpace

Felix Heimann felix.heimann at iwr.uni-heidelberg.de
Thu Sep 8 14:08:58 CEST 2011


Dear Oleh,

about the first problem:

> So now for diffusion step I need a map from
> GridOperator<PowerGridFunctionSpace<GFS,N,...>,...>::Traits::Domain
> to
> GridOperator<GFS,...>::Traits::Domain [N]
> 

You can set up such a mapping easily by using the subMap(..) method on
the PowerGridFunctionSpace<GFS,N,...> which provides the inverse mapping
(from child to root index set).

> And for reaction step I need a map from
> GridOperator<PowerGridFunctionSpace<GFS,N>,...>::Traits::Domain
> to
> FieldVector<double,N> [number of grid points]
> 

If you are using P1/Q1 finite elements, then you may use the same
approach as above to realize such a mapping. However, then you still
don't know which vertex belongs to which value. Actually I do not really
see any other way, but to perform an extra grid iteration and bind a
local function space to each grid cell and extract this information from
it. At least you would only have to do it once.

A more general approach would be to define a discrete grid function for
each reaction component and interpolate their values at the grid
vertices manually (in an extra grid iteration). This way, at least, you
directly know which value corresponds to which vertex. 

Best Regards,
Felix 


-- 
Felix Heimann
Universität Heidelberg
Interdisziplinäres Zentrum für Wissenschaftliches Rechnen
Arbeitsgruppe Paralleles Rechnen
IWR 368, Raum 422
Tel: 06221 / 54 8881





More information about the dune-pdelab mailing list