1 #ifndef DUNE_BOUNDARYPROJECTION_HH
2 #define DUNE_BOUNDARYPROJECTION_HH
8 #include <dune/common/fvector.hh>
9 #include <dune/common/shared_ptr.hh>
11 #include <dune/geometry/genericgeometry/mappingprovider.hh>
12 #include <dune/geometry/genericgeometry/geometrytraits.hh>
21 template <
int dimworld>
33 template <
int dimworld >
55 return proj_( global );
62 template<
int dim,
int dimworld >
69 typedef GenericGeometry::DefaultGeometryTraits< double, dim-1, dimworld > GeometryTraits;
70 typedef GenericGeometry::HybridMapping< dim-1, GeometryTraits > FaceMapping;
71 typedef GenericGeometry::MappingProvider< FaceMapping, 0 > FaceMappingProvider;
86 const std::vector< CoordinateType > &vertices,
88 : faceMapping_( FaceMappingProvider::create( type.id(), vertices ) ),
89 boundarySegment_( boundarySegment )
99 return *boundarySegment_;
103 shared_ptr< FaceMapping > faceMapping_;
104 const shared_ptr< BoundarySegment > boundarySegment_;
114 template <
int dimworld>
132 const double factor =
radius_ / global.two_norm();
145 #endif // #ifndef DUNE_BOUNDARYPROJECTION_HH