[dune-pdelab] Problem with codim 1 iterator and UG Grid

Christian Engwer christian.engwer at uni-muenster.de
Fri May 13 21:49:32 CEST 2016


As you are using pdelab, you can use the local-operator immediately,
which allows access to the codim1 entities via the skeleton terms on
conforming meshes. I'm even wondering, if you really want codim1, or
if you actually want intersection?!

Ciao
Christian

On Fri, May 13, 2016 at 02:40:51PM +0000, Dodwell, Timothy wrote:
> Hi all,
> 
> I am implementing implicit error estimator, which requires me to loop over all entities of codim 1
> 
> When I do this, something like
> 
>       // Make grid using UGGrid
>       typedef Dune::UGGrid<dim> GRID;
>       GRID grid;
>       Dune::GridFactory<GRID> factory(&grid);
>       Dune::GmshReader<GRID>::read(factory,gridName);
>       factory.createGrid();
>       //grid.loadBalance(newcomm);
> 
>       typedef typename GRID::LeafGridView GV;
>       GV gv = grid.leafGridView(); // Get finest grid
> 
>       typedef typename GV::template Codim< 1 >::Iterator CodimIterator;
> 
>       const CodimIterator codimEnd = gv.template end< 1 >();
> 
>       int size = 0;
>       for( CodimIterator it = gv.template begin< 1 >(); it != codimEnd; ++it )
>         {
>           ++size;
>         }
> 
> I get the following error
> 
> 
> /home/tjd20/git_workspace/dune/dune/dune-grid/dune/grid/uggrid/uggridleafiterator.hh:141:56: error: invalid conversion from void*' to 'Dune::UG_NS<2>::Entity<1>::T* {aka UG::D2::edge*}' [-fpermissive]
> 
>        this->virtualEntity_.setToTarget(UG_NS<dim>::succ(this->virtualEntity_.getTarget()), grid_);
> 
> Works fine for codim 0 and 2
> 
> Anyway ideas?
> 
> Cheers
> 
> Tim
> 
> Dr Tim Dodwell
> Lecturer in Engineering Mathematics
> Rm 221 - Harrison Building
> College of Engineering, Mathematics & Physical Sciences
> University of Exeter
> Exeter
> Devon
> EX4 4PY
> 
> mail: t.dodwell(at)exeter.ac.uk<http://exeter.ac.uk/>
> tel: +44 (0)1392 725899
> mob: +44 (0)7745 622870
> web: http://emps.exeter.ac.uk/engineering/staff/td336
> Papers and Pre-prints: @Research-Gate<https://www.researchgate.net/profile/Timothy_Dodwell>
> Citations: @Google-Scholar<https://scholar.google.co.uk/citations?user=lPpjRfUAAAAJ&hl=en>

> _______________________________________________
> dune-pdelab mailing list
> dune-pdelab at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab


-- 
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