[dune-pdelab] DiscreteGridFunction of PowerGridFunctionSpace

Bernd Flemisch bernd at iws.uni-stuttgart.de
Sun May 9 18:45:30 CEST 2010


Sorry, I just sent the first reply to the wrong list.

But when I look at my typedefs below, I am again very 
surprised that I have to use the number of equations 
"numEq" in the typedef for the vector backend for the 
SCALAR grid function space. I remember that otherwise I 
could not get it to work, although in the pdelab-howto 
there are examples which use "1" for the scalar space, 
which should be the correct choice.

My first reply:
Hey Christian,

we use a PowerGridFunctionSpace, it seems to work without 
problems. I attach our typedefs below, maybe that helps. 
The Constraints are hand-made, but should be exchangeable 
with other ones.

Kind regards
Bernd

typedef typename 
Dune::PDELab::Q1LocalFiniteElementMap<Scalar,Scalar,dim> 
FEM;

typedef typename 
Dumux::NonoverlappingBoxDirichletConstraints<TypeTag> 
Constraints;

typedef Dune::PDELab::GridFunctionSpace<GridView, FEM, 
Constraints,
Dune::PDELab::ISTLVectorBackend<numEq> > 
ScalarGridFunctionSpace;

typedef 
Dune::PDELab::PowerGridFunctionSpace<ScalarGridFunctionSpace, 
numEq,
Dune::PDELab::GridFunctionSpaceBlockwiseMapper> 
GridFunctionSpace;


On Sat, 8 May 2010 00:45:38 +0200
  Christian Engwer <christi at uni-hd.de> wrote:
> Hey,
> 
> I'm trying to implement a DG Stokes code based on 
>PDElab, which will
> serve as a starting point for a transition of my UDG 
>Code to PDELab.
> 
> Today I managed to implement the block-structure stuff 
>in pdelab and
> now I can create a function space like this:
> 
> v \in P_k
> p \in P_{k-1}
> 
> V_{stokes} = (P_k)^d \times P_{k-1}
> 
> Using the sub-space stuff it is quite easy to create a 
>scalar discrete
> function for the pressure. But when I try to create a 
>vector valued
> discrete function for the velocity 
>(PowerGridFunctionSpace<DG-K-Space,dim>)
> I get some errors about missing typedefs in some traits 
>etc.
> 
> - Did anybody successfully create vector valued discret 
>functions?
> - What is the trick?
> 
> Christian
> 
> PS: did I mention, that we definitely have to improve 
>the
> 	documentation?
> 
> _______________________________________________
> dune-pdelab mailing list
> dune-pdelab at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab

___________________________________________________________

Bernd Flemisch                     phone: +49 711 685 
69162
IWS, Universitaet Stuttgart          fax: +49 711 685 
67020
Pfaffenwaldring 61        email: 
bernd at iws.uni-stuttgart.de
D-70569 Stuttgart        url: 
www.hydrosys.uni-stuttgart.de
___________________________________________________________




More information about the dune-pdelab mailing list