[Dune] calling subId(...) inside Dune::CommDataHandleIF::gather(...)

Vogelbacher Florian Florian.Vogelbacher at psi.ch
Fri Sep 10 12:23:15 CEST 2010


Dear Dune,

inside the function gather(...) from a class derived from 
Dune::CommDataHandleIF I like to call the subId(...) function using the 
entity provided by the gather parameter list. However it throws me a 
whole bunch of errors. Follwing a excerpt of the gather().

[...]
template<class MessageBuffer, class EntityType>
void gather (MessageBuffer& buff, const EntityType& entity) const
{
/** \brief Calculate codimensions of vertex and edge */
unsigned int codimofvertex = GridType::dimension;

/** \brief Storing the local corner numbers */
int vi = 0;
int vj = 1;
int vk = 2;
int vl = 3;

/** \brief We get the global ID of each subentity 'node' and the
GlobalId idNodeI = globalIdSet_.template subId(entity, vi, codimofvertex);
GlobalId idNodeJ = globalIdSet_.template subId(entity, vj, codimofvertex);
GlobalId idNodeK = globalIdSet_.template subId(entity, vk, codimofvertex);
GlobalId idNodeL = globalIdSet_.template subId(entity, vl, codimofvertex);
[...]

The error is as follwing:

../algebra/parallelsolverdiscontinuousgalerkin.hh:298: error: no 
matching function for call to ‘Dune::IdSet<Dune::ALU3dGrid<3, 3, tetra>, 
Dune::ALU3dGridGlobalIdSet<3, 3, tetra>, 
Dune::ALUGridId<Dune::ALUMacroKey> >::subId(const Dune::Entity<1, 3, 
const Dune::ALU3dGrid<3, 3, tetra>, Dune::ALU3dGridEntity>&, int&, 
unsigned int&) const’
/home4/vogelbacher_f/svnwork/dune-trunk/dune-grid/dune/grid/common/indexidset.hh:377: 
note: candidates are: IdTypeImp Dune::IdSet<GridImp, IdSetImp, 
IdTypeImp>::subId(const typename 
std::remove_const<_Tp>::type::Traits::Codim<0>::Entity&, int, unsigned 
int) const [with GridImp = Dune::ALU3dGrid<3, 3, tetra>, IdSetImp = 
Dune::ALU3dGridGlobalIdSet<3, 3, tetra>, IdTypeImp = 
Dune::ALUGridId<Dune::ALUMacroKey>]

There are two things confusing me. First, why the function tries to use 
a parameter Dune::Entity<1,3,..> (and later in the error list for 
Dune::Entity<2,3,..>, Dune::Entity<3,3,..>) even though I use CODIM0 only.

Secondly, how I might be able to change the type of the entity to be of 
the type used in the subId(...) function so I can call subId correctly.

thanks a lot in advance
florian

-- 
---------------------------
Paul Scherrer Institut
Florian Vogelbacher
WBCA/004
5232 Villigen PSI
Switzerland

Mail: 	Florian.Vogelbacher at psi.ch
Phone:	+41 (0) 563105019
Web:	www.psi.ch
---------------------------




More information about the Dune mailing list