Dune Core Modules (2.6.0)

rannachertureklocalcoefficients.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_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
4#define DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
5
6#include <algorithm>
7#include <array>
8#include <cassert>
9#include <cstddef>
10
11#include <dune/localfunctions/common/localkey.hh>
12
13namespace Dune
14{
22 template< unsigned int d >
24 {
26 {
27 for( std::size_t i = 0; i < 2*d; ++i )
28 localKeys_[ i ] = LocalKey( i, 1, 0 );
29 }
30
32 {
33 (*this) = other;
34 }
35
37 {
38 std::copy( other.localKeys_.begin(), other.localKeys_.end(), localKeys_.begin() );
39 return *this;
40 }
41
43 std::size_t size () const
44 {
45 return 2*d;
46 }
47
49 const LocalKey &localKey ( std::size_t i ) const
50 {
51 assert( 0 <= i && i < 2*d );
52 return localKeys_[ i ];
53 }
54
55 private:
56 std::array< LocalKey, 2*d > localKeys_;
57 };
58
59} // namespace Dune
60
61#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
Describe position of one degree of freedom.
Definition: localkey.hh:21
Dune namespace.
Definition: alignedallocator.hh:10
layout for Rannacher-Turek elements
Definition: rannachertureklocalcoefficients.hh:24
const LocalKey & localKey(std::size_t i) const
map index i to local key
Definition: rannachertureklocalcoefficients.hh:49
std::size_t size() const
number of coefficients
Definition: rannachertureklocalcoefficients.hh:43
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 24, 23:30, 2024)