6#ifndef DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH
7#define DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH
14#include <dune/geometry/referenceelements.hh>
15#include <dune/geometry/generalvertexorder.hh>
31 template<
class IdSet,
class Index = std::
size_t>
37 template<std::
size_t dim>
40 typedef GeneralVertexOrder<dim, Index>
type;
62 template<
typename Element>
66 std::size_t size =
referenceElement(e.geometry()).size(Element::mydimension);
68 std::vector<typename IdSet::IdType> ids(size);
69 for(std::size_t i = 0; i < size; ++i)
70 ids[i] = idset.
subId(e, i, Element::mydimension);
71 return GeneralVertexOrder<Element::mydimension, Index>
72 (e.type(), ids.begin(), ids.end());
Include standard header files.
Definition: agrid.hh:60
auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
Definition: common/geometry.hh:558
ALBERTA EL Element
Definition: misc.hh:54
Id Set Interface.
Definition: indexidset.hh:452
IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim) const
Get id of subentity i of co-dimension codim of a co-dimension 0 entity.
Definition: indexidset.hh:486
Factory for GeneralVertexOrder objects using an IdSet.
Definition: vertexorderfactory.hh:32
VertexOrderByIdFactory(const IdSet &idset_)
construct a factory object
Definition: vertexorderfactory.hh:53
VertexOrder< Element::mydimension >::type make(const Element &e) const
construct a vertex ordering object
Definition: vertexorderfactory.hh:64
type of vertex order object may depend on the dimension of the element
Definition: vertexorderfactory.hh:38
GeneralVertexOrder< dim, Index > type
type of vertex order object
Definition: vertexorderfactory.hh:40