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
11
12
13namespace Dune::Fufem {
14
21 template<class T>
23 const T& asNumber(const T& t)
24 {
25 return t;
26 }
27
34 template<class T>
36 {
37 return t[0];
38 }
39
46 template<class T>
48 {
49 return t[0][0];
50 }
51
52} // end namespace Dune::Fufem
53
54#endif // DUNE_FUFEM_UTILITIES_ASNUMBER_HH
Definition dunefunctionsboundaryfunctionalassembler.hh:29
const T & asNumber(const T &t)
Forward given value as number.
Definition asnumber.hh:23