Dune Core Modules (2.8.0)

refinedp0localcoefficients.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_REFINED_P0_LOCALCOEFFICIENTS_HH
4#define DUNE_REFINED_P0_LOCALCOEFFICIENTS_HH
5
6#include <cstddef>
7#include <iostream>
8#include <vector>
9
10#include <dune/localfunctions/common/localkey.hh>
11
12namespace Dune
13{
14
21 template<unsigned int k>
23 {
24 // 2 to the k-th power
25 enum {N = 1<<k};
26
27 public:
29 localKeys_(N)
30 {
31 // All functions are associated to the element
32 for (int i = 0; i < N; ++i)
33 localKeys_[i] = LocalKey(0,0,i);
34 }
35
37 std::size_t size () const
38 {
39 return N;
40 }
41
43 const LocalKey& localKey (std::size_t i) const
44 {
45 return localKeys_[i];
46 }
47
48 private:
49 std::vector<LocalKey> localKeys_;
50
51 };
52
53}
54
55#endif
Describe position of one degree of freedom.
Definition: localkey.hh:21
Layout map for RefinedP0 elements.
Definition: refinedp0localcoefficients.hh:23
std::size_t size() const
number of coefficients
Definition: refinedp0localcoefficients.hh:37
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition: refinedp0localcoefficients.hh:43
Dune namespace.
Definition: alignedallocator.hh:11
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)