dune-localfunctions 2.9.1
Loading...
Searching...
No Matches
refinedp0localcoefficients.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 (C) 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_REFINED_P0_LOCALCOEFFICIENTS_HH
6#define DUNE_REFINED_P0_LOCALCOEFFICIENTS_HH
7
8#include <cstddef>
9#include <iostream>
10#include <vector>
11
13
14namespace Dune
15{
16
23 template<unsigned int k>
25 {
26 // 2 to the k-th power
27 constexpr static int N = 1<<k;
28
29 public:
31 localKeys_(N)
32 {
33 // All functions are associated to the element
34 for (int i = 0; i < N; ++i)
35 localKeys_[i] = LocalKey(0,0,i);
36 }
37
39 std::size_t size () const
40 {
41 return N;
42 }
43
45 const LocalKey& localKey (std::size_t i) const
46 {
47 return localKeys_[i];
48 }
49
50 private:
51 std::vector<LocalKey> localKeys_;
52
53 };
54
55}
56
57#endif
Definition bdfmcube.hh:18
Describe position of one degree of freedom.
Definition localkey.hh:23
Layout map for RefinedP0 elements.
Definition refinedp0localcoefficients.hh:25
RefinedP0LocalCoefficients()
Definition refinedp0localcoefficients.hh:30
std::size_t size() const
number of coefficients
Definition refinedp0localcoefficients.hh:39
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition refinedp0localcoefficients.hh:45