[dune-pdelab] Problem with codim 1 iterator and UG Grid
Steffen Müthing
steffen.muething at iwr.uni-heidelberg.de
Fri May 13 17:07:15 CEST 2016
Hi Tim,
> Am 13.05.2016 um 16:40 schrieb Dodwell, Timothy <T.Dodwell at exeter.ac.uk>:
>
> 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
AFAIK UG doesn’t support codim 1 iterators, it only has codim 1 entities (which you can get by calling subEntity() on
cells). But I’m not entirely sure…
Cheers
Steffen
>
> 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
> 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
> Citations: @Google-Scholar
> _______________________________________________
> dune-pdelab mailing list
> dune-pdelab at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20160513/f8bdcb6f/attachment.sig>
More information about the dune-pdelab
mailing list