DUNE PDELab (git)

localcoefficients.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5#ifndef DUNE_LOCALFUNCTIONS_ENRICHED_SIMPLEXP1BUBBLE_LOCALCOEFFICIENTS_HH
6#define DUNE_LOCALFUNCTIONS_ENRICHED_SIMPLEXP1BUBBLE_LOCALCOEFFICIENTS_HH
7
8#include <array>
9
10#include <dune/localfunctions/common/localkey.hh>
11
12namespace Dune
13{
22 template <int dim>
24 {
25 static const int numVertices = dim+1;
26
27 public:
30 {
31 for (int i = 0; i <= dim; ++i)
32 li_[i] = LocalKey(i,dim,0); // Vertex
33 li_[numVertices] = LocalKey(0,0,0); // Element
34 }
35
37 static constexpr std::size_t size () noexcept
38 {
39 return numVertices + 1;
40 }
41
43 const LocalKey& localKey (std::size_t i) const noexcept
44 {
45 return li_[i];
46 }
47
48 private:
49 std::array<LocalKey, numVertices+1> li_;
50 };
51
52} // end namespace Dune
53
54#endif // DUNE_LOCALFUNCTIONS_ENRICHED_SIMPLEXP1BUBBLE_LOCALCOEFFICIENTS_HH
Describe position of one degree of freedom.
Definition: localkey.hh:24
The Local keys associated to the dim-d local basis functions.
Definition: localcoefficients.hh:24
const LocalKey & localKey(std::size_t i) const noexcept
Returns the i'th local key.
Definition: localcoefficients.hh:43
SimplexP1BubbleLocalCoefficients() noexcept
Default constructor, initialized the local keys.
Definition: localcoefficients.hh:29
static constexpr std::size_t size() noexcept
Returns number of coefficients.
Definition: localcoefficients.hh:37
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 24, 23:30, 2024)