|
dune-functions 2.8.0
|
Loading...
Searching...
No Matches
lagrangebasis.hh
Go to the documentation of this file.
112 quadrilateralOffset_ = triangleOffset_ + dofsPerSimplex(2) * ((size_type)gridView_.size(Dune::GeometryTypes::triangle));
116 tetrahedronOffset_ = quadrilateralOffset_ + dofsPerCube(2) * ((size_type)gridView_.size(Dune::GeometryTypes::quadrilateral));
118 prismOffset_ = tetrahedronOffset_ + dofsPerSimplex(3) * ((size_type)gridView_.size(Dune::GeometryTypes::tetrahedron));
120 hexahedronOffset_ = prismOffset_ + dofsPerPrism() * ((size_type)gridView_.size(Dune::GeometryTypes::prism));
122 pyramidOffset_ = hexahedronOffset_ + dofsPerCube(3) * ((size_type)gridView_.size(Dune::GeometryTypes::hexahedron));
249 auto v0 = (size_type)gridIndexSet.subIndex(element,refElement.subEntity(localKey.subEntity(),localKey.codim(),0,dim),dim);
250 auto v1 = (size_type)gridIndexSet.subIndex(element,refElement.subEntity(localKey.subEntity(),localKey.codim(),1,dim),dim);
254 + dofsPerCube(1)*((size_type)gridIndexSet.subIndex(element,localKey.subEntity(),localKey.codim()))
257 + dofsPerCube(1)*((size_type)gridIndexSet.subIndex(element,localKey.subEntity(),localKey.codim()))
269 *it = {{ triangleOffset_ + dofsPerSimplex(2)*((size_type)gridIndexSet.subIndex(element,0,0)) + localKey.index() }};
274 *it = {{ quadrilateralOffset_ + dofsPerCube(2)*((size_type)gridIndexSet.subIndex(element,0,0)) + localKey.index() }};
285 DUNE_THROW(Dune::NotImplemented, "LagrangeNodalBasis for 3D grids is only implemented if k<=3");
288 DUNE_THROW(Dune::NotImplemented, "LagrangeNodalBasis for 3D grids with k==3 is only implemented if the grid is a simplex grid");
290 *it = {{ triangleOffset_ + ((size_type)gridIndexSet.subIndex(element,localKey.subEntity(),localKey.codim())) }};
301 *it = {{ tetrahedronOffset_ + dofsPerSimplex(3)*((size_type)gridIndexSet.subIndex(element,0,0)) + localKey.index() }};
306 *it = {{ hexahedronOffset_ + dofsPerCube(3)*((size_type)gridIndexSet.subIndex(element,0,0)) + localKey.index() }};
311 *it = {{ prismOffset_ + dofsPerPrism()*((size_type)gridIndexSet.subIndex(element,0,0)) + localKey.index() }};
316 *it = {{ pyramidOffset_ + dofsPerPyramid()*((size_type)gridIndexSet.subIndex(element,0,0)) + localKey.index() }};
320 DUNE_THROW(Dune::NotImplemented, "3d elements have to be tetrahedra, hexahedra, prisms, or pyramids");
324 DUNE_THROW(Dune::NotImplemented, "Grid contains elements not supported for the LagrangeNodalBasis");
365 return order() == 0 ? (dim == simplexDim ? 1 : 0) : Dune::binomial(std::size_t(order()-1),simplexDim);
588using LagrangeBasis = DefaultGlobalBasis<LagrangePreBasis<GV, k, FlatMultiIndex<std::size_t>, R> >;
auto lagrange()
Create a pre-basis factory that can create a Lagrange pre-basis.
Definition lagrangebasis.hh:542
STL namespace.
iterator end()
size_type dim() const
static constexpr size_type size()
#define DUNE_THROW(E, m)
static constexpr T binomial(const T &n, const T &k) noexcept
Reference get(const RAPropertyMapHelper< Reference, PropertyMap > &pmap, const Key &key)
constexpr Mantissa power(Mantissa m, Exponent p)
size_type size() const
unsigned int index() const
unsigned int codim() const
unsigned int subEntity() const
Global basis for given pre-basis.
Definition defaultglobalbasis.hh:47
Definition lagrangebasis.hh:406
LagrangeNode(unsigned int order)
Constructor with a run-time order.
Definition lagrangebasis.hh:447
const FiniteElement & finiteElement() const
Return the LocalFiniteElement for the element we are bound to.
Definition lagrangebasis.hh:467
const Element & element() const
Return current element, throw if unbound.
Definition lagrangebasis.hh:458
typename FiniteElementCache::FiniteElementType FiniteElement
Definition lagrangebasis.hh:438
void bind(const Element &e)
Bind to element.
Definition lagrangebasis.hh:473
typename GV::template Codim< 0 >::Entity Element
Definition lagrangebasis.hh:437
const FiniteElement * finiteElement_
Definition lagrangebasis.hh:491
LagrangeNode()
Constructor without order (uses the compile-time value)
Definition lagrangebasis.hh:441
A pre-basis for a PQ-lagrange bases with given order.
Definition lagrangebasis.hh:57
Node makeNode() const
Create tree node.
Definition lagrangebasis.hh:141
size_type dimension() const
Get the total dimension of the space spanned by this basis.
Definition lagrangebasis.hh:198
size_type vertexOffset_
Definition lagrangebasis.hh:390
size_type hexahedronOffset_
Definition lagrangebasis.hh:397
size_type dofsPerCube(std::size_t cubeDim) const
Number of degrees of freedom assigned to a cube (without the ones assigned to its faces!...
Definition lagrangebasis.hh:347
Impl::DefaultNodeIndexSet< LagrangePreBasis > IndexSet
Type of created tree node index set.
Definition lagrangebasis.hh:73
size_type quadrilateralOffset_
Definition lagrangebasis.hh:393
size_type size() const
Same as size(prefix) with empty prefix.
Definition lagrangebasis.hh:161
LagrangePreBasis(const GridView &gv, unsigned int order)
Constructor for a given grid view object and run-time order.
Definition lagrangebasis.hh:87
size_type triangleOffset_
Definition lagrangebasis.hh:392
It indices(const Node &node, It it) const
Definition lagrangebasis.hh:212
LagrangePreBasis(const GridView &gv)
Constructor for a given grid view object with compile-time order.
Definition lagrangebasis.hh:82
size_type dofsPerPrism_
Definition lagrangebasis.hh:387
GV GridView
The grid view that the FE basis is defined on.
Definition lagrangebasis.hh:64
std::size_t size_type
Type used for indices and size information.
Definition lagrangebasis.hh:67
size_type dofsPerPrism() const
Definition lagrangebasis.hh:352
IndexSet makeIndexSet() const
Create tree node index set.
Definition lagrangebasis.hh:155
void update(const GridView &gv)
Update the stored grid view, to be called if the grid has changed.
Definition lagrangebasis.hh:133
size_type pyramidOffset_
Definition lagrangebasis.hh:395
size_type dofsPerPyramid_
Definition lagrangebasis.hh:388
MI MultiIndex
Type used for global numbering of the basis vectors.
Definition lagrangebasis.hh:76
void initializeIndices()
Initialize the global indices.
Definition lagrangebasis.hh:103
size_type dofsPerSimplex(std::size_t simplexDim) const
Number of degrees of freedom assigned to a simplex (without the ones assigned to its faces!...
Definition lagrangebasis.hh:341
size_type computeDofsPerCube(std::size_t cubeDim) const
Number of degrees of freedom assigned to a cube (without the ones assigned to its faces!...
Definition lagrangebasis.hh:369
size_type tetrahedronOffset_
Definition lagrangebasis.hh:394
size_type computeDofsPerPyramid() const
Definition lagrangebasis.hh:379
const GridView & gridView() const
Obtain the grid view that the basis is defined on.
Definition lagrangebasis.hh:127
size_type dofsPerPyramid() const
Definition lagrangebasis.hh:357
size_type size(const SizePrefix prefix) const
Return number of possible values for next position in multi index.
Definition lagrangebasis.hh:191
size_type maxNodeSize() const
Get the maximal number of DOFs associated to node for any element.
Definition lagrangebasis.hh:204
size_type prismOffset_
Definition lagrangebasis.hh:396
size_type computeDofsPerPrism() const
Definition lagrangebasis.hh:374
size_type computeDofsPerSimplex(std::size_t simplexDim) const
Number of degrees of freedom assigned to a simplex (without the ones assigned to its faces!...
Definition lagrangebasis.hh:363
std::array< size_type, dim+1 > dofsPerSimplex_
Definition lagrangebasis.hh:385
std::array< size_type, dim+1 > dofsPerCube_
Definition lagrangebasis.hh:386
Definition nodes.hh:184
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8