Dune Core Modules (2.9.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// SPDX-FileCopyrightInfo: Copyright (C) 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
13#include <dune/localfunctions/common/localkey.hh>
14
15namespace Dune
16{
24 template< unsigned int d >
26 {
28 {
29 for( std::size_t i = 0; i < 2*d; ++i )
30 localKeys_[ i ] = LocalKey( i, 1, 0 );
31 }
32
34 {
35 (*this) = other;
36 }
37
39 {
40 std::copy( other.localKeys_.begin(), other.localKeys_.end(), localKeys_.begin() );
41 return *this;
42 }
43
45 std::size_t size () const
46 {
47 return 2*d;
48 }
49
51 const LocalKey &localKey ( std::size_t i ) const
52 {
53 assert( i < 2*d );
54 return localKeys_[ i ];
55 }
56
57 private:
58 std::array< LocalKey, 2*d > localKeys_;
59 };
60
61} // namespace Dune
62
63#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
Describe position of one degree of freedom.
Definition: localkey.hh:23
Dune namespace.
Definition: alignedallocator.hh:13
layout for Rannacher-Turek elements
Definition: rannachertureklocalcoefficients.hh:26
const LocalKey & localKey(std::size_t i) const
map index i to local key
Definition: rannachertureklocalcoefficients.hh:51
std::size_t size() const
number of coefficients
Definition: rannachertureklocalcoefficients.hh:45
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)