dune-localfunctions
2.6-git
dune
localfunctions
lagrange
p1
p1localcoefficients.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
#ifndef DUNE_P1_LOCALCOEFFICIENTS_HH
4
#define DUNE_P1_LOCALCOEFFICIENTS_HH
5
6
#include <cstddef>
7
#include <iostream>
8
#include <vector>
9
10
#include <
dune/localfunctions/common/localkey.hh
>
11
12
namespace
Dune
13
{
14
20
template
<
int
dim>
21
class
P1LocalCoefficients
22
{
23
public
:
25
P1LocalCoefficients
() : li(
size
())
26
{
27
for
(std::size_t i=0; i<
size
(); i++)
28
li[i] =
LocalKey
(i,dim,0);
29
}
30
32
std::size_t
size
()
const
33
{
34
return
dim+1;
35
}
36
38
const
LocalKey
&
localKey
(std::size_t i)
const
39
{
40
return
li[i];
41
}
42
43
private
:
44
std::vector<LocalKey> li;
45
};
46
47
}
48
49
#endif
Dune::P1LocalCoefficients::localKey
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition:
p1localcoefficients.hh:38
Dune::P1LocalCoefficients::size
std::size_t size() const
number of coefficients
Definition:
p1localcoefficients.hh:32
Dune::P1LocalCoefficients::P1LocalCoefficients
P1LocalCoefficients()
Standard constructor.
Definition:
p1localcoefficients.hh:25
localkey.hh
Dune::P1LocalCoefficients
Local coefficients for simplex P1 elements.
Definition:
p1localcoefficients.hh:21
Dune::LocalKey
Describe position of one degree of freedom.
Definition:
localkey.hh:20
Dune
Definition:
brezzidouglasmarini1cube2dlocalbasis.hh:15
Generated by
1.8.17