12 #ifndef DUNE_GRIDGLUE_COMMON_SIMPLEXGEOMETRY_HH
13 #define DUNE_GRIDGLUE_COMMON_SIMPLEXGEOMETRY_HH
17 #include <dune/geometry/genericgeometry/geometry.hh>
18 #include <dune/geometry/genericgeometry/geometrytraits.hh>
19 #include <dune/geometry/genericgeometry/cornermapping.hh>
20 #include <dune/geometry/genericgeometry/topologytypes.hh>
31 template<
class ctype,
int dim,
int dimworld>
33 :
public Dune::GenericGeometry::DefaultGeometryTraits<ctype, dim, dimworld, true>
35 typedef typename Dune::GenericGeometry::DefaultGeometryTraits<ctype, dim, dimworld, true>
Base;
40 static const unsigned int topologyId = Dune::GenericGeometry::SimplexTopology< dim >::type::id;
42 template<
class Topology>
45 typedef Dune::GenericGeometry::CoordStorage<typename Base::CoordTraits, Topology, Base::dimWorld>
CornerStorage;
46 typedef Dune::GenericGeometry::CornerMapping<typename Base::CoordTraits, Topology, Base::dimWorld, CornerStorage, true>
type;
60 template<
class ctype,
int mydim,
int coorddim>
61 class SimplexGeometry :
public Dune::GenericGeometry::BasicGeometry<mydim, SimplexGeometryTraits<ctype, mydim, coorddim> >
63 typedef Dune::GenericGeometry::BasicGeometry<mydim, SimplexGeometryTraits<ctype, mydim, coorddim> > Base;
65 enum { simplex_corners = mydim+1 };
71 template<
class CoordVector>
72 SimplexGeometry(
const Dune::GeometryType &type,
const CoordVector &coords) : Base(type, coords)
84 void setup(
const Dune::GeometryType& type,
const std::array<Dune::FieldVector<ctype, coorddim>, simplex_corners>& coordinates)
87 Base::operator=(Base(type, coordinates));
95 #endif // DUNE_GRIDGLUE_COMMON_SIMPLEXGEOMETRY_HH
void setup(const Dune::GeometryType &type, const std::array< Dune::FieldVector< ctype, coorddim >, simplex_corners > &coordinates)
Setup method with a geometry type and a set of corners.
Definition: simplexgeometry.hh:84
Base::Mapping Mapping
Definition: simplexgeometry.hh:69
Definition: gridglue.hh:33
Definition: simplexgeometry.hh:43
static const bool hybrid
Definition: simplexgeometry.hh:38
SimplexGeometry(const Dune::GeometryType &type, const CoordVector &coords)
Definition: simplexgeometry.hh:72
Dune::GenericGeometry::CoordStorage< typename Base::CoordTraits, Topology, Base::dimWorld > CornerStorage
Definition: simplexgeometry.hh:45
SimplexGeometry()
Definition: simplexgeometry.hh:76
Geometry traits for simplices passed to GenericGeometry::BasicGeometry.
Definition: simplexgeometry.hh:32
Dune::GenericGeometry::CornerMapping< typename Base::CoordTraits, Topology, Base::dimWorld, CornerStorage, true > type
Definition: simplexgeometry.hh:46
Dune::GenericGeometry::DefaultGeometryTraits< ctype, dim, dimworld, true > Base
Definition: simplexgeometry.hh:35
static const unsigned int topologyId
Definition: simplexgeometry.hh:40
This class is derived from BasicGeometry using tuned geometry traits.
Definition: simplexgeometry.hh:61