1#ifndef DUNE_FEM_SPACE_LAGRANGE_RESTRICTPROLONG_HH
2#define DUNE_FEM_SPACE_LAGRANGE_RESTRICTPROLONG_HH
8#include <dune/geometry/referenceelements.hh>
9#include <dune/geometry/type.hh>
24 template<
class G,
int ord >
29 typedef typename GridType::ctype
ctype;
37 typedef typename LagrangePointSetType::template Codim< 0 >::SubEntityIteratorType
40 typedef std::map< const GeometryType, const LagrangePointSetType * > LagrangePointSetMapType;
45 typedef typename LagrangePointSetMapType::iterator Iterator;
46 const Iterator end = lagrangePointSet_.end();
47 for( Iterator it = lagrangePointSet_.begin(); it != end; ++it )
51 template<
class DomainField >
54 template<
class LFFather,
class LFSon,
class LocalGeometry >
57 const LocalGeometry &geometryInFather,
58 const bool initialize )
const
60 static const int dimRange = LFSon::dimRange;
62 const auto &refSon = Dune::ReferenceElements< ctype, dimension >::general( lfSon.entity().type() );
66 const EntityDofIterator send = pointSet.template endSubEntity< 0 >( 0 );
67 for( EntityDofIterator sit = pointSet.template beginSubEntity< 0 >( 0 ); sit != send; ++sit )
69 const unsigned int dof = *sit;
70 const DomainVector &pointInFather = pointSet.point( dof );
71 const DomainVector pointInSon = geometryInFather.local( pointInFather );
72 if( refSon.checkInside( pointInSon ) )
74 typename LFSon::RangeType phi;
75 lfSon.evaluate( pointInSon, phi );
81 template<
class LFFather >
85 template<
class LFFather,
class LFSon,
class LocalGeometry >
87 const LocalGeometry &geometryInFather,
88 bool initialize )
const
90 static const int dimRange = LFFather::dimRange;
94 const EntityDofIterator send = pointSet.template endSubEntity< 0 >( 0 );
95 for( EntityDofIterator sit = pointSet.template beginSubEntity< 0 >( 0 ); sit != send; ++sit )
97 const unsigned int dof = *sit;
99 const DomainVector pointInFather = geometryInFather.global( pointInSon );
101 typename LFFather::RangeType phi;
102 lfFather.evaluate( pointInFather, phi );
111 template<
class Entity >
119 typedef typename LagrangePointSetMapType::iterator Iterator;
120 Iterator it = lagrangePointSet_.find( type );
121 if( it == lagrangePointSet_.end() )
122 it = lagrangePointSet_.insert( it, std::make_pair( type,
new LagrangePointSetType( type, order ) ) );
123 assert( it->second != 0 );
124 return *(it->second);
128 mutable LagrangePointSetMapType lagrangePointSet_;
Definition: bindguard.hh:11
static const Point & coordinate(const Point &x)
Definition: coordinate.hh:14
Definition: lagrangepoints.hh:685
Definition: lagrange/restrictprolong.hh:26
bool needCommunication() const
Definition: lagrange/restrictprolong.hh:108
void restrictFinalize(LFFather &lfFather) const
Definition: lagrange/restrictprolong.hh:82
~LagrangeLocalRestrictProlong()
Definition: lagrange/restrictprolong.hh:43
static const int dimension
Definition: lagrange/restrictprolong.hh:30
const LagrangePointSetType & lagrangePointSet(const GeometryType &type, const int order) const
Definition: lagrange/restrictprolong.hh:117
GridType::ctype ctype
Definition: lagrange/restrictprolong.hh:29
void restrictLocal(LFFather &lfFather, const LFSon &lfSon, const LocalGeometry &geometryInFather, const bool initialize) const
Definition: lagrange/restrictprolong.hh:55
G GridType
Definition: lagrange/restrictprolong.hh:27
LagrangePointSet< LeafGridPart< GridType >, ord > LagrangePointSetType
Definition: lagrange/restrictprolong.hh:34
FieldVector< ctype, dimension > DomainVector
Definition: lagrange/restrictprolong.hh:32
void setFatherChildWeight(const DomainField &weight)
Definition: lagrange/restrictprolong.hh:52
void prolongLocal(const LFFather &lfFather, LFSon &lfSon, const LocalGeometry &geometryInFather, bool initialize) const
Definition: lagrange/restrictprolong.hh:86
const LagrangePointSetType & lagrangePointSet(const Entity &entity, const int order) const
Definition: lagrange/restrictprolong.hh:112