[dune-pdelab] Getting coefficients in local function space

Steffen Müthing steffen.muething at ipvs.uni-stuttgart.de
Wed May 22 23:30:24 CEST 2013


HI Thomas,

Am 22.05.2013 um 22:47 schrieb Thomas Ulrich:

> Hi,
> 
> I am trying to implement a slope limiter for a DG scheme. I am trying to
> loop over the elements and access the coefficients of the local basis
> functions using this piece of code:
> 
>    for (LeafIterator it = gv.template begin<0, Dune::Interior_Partition>();
>            it != gv.template end<0, Dune::Interior_Partition>(); ++it) {
> 
>        const Element& e = *it;
>        lfsu.bind(e);
>        std::vector<typename U::ElementType> u_l;
>        u_l = std::vector<typename U::ElementType>(lfsu.size());
>        lfsu.vread(u, u_l); // read coefficients
> 
> This should be basically the same concept as in pdelab/adaptivity/adapt.hh.
> 
> However, when trying to compile my code I always get the error:
> slopelimiter.hh:142:3: Fehler: »LFSU« hat kein Element namens »vread«

what version of PDELab do you use? Judging by the error, I'd guess that you
are on the master branch. Since the 1.1 release, there have been major changes
to the way DOFs and their indexing are handled, and as part of those changes,
the LocalFunctionSpace has lost the v{read|write|add} methods. You need two
additional components, an LFSCache and a LocalView into the global DOF vector,
to make this work.
Unfortunately, you managed to pick the worst possible file as a template… ;-)
adapt.hh is broken (it has not been ported to the new DOF infrastructure and has been
superseded by adaptivity.hh). If you are on the master branch, look at the method
backupData() in adaptivity.hh for a working example instead.

If you are on the 1.1 release, I don't really know what's causing this. In that case, I'd need
a complete compile log.

Best,
Steffen

> 
> When trying to save the modified coefficients via lfsu.vwrite(u, u_l); I
> experience the same error.
> 
> lfsu is declared as follows:
>    typedef typename Dune::PDELab::LocalFunctionSpace<GFSU> LFSU;
>    LFSU lfsu(gfsu);
> 
> 
> Greets,
> Thomas
> 
> _______________________________________________
> dune-pdelab mailing list
> dune-pdelab at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab

Steffen Müthing
Universität Stuttgart
Institut für Parallele und Verteilte Systeme
Universitätsstr. 38
70569 Stuttgart
Tel: +49 711 685 88429
Fax: +49 711 685 88340
Email: steffen.muething at ipvs.uni-stuttgart.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 535 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20130522/c235b68c/attachment.sig>


More information about the dune-pdelab mailing list