![]() |
Dune-Functions 2.11
|
Loading...
Searching...
No Matches
lagrangebasis.hh
Go to the documentation of this file.
111 quadrilateralOffset_ = triangleOffset_ + dofsPerSimplex(2) * ((size_type)gridView_.size(Dune::GeometryTypes::triangle));
115 tetrahedronOffset_ = quadrilateralOffset_ + dofsPerCube(2) * ((size_type)gridView_.size(Dune::GeometryTypes::quadrilateral));
117 prismOffset_ = tetrahedronOffset_ + dofsPerSimplex(3) * ((size_type)gridView_.size(Dune::GeometryTypes::tetrahedron));
119 hexahedronOffset_ = prismOffset_ + dofsPerPrism() * ((size_type)gridView_.size(Dune::GeometryTypes::prism));
121 pyramidOffset_ = hexahedronOffset_ + dofsPerCube(3) * ((size_type)gridView_.size(Dune::GeometryTypes::hexahedron));
221 auto v0 = (size_type)gridIndexSet.subIndex(element,refElement.subEntity(localKey.subEntity(),localKey.codim(),0,dim),dim);
222 auto v1 = (size_type)gridIndexSet.subIndex(element,refElement.subEntity(localKey.subEntity(),localKey.codim(),1,dim),dim);
226 + dofsPerCube(1)*((size_type)gridIndexSet.subIndex(element,localKey.subEntity(),localKey.codim()))
229 + dofsPerCube(1)*((size_type)gridIndexSet.subIndex(element,localKey.subEntity(),localKey.codim()))
241 *it = {{ triangleOffset_ + dofsPerSimplex(2)*((size_type)gridIndexSet.subIndex(element,0,0)) + localKey.index() }};
246 *it = {{ quadrilateralOffset_ + dofsPerCube(2)*((size_type)gridIndexSet.subIndex(element,0,0)) + localKey.index() }};
260 DUNE_THROW(Dune::NotImplemented, "LagrangeBasis for 3D grids with k==3 is only implemented if the grid is a simplex grid");
262 *it = {{ triangleOffset_ + ((size_type)gridIndexSet.subIndex(element,localKey.subEntity(),localKey.codim())) }};
273 *it = {{ tetrahedronOffset_ + dofsPerSimplex(3)*((size_type)gridIndexSet.subIndex(element,0,0)) + localKey.index() }};
278 *it = {{ hexahedronOffset_ + dofsPerCube(3)*((size_type)gridIndexSet.subIndex(element,0,0)) + localKey.index() }};
283 *it = {{ prismOffset_ + dofsPerPrism()*((size_type)gridIndexSet.subIndex(element,0,0)) + localKey.index() }};
288 *it = {{ pyramidOffset_ + dofsPerPyramid()*((size_type)gridIndexSet.subIndex(element,0,0)) + localKey.index() }};
292 DUNE_THROW(Dune::NotImplemented, "3d elements have to be tetrahedra, hexahedra, prisms, or pyramids");
338 return order() == 0 ? (dim == simplexDim ? 1 : 0) : Dune::binomial(std::size_t(order()-1),simplexDim);
387 return GeometryType(Dune::Capabilities::hasSingleGeometryType<typename GV::Grid>::topologyId, GV::dimension);
auto lagrange()
Create a pre-basis factory that can create a Lagrange pre-basis.
Definition lagrangebasis.hh:477
STL namespace.
iterator end()
size_type dim() const
#define DUNE_THROW(E,...)
static constexpr T binomial(const T &n, const T &k) noexcept
constexpr Base power(Base m, Exponent p)
IdType Id
constexpr unsigned int index() const noexcept
constexpr unsigned int codim() const noexcept
constexpr unsigned int subEntity() const noexcept
Global basis for given pre-basis.
Definition defaultglobalbasis.hh:53
Definition lagrangebasis.hh:379
LagrangeNode(unsigned int order)
Constructor with a run-time order.
Definition lagrangebasis.hh:419
const FiniteElement & finiteElement() const
Return the LocalFiniteElement for the element we are bound to.
Definition lagrangebasis.hh:436
const Element & element() const
Return current element, throw if unbound.
Definition lagrangebasis.hh:427
typename FiniteElementCache::FiniteElementType FiniteElement
Definition lagrangebasis.hh:411
void bind(const Element &e)
Bind to element.
Definition lagrangebasis.hh:442
typename GV::template Codim< 0 >::Entity Element
Definition lagrangebasis.hh:410
const FiniteElement * finiteElement_
Definition lagrangebasis.hh:460
LagrangeNode()
Constructor without order (uses the compile-time value)
Definition lagrangebasis.hh:414
A pre-basis for a PQ-lagrange bases with given order.
Definition lagrangebasis.hh:65
size_type dofsPerPrism() const
Definition lagrangebasis.hh:325
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:342
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:336
size_type computeDofsPerPrism() const
Definition lagrangebasis.hh:347
std::array< size_type, dim+1 > dofsPerSimplex_
Definition lagrangebasis.hh:358
It indices(const Node &node, It it) const
Definition lagrangebasis.hh:184
size_type vertexOffset_
Definition lagrangebasis.hh:363
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:314
std::size_t size_type
Type used for indices and size information.
Definition lagrangebasis.hh:75
size_type pyramidOffset_
Definition lagrangebasis.hh:368
size_type prismOffset_
Definition lagrangebasis.hh:369
size_type tetrahedronOffset_
Definition lagrangebasis.hh:367
void initializeIndices()
Initialize the global indices.
Definition lagrangebasis.hh:102
size_type computeDofsPerPyramid() const
Definition lagrangebasis.hh:352
LagrangePreBasis(const GridView &gv, unsigned int order)
Constructor for a given grid view object and run-time order.
Definition lagrangebasis.hh:86
size_type dofsPerPyramid_
Definition lagrangebasis.hh:361
size_type dimension() const
Get the total dimension of the space spanned by this basis.
Definition lagrangebasis.hh:146
LagrangePreBasis(const GridView &gv)
Constructor for a given grid view object with compile-time order.
Definition lagrangebasis.hh:81
void update(const GridView &gv)
Update the stored grid view, to be called if the grid has changed.
Definition lagrangebasis.hh:132
GV GridView
The grid view that the FE basis is defined on.
Definition lagrangebasis.hh:72
size_type quadrilateralOffset_
Definition lagrangebasis.hh:366
const GridView & gridView() const
Obtain the grid view that the basis is defined on.
Definition lagrangebasis.hh:126
Node makeNode() const
Create tree node.
Definition lagrangebasis.hh:140
unsigned int order() const
Polynomial order used in the local Lagrange finite-elements.
Definition lagrangebasis.hh:302
std::array< size_type, dim+1 > dofsPerCube_
Definition lagrangebasis.hh:359
size_type maxNodeSize() const
Get the maximal number of DOFs associated to node for any element.
Definition lagrangebasis.hh:176
size_type dofsPerPrism_
Definition lagrangebasis.hh:360
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:320
size_type triangleOffset_
Definition lagrangebasis.hh:365
size_type hexahedronOffset_
Definition lagrangebasis.hh:370
size_type dofsPerPyramid() const
Definition lagrangebasis.hh:330
A generic MixIn class for PreBasis.
Definition leafprebasismixin.hh:36
Definition nodes.hh:218
T max(T... args)
