Dune Core Modules (2.6.0)

q1localcoefficients.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_Q1_LOCALCOEFFICIENTS_HH
4#define DUNE_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:
26 Q1LocalCoefficients () : li(1<<dim)
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
Describe position of one degree of freedom.
Definition: localkey.hh:21
Layout map for Q1 elements.
Definition: q1localcoefficients.hh:23
Q1LocalCoefficients()
Standard constructor.
Definition: q1localcoefficients.hh:26
std::size_t size() const
number of coefficients
Definition: q1localcoefficients.hh:33
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition: q1localcoefficients.hh:39
Dune namespace.
Definition: alignedallocator.hh:10
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 27, 23:30, 2024)