1 #ifndef DUNE_FEM_GRIDPART_FILTER_RADIALFILTER_HH 2 #define DUNE_FEM_GRIDPART_FILTER_RADIALFILTER_HH 5 #include <dune/common/fvector.hh> 19 template <
typename ct,
int dimw >
45 template<
class Entity >
48 static const int cc = Entity::codimension;
50 DUNE_THROW( InvalidStateException,
"RadialFilter::contains only available for codim 0 entities" );
51 ctype dist = (entity.geometry().center() - center_).two_norm();
52 return (dist > radius_);
56 template<
class Intersection >
59 typedef typename Intersection::Entity EntityType;
60 const EntityType outside(intersection.outside());
67 template <
class IntersectionIteratorType >
74 template <
class IntersectionIteratorType >
81 template <
class IntersectionIteratorType>
88 const GlobalCoordinateType center_;
97 #endif // #ifndef DUNE_FEM_GRIDPART_FILTER_RADIALFILTER_HH
RadialFilter()
Definition: radialfilter.hh:39
bool intersectionNeighbor(const IntersectionIteratorType &it) const
if contains() is true then we have an interior entity
Definition: radialfilter.hh:82
Dune::FieldVector< ct, dimw > GlobalCoordinateType
coordinate type
Definition: radialfilter.hh:30
bool contains(const Entity &entity) const
check whether entity center is inside of circle
Definition: radialfilter.hh:46
Definition: coordinate.hh:4
static const int dimensionworld
export dimension
Definition: radialfilter.hh:27
int intersectionBoundaryId(const IntersectionIteratorType &it) const
return what boundary id we have in case of boundary intersection
Definition: radialfilter.hh:75
bool interiorIntersection(const Intersection &intersection) const
default implementation returns contains from neighbor
Definition: radialfilter.hh:57
bool intersectionBoundary(const IntersectionIteratorType &it) const
return what boundary id we have in case of boundary intersection
Definition: radialfilter.hh:68
example implementation; given center x and radius r, filter is characteristic function of clos B_r( x...
Definition: radialfilter.hh:20
RadialFilter(const GlobalCoordinateType ¢er, const ctype radius)
constructor
Definition: radialfilter.hh:33
ct ctype
export template parameter
Definition: radialfilter.hh:24