9#include <dune/localfunctions/lagrange/equidistantpoints.hh>
18 template <
class K,
unsigned int dim>
19 class LagrangePointSetBuilder;
28 template <
class K,
unsigned int dim>
30 :
public EmptyPointSet<K, dim>
32 using Super = EmptyPointSet<K, dim>;
35 static const unsigned int dimension = dim;
46 assert(
gt.dim() == dimension);
47 builder_(
gt, order(), points_);
51#if DUNE_VERSION_LT(DUNE_LOCALFUNCTIONS,2,8)
52 template <
class Topology>
59 template <GeometryType::Id geometryId>
69#if DUNE_VERSION_LT(DUNE_LOCALFUNCTIONS,2,8)
70 template <
class Topology>
72 template <GeometryType::Id geometryId>
83 Impl::LagrangePointSetBuilder<K,dim> builder_;
91 template <
class K,
unsigned int dim>
92 class LagrangePointSetBuilder
95 template <
class Po
ints>
96 void operator()(
GeometryType,
unsigned int, Points& points)
const
99 "Lagrange points not yet implemented for this GeometryType.");
106 class LagrangePointSetBuilder<K,0>
108 static constexpr int dim = 0;
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 , Points& points)
const;
121 class LagrangePointSetBuilder<K,1>
123 static constexpr int dim = 1;
124 using LP = LagrangePoint<K,dim>;
125 using Vec =
typename LP::Vector;
126 using Key = LocalKey;
129 template <
class Po
ints>
130 void operator()(GeometryType
gt,
int order, Points& points)
const;
136 class LagrangePointSetBuilder<K,2>
138 static constexpr int dim = 2;
139 using LP = LagrangePoint<K,dim>;
140 using Vec =
typename LP::Vector;
141 using Key = LocalKey;
143 friend class LagrangePointSetBuilder<K,3>;
146 template <
class Po
ints>
147 void operator()(GeometryType
gt,
int order, Points& points)
const;
153 template <
class Po
ints>
154 void buildTriangle (std::size_t nPoints,
int order, Points& points)
const;
159 static void barycentricIndex (
int index, std::array<int,3>& bindex,
int order);
164 template <
class Po
ints>
165 void buildQuad(std::size_t nPoints,
int order, Points& points)
const;
169 static std::pair<int,Key> calcQuadKey (
int i,
int j, std::array<int,2> order);
175 class LagrangePointSetBuilder<K,3>
177 static constexpr int dim = 3;
178 using LP = LagrangePoint<K,dim>;
179 using Vec =
typename LP::Vector;
180 using Key = LocalKey;
183 template <
class Po
ints>
184 void operator() (GeometryType
gt,
unsigned int order, Points& points)
const;
191 template <
class Po
ints>
192 void buildTetra (std::size_t nPoints,
int order, Points& points)
const;
197 static void barycentricIndex (std::size_t p, std::array<int,4>& bindex,
int order);
202 template <
class Po
ints>
203 void buildHex (std::size_t nPoints,
int order, Points& points)
const;
206 static std::pair<int,Key> calcHexKey (
int i,
int j,
int k, std::array<int,3> order);
213#include <dune/gmsh4/utility/lagrangepoints.impl.hh>
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:114
A set of Lagrange points compatible with the numbering of VTK and Gmsh.
Definition: lagrangepoints.hh:31
bool build()
Fill the Lagrange points for the given topology type Topology
Definition: lagrangepoints.hh:60
static bool supports(std::size_t order)
Definition: lagrangepoints.hh:74
void build(GeometryType gt)
Fill the Lagrange points for the given geometry type.
Definition: lagrangepoints.hh:44
Default exception for dummy implementations.
Definition: exceptions.hh:357
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
Dune namespace
Definition: alignedallocator.hh:13
A unique label for each type of element that can occur in a grid.