9#include <dune/localfunctions/lagrange/equidistantpoints.hh>
16 template <
class K,
unsigned int dim>
17 class LagrangePointSetBuilder;
26 template <
class K,
unsigned int dim>
28 :
public EmptyPointSet<K, dim>
30 using Super = EmptyPointSet<K, dim>;
33 static const unsigned int dimension = dim;
44 assert(
gt.dim() == dimension);
45 builder_(
gt, order(), points_);
49 template <GeometryType::Id geometryId>
58 template <GeometryType::Id geometryId>
68 Impl::LagrangePointSetBuilder<K,dim> builder_;
76 template <
class K,
unsigned int dim>
77 class LagrangePointSetBuilder
80 template <
class Po
ints>
81 void operator()(
GeometryType,
unsigned int, Points& points)
const
84 "Lagrange points not yet implemented for this GeometryType.");
91 class LagrangePointSetBuilder<K,0>
93 static constexpr int dim = 0;
94 using LP = LagrangePoint<K,dim>;
95 using Vec =
typename LP::Vector;
99 template <
class Po
ints>
100 void operator()(GeometryType
gt,
int , Points& points)
const;
106 class LagrangePointSetBuilder<K,1>
108 static constexpr int dim = 1;
109 using LP = LagrangePoint<K,dim>;
110 using Vec =
typename LP::Vector;
111 using Key = LocalKey;
114 template <
class Po
ints>
115 void operator()(GeometryType
gt,
int order, Points& points)
const;
121 class LagrangePointSetBuilder<K,2>
123 static constexpr int dim = 2;
124 using LP = LagrangePoint<K,dim>;
125 using Vec =
typename LP::Vector;
126 using Key = LocalKey;
128 friend class LagrangePointSetBuilder<K,3>;
131 template <
class Po
ints>
132 void operator()(GeometryType
gt,
int order, Points& points)
const;
139 template <
class Po
ints>
140 void buildTriangle (
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(
int orderx,
int ordery, 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;
178 template <
class Po
ints>
179 void buildTetra (
int order, Points& points)
const;
184 static void barycentricIndex (
int p, std::array<int,4>& bindex,
int order);
189 template <
class Po
ints>
190 void buildHex (
int order, Points& points)
const;
193 static std::pair<int,Key> calcHexKey (
int i,
int j,
int k, std::array<int,3> order);
198 template <
class Po
ints>
199 void buildWedge (
int order_tri,
int order_quad, Points& points)
const;
202 template <
class K,
unsigned int dim>
203 class LexicographicPointSetBuilder
207 template <
class Po
ints>
208 static void buildLine(
int a, Points& points);
212 template <
class Po
ints>
213 static void buildQuad(
int a,
int b, Points& points);
218 template <
class Po
ints>
219 static void buildHex(
int a,
int b,
int c, Points& points);
225#include <dune/vtk/utility/lagrangepoints.impl.hh>
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:114
Default exception for dummy implementations.
Definition: exceptions.hh:357
A set of lagrange points compatible with the numbering of VTK and Gmsh.
Definition: lagrangepoints.hh:29
bool build()
Fill the lagrange points for the given topology type Topology
Definition: lagrangepoints.hh:50
void build(GeometryType gt)
Fill the lagrange points for the given geometry type.
Definition: lagrangepoints.hh:42
static bool supports(std::size_t)
Definition: lagrangepoints.hh:59
A few common exception classes.
Various macros to work with Dune module version numbers.
#define DUNE_THROW(E,...)
Definition: exceptions.hh:314
bool gt(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first greater than second
Definition: float_cmp.cc:158
A unique label for each type of element that can occur in a grid.