dune-localfunctions
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
localfunctions
enriched
cubeq1bubble
enriched/cubeq1bubble/localcoefficients.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_LOCALFUNCTIONS_ENRICHED_CUBEQ1BUBBLE_LOCALCOEFFICIENTS_HH
6
#define DUNE_LOCALFUNCTIONS_ENRICHED_CUBEQ1BUBBLE_LOCALCOEFFICIENTS_HH
7
8
#include <array>
9
10
#include <
dune/localfunctions/common/localkey.hh
>
11
12
namespace
Dune
13
{
22
template
<
int
dim>
23
class
CubeQ1BubbleLocalCoefficients
24
{
25
static
const
int
numVertices = power(2, dim);
26
27
public
:
29
CubeQ1BubbleLocalCoefficients
() noexcept
30
{
31
for
(
int
i = 0; i < numVertices; ++i)
32
li_[i] =
LocalKey
(i,dim,0);
// Vertex
33
li_[numVertices] =
LocalKey
(0,0,0);
// Element
34
}
35
37
static
constexpr
std::size_t
size
() noexcept
38
{
39
return
numVertices + 1;
40
}
41
43
const
LocalKey
&
localKey
(std::size_t i)
const
noexcept
44
{
45
return
li_[i];
46
}
47
48
private
:
49
std::array<LocalKey, numVertices+1> li_;
50
};
51
52
}
// end namespace Dune
53
54
#endif
// DUNE_LOCALFUNCTIONS_ENRICHED_CUBEQ1BUBBLE_LOCALCOEFFICIENTS_HH
localkey.hh
Dune
Definition
bdfmcube.hh:18
Dune::LocalKey
Describe position of one degree of freedom.
Definition
localkey.hh:24
Dune::CubeQ1BubbleLocalCoefficients::localKey
const LocalKey & localKey(std::size_t i) const noexcept
Returns the i'th local key.
Definition
enriched/cubeq1bubble/localcoefficients.hh:43
Dune::CubeQ1BubbleLocalCoefficients::size
static constexpr std::size_t size() noexcept
Returns number of coefficients.
Definition
enriched/cubeq1bubble/localcoefficients.hh:37
Dune::CubeQ1BubbleLocalCoefficients::CubeQ1BubbleLocalCoefficients
CubeQ1BubbleLocalCoefficients() noexcept
Default constructor, initialized the local keys.
Definition
enriched/cubeq1bubble/localcoefficients.hh:29
Generated by
1.17.0