dune-localfunctions  2.11
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 // SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4 // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5 #ifndef DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
6 #define DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
7 
8 #include <algorithm>
9 #include <array>
10 #include <cassert>
11 #include <cstddef>
12 
14 
15 namespace Dune
16 {
25  template< unsigned int d >
27  {
29  {
30  for( std::size_t i = 0; i < 2*d; ++i )
31  localKeys_[ i ] = LocalKey( i, 1, 0 );
32  }
33 
35  {
36  (*this) = other;
37  }
38 
40  {
41  std::copy( other.localKeys_.begin(), other.localKeys_.end(), localKeys_.begin() );
42  return *this;
43  }
44 
46  std::size_t size () const
47  {
48  return 2*d;
49  }
50 
52  const LocalKey &localKey ( std::size_t i ) const
53  {
54  assert( i < 2*d );
55  return localKeys_[ i ];
56  }
57 
58  private:
59  std::array< LocalKey, 2*d > localKeys_;
60  };
61 
62 } // namespace Dune
63 
64 #endif // #ifndef DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
RannacherTurekLocalCoefficients(const RannacherTurekLocalCoefficients &other)
Definition: rannachertureklocalcoefficients.hh:34
Describe position of one degree of freedom.
Definition: localkey.hh:23
Definition: bdfmcube.hh:17
layout for Rannacher-Turek elements
Definition: rannachertureklocalcoefficients.hh:26
std::size_t size() const
number of coefficients
Definition: rannachertureklocalcoefficients.hh:46
RannacherTurekLocalCoefficients()
Definition: rannachertureklocalcoefficients.hh:28
const LocalKey & localKey(std::size_t i) const
map index i to local key
Definition: rannachertureklocalcoefficients.hh:52
RannacherTurekLocalCoefficients & operator=(const RannacherTurekLocalCoefficients &other)
Definition: rannachertureklocalcoefficients.hh:39