6 #include <dune/common/exceptions.hh>
7 #include <dune/geometry/type.hh>
8 #include <dune/localfunctions/lagrange/equidistantpoints.hh>
17 template <
class K,
unsigned int dim>
18 class LagrangePointSetBuilder;
27 template <
class K,
unsigned int dim>
29 :
public EmptyPointSet<K, dim>
31 using Super = EmptyPointSet<K, dim>;
46 builder_(gt, order(), points_);
50 template <
class Topology>
53 build(GeometryType(Topology{}));
59 template <
class Topology>
69 Impl::LagrangePointSetBuilder<K,dim> builder_;
77 template <
class K,
unsigned int dim>
78 class LagrangePointSetBuilder
81 template <
class Po
ints>
82 void operator()(GeometryType,
unsigned int, Points& points)
const
84 DUNE_THROW(Dune::NotImplemented,
85 "Lagrange points not yet implemented for this GeometryType.");
92 class LagrangePointSetBuilder<K,0>
94 static constexpr
int dim = 0;
95 using LP = LagrangePoint<K,dim>;
96 using Vec =
typename LP::Vector;
100 template <
class Po
ints>
101 void operator()(GeometryType gt,
int , Points& points)
const;
107 class LagrangePointSetBuilder<K,1>
109 static constexpr
int dim = 1;
110 using LP = LagrangePoint<K,dim>;
111 using Vec =
typename LP::Vector;
112 using Key = LocalKey;
115 template <
class Po
ints>
116 void operator()(GeometryType gt,
int order, Points& points)
const;
122 class LagrangePointSetBuilder<K,2>
124 static constexpr
int dim = 2;
125 using LP = LagrangePoint<K,dim>;
126 using Vec =
typename LP::Vector;
127 using Key = LocalKey;
129 friend class LagrangePointSetBuilder<K,3>;
132 template <
class Po
ints>
133 void operator()(GeometryType gt,
int order, Points& points)
const;
139 template <
class Po
ints>
140 void buildTriangle (std::size_t nPoints,
int order, Points& points)
const;
145 static void barycentricIndex (
int index, std::array<int,3>& bindex,
int order);
150 template <
class Po
ints>
151 void buildQuad(std::size_t nPoints,
int order, Points& points)
const;
155 static std::pair<int,Key> calcQuadKey (
int i,
int j, std::array<int,2> order);
161 class LagrangePointSetBuilder<K,3>
163 static constexpr
int dim = 3;
164 using LP = LagrangePoint<K,dim>;
165 using Vec =
typename LP::Vector;
166 using Key = LocalKey;
169 template <
class Po
ints>
170 void operator() (GeometryType gt,
unsigned int order, Points& points)
const;
177 template <
class Po
ints>
178 void buildTetra (std::size_t nPoints,
int order, Points& points)
const;
183 static void barycentricIndex (std::size_t p, std::array<int,4>& bindex,
int order);
188 template <
class Po
ints>
189 void buildHex (std::size_t nPoints,
int order, Points& points)
const;
192 static std::pair<int,Key> calcHexKey (
int i,
int j,
int k, std::array<int,3> order);
Definition: datacollectorinterface.hh:9
A set of lagrange points compatible with the numbering of VTK and Gmsh.
Definition: lagrangepoints.hh:30
bool build()
Fill the lagrange points for the given topology type Topology
Definition: lagrangepoints.hh:51
static bool supports(std::size_t order)
Definition: lagrangepoints.hh:60
LagrangePointSet(std::size_t order)
Definition: lagrangepoints.hh:36
void build(GeometryType gt)
Fill the lagrange points for the given geometry type.
Definition: lagrangepoints.hh:43
static const unsigned int dimension
Definition: lagrangepoints.hh:34