Dune Core Modules (2.6.0)

dualq1localcoefficients.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_DUAL_Q1_LOCALCOEFFICIENTS_HH
4#define DUNE_DUAL_Q1_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 <int dim>
23 {
24 public:
27 {
28 for (std::size_t i=0; i<(1<<dim); i++)
29 li[i] = LocalKey(i,dim,0);
30 }
31
33 std::size_t size () const
34 {
35 return 1<<dim;
36 }
37
39 const LocalKey& localKey (std::size_t i) const
40 {
41 return li[i];
42 }
43
44 private:
45 std::vector<LocalKey> li;
46 };
47
48}
49
50#endif
Layout map for dual Q1 elements.
Definition: dualq1localcoefficients.hh:23
std::size_t size() const
number of coefficients
Definition: dualq1localcoefficients.hh:33
DualQ1LocalCoefficients()
Standard constructor.
Definition: dualq1localcoefficients.hh:26
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition: dualq1localcoefficients.hh:39
Describe position of one degree of freedom.
Definition: localkey.hh:21
Dune namespace.
Definition: alignedallocator.hh:10
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)