DUNE
Dune-Fufem
2.11
Loading...
Searching...
No Matches
asnumber.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_FUFEM_UTILITIES_ASNUMBER_HH
6
#define DUNE_FUFEM_UTILITIES_ASNUMBER_HH
7
8
#include <
dune/common/typetraits.hh
>
9
#include <
dune/common/fmatrix.hh
>
10
#include <
dune/common/fvector.hh
>
11
12
13
namespace
Dune::Fufem
{
14
21
template
<
class
T>
22
requires
(
Dune::IsNumber<T>::value
)
23
const
T&
asNumber
(
const
T& t)
24
{
25
return
t;
26
}
27
34
template
<
class
T>
35
const
T&
asNumber
(
const
Dune::FieldVector<T, 1>
& t)
36
{
37
return
t[0];
38
}
39
46
template
<
class
T>
47
const
T&
asNumber
(
const
Dune::FieldMatrix<T, 1, 1>
& t)
48
{
49
return
t[0][0];
50
}
51
52
}
// end namespace Dune::Fufem
53
54
#endif
// DUNE_FUFEM_UTILITIES_ASNUMBER_HH
fmatrix.hh
typetraits.hh
fvector.hh
Dune::IsNumber
Dune::FieldMatrix
Dune::FieldVector
Dune::Fufem
Definition
dunefunctionsboundaryfunctionalassembler.hh:29
Dune::Fufem::asNumber
const T & asNumber(const T &t)
Forward given value as number.
Definition
asnumber.hh:23
dune-fufem
dune
fufem
utilities
asnumber.hh
Legal Statements / Impressum
| Hosted by
TU Dresden
&
Uni Heidelberg
| Generated by
1.9.8