1 #ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH 2 #define DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH 9 #include <dune/geometry/referenceelementimplementation.hh> 10 #include <dune/geometry/type.hh> 21 inline std::size_t
numLagrangePoints (
unsigned int topologyId,
int dim,
unsigned int order )
23 assert( topologyId < Impl::numTopologies( dim ) );
27 const unsigned int baseId = Impl::baseTopologyId( topologyId, dim );
28 if( Impl::isPyramid( topologyId, dim ) )
31 for(
unsigned int o = 0; o <= order; ++o )
47 template<
class ct,
unsigned int cdim >
50 assert( (0 <= codim) && (codim <= dim) && (dim <= cdim) );
51 assert( topologyId < Impl::numTopologies( dim ) );
55 const unsigned int baseId = Impl::baseTopologyId( topologyId, dim );
56 const unsigned int numBaseN = (codim < dim ? Geo::Impl::size( baseId, dim-1, codim ) : 0);
57 const unsigned int numBaseM = (codim > 0 ? Geo::Impl::size( baseId, dim-1, codim-1 ) : 0);
59 if( Impl::isPrism( topologyId, dim ) )
61 unsigned int size = 0;
64 for(
unsigned int i = 1; i < order; ++i )
67 for(
unsigned int j = 0; j < n; ++j )
71 points->
point_[ dim-1 ] = ct( i ) / ct( order );
81 for(
unsigned int j = 0; j < n; ++j )
87 points[ j + n ].
point_[ dim-1 ] = ct( 1 );
100 for( ; points != end; ++points )
105 for(
unsigned int i = order-1; i > 0; --i )
109 for( ; points != end; ++points )
112 for(
unsigned int j = 0; j < dim-1; ++j )
113 points->
point_[ j ] *= ct( i ) / ct( order );
114 points->
point_[ dim-1 ] = ct( order - i ) / ct( order );
123 points->
point_[ dim-1 ] = ct( 1 );
143 template<
class F,
unsigned int dim >
162 std::vector< unsigned int > count;
163 for(
unsigned int mydim = 0; mydim <=
dimension; ++mydim )
165 count.resize( Geo::Impl::size( gt.id(),
dimension, dimension-mydim ) );
166 std::fill( count.begin(), count.end(), 0u );
174 build( GeometryType( T() ) );
187 #endif // #ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH unsigned int index() const
Return offset within subentity.
Definition: localkey.hh:66
Definition: emptypoints.hh:15
void build(GeometryType gt)
Definition: equidistantpoints.hh:156
Definition: equidistantpoints.hh:144
std::size_t numLagrangePoints(unsigned int topologyId, int dim, unsigned int order)
Definition: equidistantpoints.hh:21
unsigned int order() const
Definition: emptypoints.hh:87
std::vector< LagrangePoint > points_
Definition: emptypoints.hh:99
LocalKey localKey_
Definition: emptypoints.hh:40
Definition: brezzidouglasmarini1cube2dlocalbasis.hh:15
unsigned int subEntity() const
Return number of associated subentity.
Definition: localkey.hh:54
static const unsigned int dimension
Definition: equidistantpoints.hh:150
Vector point_
Definition: emptypoints.hh:39
Describe position of one degree of freedom.
Definition: localkey.hh:20
Definition: emptypoints.hh:47
static bool supports(unsigned int order)
Definition: equidistantpoints.hh:179
bool build()
Definition: equidistantpoints.hh:172
static unsigned int equidistantLagrangePoints(unsigned int topologyId, unsigned int dim, unsigned int codim, unsigned int order, unsigned int *count, LagrangePoint< ct, cdim > *points)
Definition: equidistantpoints.hh:48
EquidistantPointSet(unsigned int order)
Definition: equidistantpoints.hh:154