dune-localfunctions
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
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
// 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
13
#include <
dune/localfunctions/common/localkey.hh
>
14
15
namespace
Dune
16
{
25
template
<
unsigned
int
d >
26
struct
RannacherTurekLocalCoefficients
27
{
28
RannacherTurekLocalCoefficients
()
29
{
30
for
( std::size_t i = 0; i < 2*d; ++i )
31
localKeys_[ i ] =
LocalKey
( i, 1, 0 );
32
}
33
34
RannacherTurekLocalCoefficients
(
const
RannacherTurekLocalCoefficients
&other )
35
{
36
(*this) = other;
37
}
38
39
RannacherTurekLocalCoefficients
&
operator=
(
const
RannacherTurekLocalCoefficients
&other )
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
localkey.hh
Dune
Definition
bdfmcube.hh:18
Dune::LocalKey
Describe position of one degree of freedom.
Definition
localkey.hh:24
Dune::RannacherTurekLocalCoefficients::RannacherTurekLocalCoefficients
RannacherTurekLocalCoefficients()
Definition
rannachertureklocalcoefficients.hh:28
Dune::RannacherTurekLocalCoefficients::RannacherTurekLocalCoefficients
RannacherTurekLocalCoefficients(const RannacherTurekLocalCoefficients &other)
Definition
rannachertureklocalcoefficients.hh:34
Dune::RannacherTurekLocalCoefficients::operator=
RannacherTurekLocalCoefficients & operator=(const RannacherTurekLocalCoefficients &other)
Definition
rannachertureklocalcoefficients.hh:39
Dune::RannacherTurekLocalCoefficients::localKey
const LocalKey & localKey(std::size_t i) const
map index i to local key
Definition
rannachertureklocalcoefficients.hh:52
Dune::RannacherTurekLocalCoefficients::size
std::size_t size() const
number of coefficients
Definition
rannachertureklocalcoefficients.hh:46
Generated by
1.17.0