[Dune] index error

Sreejith Pulloor Kuttanikkad sreejith at hal.iwr.uni-heidelberg.de
Sat Nov 26 20:03:41 CET 2005


Okay. The problems got solved. it was mistake from my side  as always :)
this time after updating dune i forgot  do a make. now after make-ing
errors disappeared. 

thanks,
Sreejith

On Sat, Nov 26, 2005 at 01:55:17PM +0100, Sreejith Pulloor Kuttanikkad wrote:
> 
> Below are two error messages that I got when trying to get
> element index and when using UG grid. I couldnt figure out why.
> 
> 1) I used to get the element index/id in the following way:
> 
> int eid = mygrid.levelIndexSet(mygrid.maxLevel()).index(*it);
> 
>  where Iterator it = mygrid.lbegin<0>(mygrid.maxLevel());
> but after updating the dune, I get following error message:
> 
> /afs/iwr.uni-heidelberg.de/home/sreejith/dune-home/dune/dune/grid/sgrid.hh:
> In member function `const typename Dune::SGridFamily<dim,
> dimworld>::Traits::LevelIndexSet& Dune::SGrid<dim,
> dimworld>::levelIndexSet(int) const [with int dim = 2, int dimworld =
> 2]':
> stokes_pblm.cc:149:   instantiated from here
> /afs/iwr.uni-heidelberg.de/home/sreejith/dune-home/dune/dune/grid/sgrid.hh:1363:
> error: invalid initialization of reference of type 'const
> Dune::IndexSet<Dune::SGrid<2, 2>, Dune::SGridLevelIndexSet<const
> Dune::SGrid<2, 2> >, Dune::SGridLevelIndexSetTypes<const Dune::SGrid<2,
> 2> > >&' from expression of type 'Dune::SGridLevelIndexSet<const
> Dune::SGrid<2, 2> >'
> /afs/iwr.uni-heidelberg.de/home/sreejith/dune-home/dune/dune/grid/common/indexidset.hh:
> In member function `const IndexSetImp& Dune::IndexSet<GridImp,
> IndexSetIteratorImp, IndexSetImp>::asImp() const [with GridImp =
> Dune::SGrid<2, 2>, IndexSetImp = Dune::SGridLevelIndexSet<const
> Dune::SGrid<2, 2> >, IndexSetTypes = Dune::SGridLevelIndexSetTypes<const
> Dune::SGrid<2, 2> >]':
> /afs/iwr.uni-heidelberg.de/home/sreejith/dune-home/dune/dune/grid/common/indexidset.hh:86:
> instantiated from `int Dune::IndexSet<GridImp, IndexSetIteratorImp,
> IndexSetImp>::index(const EntityType&) const [with EntityType =
> Dune::Entity<0, 2, const Dune::SGrid<2, 2>, Dune::SEntity>, GridImp =
> Dune::SGrid<2, 2>, IndexSetImp = Dune::SGridLevelIndexSet<const
> Dune::SGrid<2, 2> >, IndexSetTypes = Dune::SGridLevelIndexSetTypes<const
> Dune::SGrid<2, 2> >]'
> stokes_pblm.cc:149:   instantiated from here
> /afs/iwr.uni-heidelberg.de/home/sreejith/dune-home/dune/dune/grid/common/indexidset.hh:164:
> error: invalid static_cast from type `const
> Dune::IndexSet<Dune::SGrid<2, 2>, Dune::SGridLevelIndexSet<const
> Dune::SGrid<2, 2> >, Dune::SGridLevelIndexSetTypes<const Dune::SGrid<2,
> 2> > >' to type `const Dune::SGridLevelIndexSet<const Dune::SGrid<2, 2>
> >&'
> 
> 
> 2) error message with UG grid
> 
> after updating the dune when i try to use UG grid its giving following
> error message:
> 
> afs/iwr.uni-heidelberg.de/home/sreejith/dune-home/dune/dune/grid/uggrid.hh:
> In member function `const typename Dune::UGGridFamily<dim,
> dimworld>::Traits::LevelIndexSet& Dune::UGGrid<dim,
> dimworld>::levelIndexSet(int) const [with int dim = 2, int dimworld =
> 2]':
> stokes_pblm.cc:149:   instantiated from here
> /afs/iwr.uni-heidelberg.de/home/sreejith/dune-home/dune/dune/grid/uggrid.hh:330:
> error: invalid initialization of reference of type 'const
> Dune::IndexSet<Dune::UGGrid<2, 2>, Dune::UGGridLevelIndexSet<const
> Dune::UGGrid<2, 2> >, Dune::UGGridLevelIndexSetTypes<const
> Dune::UGGrid<2, 2> > >&' from expression of type
> 'Dune::UGGridLevelIndexSet<const Dune::UGGrid<2, 2> >'
> /afs/iwr.uni-heidelberg.de/home/sreejith/dune-home/dune/dune/grid/common/indexidset.hh:
> In member function `const IndexSetImp& Dune::IndexSet<GridImp,
> IndexSetIteratorImp, IndexSetImp>::asImp() const [with GridImp =
> Dune::UGGrid<2, 2>, IndexSetImp = Dune::UGGridLevelIndexSet<const
> Dune::UGGrid<2, 2> >, IndexSetTypes =
> Dune::UGGridLevelIndexSetTypes<const Dune::UGGrid<2, 2> >]':
> /afs/iwr.uni-heidelberg.de/home/sreejith/dune-home/dune/dune/grid/common/indexidset.hh:86:
> instantiated from `int Dune::IndexSet<GridImp, IndexSetIteratorImp,
> IndexSetImp>::index(const EntityType&) const [with EntityType =
> Dune::Entity<0, 2, const Dune::UGGrid<2, 2>, Dune::UGGridEntity>,
> GridImp = Dune::UGGrid<2, 2>, IndexSetImp =
> Dune::UGGridLevelIndexSet<const Dune::UGGrid<2, 2> >, IndexSetTypes =
> Dune::UGGridLevelIndexSetTypes<const Dune::UGGrid<2, 2> >]'
> stokes_pblm.cc:149:   instantiated from here
> /afs/iwr.uni-heidelberg.de/home/sreejith/dune-home/dune/dune/grid/common/indexidset.hh:164:
> error: invalid static_cast from type `const
> Dune::IndexSet<Dune::UGGrid<2, 2>, Dune::UGGridLevelIndexSet<const
> Dune::UGGrid<2, 2> >, Dune::UGGridLevelIndexSetTypes<const
> Dune::UGGrid<2, 2> > >' to type `const Dune::UGGridLevelIndexSet<const
> Dune::UGGrid<2, 2> >&
> 
> Thanks,
> Sreejith
> 
> 
> 
> -- 
> Sreejith Pulloor Kuttanikkad                       
> Interdisciplinary Centre for Scientific Computing 
> Ruprecht-Karls-University of Heidelberg          
> Room:009, Im Neuenheimer Feld-348                         
> 69120,Heidelberg,Germany                      
> ------------------------------------------------
> Ph :+49+(0)6221-545689/544412(Off)
>    :+49+(0)17624228904(Mob)
> http://hal.iwr.uni-heidelberg.de/~sreejith/
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> _______________________________________________
> Dune mailing list
> Dune at hal.iwr.uni-heidelberg.de
> http://hal.iwr.uni-heidelberg.de/cgi-bin/mailman/listinfo/dune
> 

-- 
Sreejith Pulloor Kuttanikkad                       
Interdisciplinary Centre for Scientific Computing 
Ruprecht-Karls-University of Heidelberg          
Room:009, Im Neuenheimer Feld-348                         
69120,Heidelberg,Germany                      
------------------------------------------------
Ph :+49+(0)6221-545689/544412(Off)
   :+49+(0)17624228904(Mob)
http://hal.iwr.uni-heidelberg.de/~sreejith/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




More information about the Dune mailing list