3 #ifndef DUNE_BOUNDARYPROJECTION_HH 4 #define DUNE_BOUNDARYPROJECTION_HH 11 #include <dune/common/fvector.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 std::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 std::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 Base class for grid boundary segments of arbitrary geometry.
Definition: boundaryprojection.hh:114
Interface class for vertex projection at the boundary.
Definition: boundaryprojection.hh:23
CircleBoundaryProjection(const double radius=std::sqrt((double) dimworld))
constructor taking radius of circle (default = sqrt( dimworld ) )
Definition: boundaryprojection.hh:120
const double radius_
radius of circ
Definition: boundaryprojection.hh:139
virtual ~CircleBoundaryProjection()
destructor
Definition: boundaryprojection.hh:124
const BaseType & proj_
Definition: boundaryprojection.hh:40
Definition: boundaryprojection.hh:65
Base class for classes implementing geometries of boundary segments.
Definition: boundarysegment.hh:29
BoundarySegmentWrapper(const GeometryType &type, const std::vector< CoordinateType > &vertices, const std::shared_ptr< BoundarySegment > &boundarySegment)
Definition: boundaryprojection.hh:84
BaseType ::CoordinateType CoordinateType
type of coordinate vector
Definition: boundaryprojection.hh:43
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
virtual CoordinateType operator()(const CoordinateType &global) const =0
projection operator projection a global coordinate
BoundaryProjectionWrapper(const BaseType &proje)
Definition: boundaryprojection.hh:46
~BoundaryProjectionWrapper()
destructor
Definition: boundaryprojection.hh:51
FieldVector< double, dimworld > CoordinateType
type of coordinate vector
Definition: boundaryprojection.hh:26
Definition: boundaryprojection.hh:35
const BoundarySegment & boundarySegment() const
Definition: boundaryprojection.hh:96
DuneBoundaryProjection< dimworld > BaseType
Definition: boundaryprojection.hh:39
Dune::BoundarySegment< dim, dimworld > BoundarySegment
Definition: boundaryprojection.hh:74
FieldVector< double, dimworld > CoordinateType
type of coordinate vector
Definition: boundaryprojection.hh:117
Base::CoordinateType CoordinateType
Definition: boundaryprojection.hh:73
virtual ~DuneBoundaryProjection()
destructor
Definition: boundaryprojection.hh:28
Include standard header files.
Definition: agrid.hh:58