21 #ifndef bempp_concrete_entity_hpp
22 #define bempp_concrete_entity_hpp
24 #include "../common/common.hpp"
26 #include "concrete_entity_decl.hpp"
27 #include "concrete_entity_pointer.hpp"
28 #include "concrete_range_entity_iterator.hpp"
29 #include "concrete_subentity_iterator.hpp"
34 template<
typename DuneEntity>
35 template<
int codimSub>
36 inline typename boost::disable_if_c<(codimSub <= DuneEntity::dimension), std::auto_ptr<EntityIterator<codimSub> > >::type
37 ConcreteEntity<0, DuneEntity>::subEntityCodimNIterator()
const
39 throw std::logic_error(
"Entity::subEntityIterator(): invalid subentity codimension");
42 template<
typename DuneEntity>
43 template<
int codimSub>
44 inline typename boost::enable_if_c<(codimSub <= DuneEntity::dimension), std::auto_ptr<EntityIterator<codimSub> > >::type
45 ConcreteEntity<0, DuneEntity>::subEntityCodimNIterator()
const
47 typedef ConcreteSubentityIterator<DuneEntity, codimSub> ConcIterator;
48 return std::auto_ptr<EntityIterator<codimSub> >(
49 new ConcIterator(m_dune_entity, m_domain_index));
52 template<
typename DuneEntity>
56 if (m_dune_entity->hasFather())
58 new ConcPointer(m_dune_entity->father(), m_domain_index));
60 return std::auto_ptr<EntityPointer<0> >(0);
63 template<
typename DuneEntity>
67 typedef typename DuneEntity::HierarchicIterator DuneIterator;
68 typedef typename DuneEntity::EntityPointer DuneEntityPointer;
70 return std::auto_ptr<EntityIterator<0> >(
71 new ConcIterator(m_dune_entity->hbegin(maxlevel),
72 m_dune_entity->hend(maxlevel),
Abstract base class for an object providing read-only access to an entity of codimension codim...
Definition: entity_pointer.hpp:42
Wrapper of a Dune entity pointer of type DuneEntityPointer.
Definition: concrete_entity_pointer.hpp:37
Iterator over entities referenced by a range of Dune iterators of type DuneEntityIt.
Definition: concrete_range_entity_iterator.hpp:43
Wrapper of a Dune entity of type DuneEntity and codimension codim.
Definition: concrete_entity_decl.hpp:46