Debian Codegraph @

dune/localfunctions/common/localbasis.hh

raw
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_COMMON_LOCALBASIS_HH
6 #define DUNE_LOCALFUNCTIONS_COMMON_LOCALBASIS_HH
7
8 namespace Dune
9 {
10
11 /**
12 * \ingroup LocalInterface
13 \brief Type traits for LocalBasisVirtualInterface
14
15 A shape function is a function
16 \f[ \hat\phi : \mbox{IR}^n \to \mbox{IR}^m. \f]
17 This traits class holds information how the signature of this
18 function is represented in C++ types.
19
20 This is just a convenience class for supplying traits to the
21 LocalBasisVirtualInterface and its implementations.
22
23 \tparam DF Type to represent the field in the domain.
24 \tparam n Dimension of the domain.
25 \tparam D Type to represent the domain, allows random access.
26 \tparam RF Type to represent the field in the range.
27 \tparam m Dimension of the range.
28 \tparam R Type to represent the range, allows random access.
29 \tparam J Type to represent the Jacobian, allows random access.
30
31 \nosubgrouping
32 */
33 template<class DF, int n, class D, class RF, int m, class R, class J>
34 struct LocalBasisTraits
35 {
36 //! \brief Export type for domain field
37 typedef DF DomainFieldType;
38
39 //! \brief dimension of the domain
40 constexpr static int dimDomain = n;
41
42 //! \brief domain type
43 typedef D DomainType;
44
45 //! \brief Export type for range field
46 typedef RF RangeFieldType;
47
48 //! \brief dimension of the range
49 constexpr static int dimRange = m;
50
51 //! \brief range type
52 typedef R RangeType;
53
54 /** \brief Type to represent derivative
55
56 When \f$ \hat\phi : \mbox{IR}^n \to \mbox{IR}^m \f$ then JacobianType
57 is an 2D-array of m x n components where entry J[i][j] contains
58 the derivative \f$\partial_j \hat\phi_i \f$.
59 */
60 typedef J JacobianType;
61 };
62
63 }
64 #endif