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 Dune::ReferenceElement< ctype, dimension > &refSon
63 = Dune::ReferenceElements< ctype, dimension >::general( lfSon.entity().type() );
65 const LagrangePointSetType &pointSet =
lagrangePointSet( lfFather.entity() );
67 const EntityDofIterator send = pointSet.template endSubEntity< 0 >( 0 );
68 for( EntityDofIterator sit = pointSet.template beginSubEntity< 0 >( 0 ); sit != send; ++sit )
70 const unsigned int dof = *sit;
71 const DomainVector &pointInFather = pointSet.point( dof );
72 const DomainVector pointInSon = geometryInFather.local( pointInFather );
73 if( refSon.checkInside( pointInSon ) )
75 typename LFSon::RangeType phi;
76 lfSon.evaluate( pointInSon, phi );
83 template<
class LFFather,
class LFSon,
class LocalGeometry >
85 const LocalGeometry &geometryInFather,
86 bool initialize )
const 88 static const int dimRange = LFFather::dimRange;
92 const EntityDofIterator send = pointSet.template endSubEntity< 0 >( 0 );
93 for( EntityDofIterator sit = pointSet.template beginSubEntity< 0 >( 0 ); sit != send; ++sit )
95 const unsigned int dof = *sit;
96 const DomainVector &pointInSon = pointSet.point( dof );
97 const DomainVector pointInFather = geometryInFather.global( pointInSon );
99 typename LFFather::RangeType phi;
100 lfFather.evaluate( pointInFather, phi );
109 template<
class Entity >
117 typedef typename LagrangePointSetMapType::iterator Iterator;
118 Iterator it = lagrangePointSet_.find( type );
119 if( it == lagrangePointSet_.end() )
120 it = lagrangePointSet_.insert( it, std::make_pair( type,
new LagrangePointSetType( type, ord ) ) );
121 assert( it->second != 0 );
122 return *(it->second);
126 mutable LagrangePointSetMapType lagrangePointSet_;
133 #endif // #ifndef DUNE_FEM_SPACE_LAGRANGE_RESTRICTPROLONG_HH
GridType::ctype ctype
Definition: lagrange/restrictprolong.hh:29
const LagrangePointSetType & lagrangePointSet(const GeometryType &type) const
Definition: lagrange/restrictprolong.hh:115
LagrangePointSet< LeafGridPart< GridType >, ord > LagrangePointSetType
Definition: lagrange/restrictprolong.hh:34
void prolongLocal(const LFFather &lfFather, LFSon &lfSon, const LocalGeometry &geometryInFather, bool initialize) const
Definition: lagrange/restrictprolong.hh:84
Definition: lagrange/restrictprolong.hh:25
const LagrangePointSetType & lagrangePointSet(const Entity &entity) const
Definition: lagrange/restrictprolong.hh:110
~LagrangeLocalRestrictProlong()
Definition: lagrange/restrictprolong.hh:43
Definition: coordinate.hh:4
static const int dimension
Definition: lagrange/restrictprolong.hh:30
void setFatherChildWeight(const DomainField &weight)
Definition: lagrange/restrictprolong.hh:52
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
FieldVector< ctype, dimension > DomainVector
Definition: lagrange/restrictprolong.hh:32
bool needCommunication() const
Definition: lagrange/restrictprolong.hh:106
Definition: lagrangepoints.hh:461
static const Point & coordinate(const Point &x)
Definition: coordinate.hh:11