dune-localfunctions  2.11
enriched/simplexp1bubble/localcoefficients.hh
Go to the documentation of this file.
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 
11 
12 namespace 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
static constexpr std::size_t size() noexcept
Returns number of coefficients.
Definition: enriched/simplexp1bubble/localcoefficients.hh:37
The Local keys associated to the dim-d local basis functions.
Definition: enriched/simplexp1bubble/localcoefficients.hh:23
Describe position of one degree of freedom.
Definition: localkey.hh:23
Definition: bdfmcube.hh:17
const LocalKey & localKey(std::size_t i) const noexcept
Returns the i&#39;th local key.
Definition: enriched/simplexp1bubble/localcoefficients.hh:43
SimplexP1BubbleLocalCoefficients() noexcept
Default constructor, initialized the local keys.
Definition: enriched/simplexp1bubble/localcoefficients.hh:29