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, std::size_t 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 )
166 std::fill( count.begin(), count.end(), 0u );
174 build( GeometryType( T() ) );
Definition: bdfmcube.hh:16
std::size_t numLagrangePoints(unsigned int topologyId, int dim, std::size_t order)
Definition: equidistantpoints.hh:21
static unsigned int equidistantLagrangePoints(unsigned int topologyId, unsigned int dim, unsigned int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > *points)
Definition: equidistantpoints.hh:48
Describe position of one degree of freedom.
Definition: localkey.hh:21
unsigned int index() const
Return offset within subentity.
Definition: localkey.hh:66
unsigned int subEntity() const
Return number of associated subentity.
Definition: localkey.hh:54
Definition: emptypoints.hh:16
Vector point_
Definition: emptypoints.hh:39
LocalKey localKey_
Definition: emptypoints.hh:40
Definition: emptypoints.hh:48
std::size_t order() const
Definition: emptypoints.hh:87
std::vector< LagrangePoint > points_
Definition: emptypoints.hh:99
Definition: equidistantpoints.hh:146
std::size_t order() const
Definition: emptypoints.hh:87
bool build()
Definition: equidistantpoints.hh:172
static bool supports(std::size_t order)
Definition: equidistantpoints.hh:179
static const unsigned int dimension
Definition: equidistantpoints.hh:150
void build(GeometryType gt)
Definition: equidistantpoints.hh:156
EquidistantPointSet(std::size_t order)
Definition: equidistantpoints.hh:154