3 #ifndef DUNE_BOUNDARYPROJECTION_HH 4 #define DUNE_BOUNDARYPROJECTION_HH 10 #include <dune/common/fvector.hh> 11 #include <dune/common/shared_ptr.hh> 13 #include <dune/geometry/multilineargeometry.hh> 22 template <
int dimworld>
31 virtual CoordinateType
operator() (
const CoordinateType& global)
const = 0;
34 template <
int dimworld >
54 CoordinateType
operator() (
const CoordinateType& global)
const 56 return proj_( global );
64 template<
int dim,
int dimworld >
70 typedef MultiLinearGeometry<
typename Base::CoordinateType::value_type,dim-1,dimworld> FaceMapping;
85 const std::vector< CoordinateType > &vertices,
86 const shared_ptr< BoundarySegment > &boundarySegment )
87 : faceMapping_( FaceMapping( type, vertices ) ),
88 boundarySegment_( boundarySegment )
91 CoordinateType
operator() (
const CoordinateType &global )
const 93 return boundarySegment() ( faceMapping_.local( global ) );
98 return *boundarySegment_;
102 FaceMapping faceMapping_;
103 const shared_ptr< BoundarySegment > boundarySegment_;
113 template <
int dimworld>
121 : radius_( radius ) {}
127 virtual CoordinateType
operator() (
const CoordinateType& global)
const 129 CoordinateType prj( global );
131 const double factor = radius_ / global.two_norm();
144 #endif // #ifndef DUNE_BOUNDARYPROJECTION_HH Definition: boundaryprojection.hh:114
Interface class for vertex projection at the boundary.
Definition: boundaryprojection.hh:23
virtual ~DuneBoundaryProjection()
destructor
Definition: boundaryprojection.hh:28
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
Definition: boundaryprojection.hh:35
Base class for grid boundary segments of arbitrary geometry.
const BaseType & proj_
Definition: boundaryprojection.hh:40
Definition: boundaryprojection.hh:65
BaseType::CoordinateType CoordinateType
type of coordinate vector
Definition: boundaryprojection.hh:43
const BoundarySegment & boundarySegment() const
Definition: boundaryprojection.hh:96
~BoundaryProjectionWrapper()
destructor
Definition: boundaryprojection.hh:51
const double radius_
radius of circ
Definition: boundaryprojection.hh:139
virtual CoordinateType operator()(const CoordinateType &global) const =0
projection operator projection a global coordinate
FieldVector< double, dimworld > CoordinateType
type of coordinate vector
Definition: boundaryprojection.hh:26
BoundarySegmentWrapper(const GeometryType &type, const std::vector< CoordinateType > &vertices, const shared_ptr< BoundarySegment > &boundarySegment)
Definition: boundaryprojection.hh:84
FieldVector< double, dimworld > CoordinateType
type of coordinate vector
Definition: boundaryprojection.hh:117
BoundaryProjectionWrapper(const BaseType &proje)
Definition: boundaryprojection.hh:46
Base::CoordinateType CoordinateType
Definition: boundaryprojection.hh:73
virtual ~CircleBoundaryProjection()
destructor
Definition: boundaryprojection.hh:124
DuneBoundaryProjection< dimworld > BaseType
Definition: boundaryprojection.hh:39
Base class for classes implementing geometries of boundary segments.
Definition: boundarysegment.hh:29
Include standard header files.
Definition: agrid.hh:59
CircleBoundaryProjection(const double radius=std::sqrt((double) dimworld))
constructor taking radius of circle (default = sqrt( dimworld ) )
Definition: boundaryprojection.hh:120
Dune::BoundarySegment< dim, dimworld > BoundarySegment
Definition: boundaryprojection.hh:74