dune-localfunctions
2.3beta2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dune
localfunctions
rannacherturek
rannachertureklocalcoefficients.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_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
4
#define DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
5
6
#include <algorithm>
7
#include <cassert>
8
#include <cstddef>
9
10
#include <dune/common/array.hh>
11
12
#include <
dune/localfunctions/common/localkey.hh
>
13
14
namespace
Dune
15
{
23
template
<
unsigned
int
d >
24
struct
RannacherTurekLocalCoefficients
25
{
26
RannacherTurekLocalCoefficients
()
27
{
28
for
( std::size_t i = 0; i < 2*d; ++i )
29
localKeys_[ i ] =
LocalKey
( i, 1, 0 );
30
}
31
32
RannacherTurekLocalCoefficients
(
const
RannacherTurekLocalCoefficients
&other )
33
{
34
(*this) = other;
35
}
36
37
RannacherTurekLocalCoefficients
&
operator=
(
const
RannacherTurekLocalCoefficients
&other )
38
{
39
std::copy( other.localKeys_.begin(), other.localKeys_.end(), localKeys_.begin() );
40
return
*
this
;
41
}
42
44
std::size_t
size
()
const
45
{
46
return
2*d;
47
}
48
50
const
LocalKey
&
localKey
( std::size_t i )
const
51
{
52
assert( 0 <= i && i < 2*d );
53
return
localKeys_[ i ];
54
}
55
56
private
:
57
array< LocalKey, 2*d > localKeys_;
58
};
59
60
}
// namespace Dune
61
62
#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
Generated on Mon Feb 10 2014 21:19:25 for dune-localfunctions by
1.8.1.2