dune-localfunctions 2.11
Loading...
Searching...
No Matches
discontinuous.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
6#ifndef DUNE_LOCALFUNCTIONS_META_DISCONTINUOUS_HH
7#define DUNE_LOCALFUNCTIONS_META_DISCONTINUOUS_HH
8
9#include <utility>
10
11#include <dune/common/referencehelper.hh>
12#include <dune/geometry/type.hh>
14
15namespace Dune {
16
19
24 template<class LFE>
26 {
27 using LFERaw = ResolveRef_t<LFE>;
28
29 using LB = typename LFERaw::Traits::LocalBasisType;
30 using LC = typename LFERaw::Traits::LocalCoefficientsType;
31 using LI = typename LFERaw::Traits::LocalInterpolationType;
32
33 public:
43
44 private:
45 LFE lfe_;
47
48 public:
50 template <class LFE_>
52 : lfe_(std::forward<LFE_>(lfe))
53 , lc_(resolveRef(lfe_).localCoefficients().size())
54 {}
55
57
61 const typename Traits::LocalBasisType& localBasis () const
62 {
63 return resolveRef(lfe_).localBasis();
64 }
65
67
72 {
73 return lc_;
74 }
75
77
82 {
83 return resolveRef(lfe_).localInterpolation();
84 }
85
87 unsigned int size () const
88 {
89 return resolveRef(lfe_).size();
90 }
91
93 const GeometryType type () const
94 {
95 return resolveRef(lfe_).type();
96 }
97 };
98
99 // deduction guide
100 template <class LFE>
103
104} // namespace Dune
105
106#endif // DUNE_LOCALFUNCTIONS_META_DISCONTINUOUS_HH
Definition bdfmcube.hh:18
const Q1FiniteElementFactory< Geometry, RF >::LFE Q1FiniteElementFactory< Geometry, RF >::lfe
Definition q1.hh:47
DiscontinuousLocalFiniteElement(LFE lfe) -> DiscontinuousLocalFiniteElement< LFE >
Meta-finite element turning a finite-element into "discontinuous" finite-element by associating all b...
Definition discontinuous.hh:26
DiscontinuousLocalFiniteElement(LFE_ &&lfe)
Construct a finite element.
Definition discontinuous.hh:51
const Traits::LocalInterpolationType & localInterpolation() const
Extract interpolation of this finite element.
Definition discontinuous.hh:81
const GeometryType type() const
Return the geometry type the finite element can be bound to.
Definition discontinuous.hh:93
const Traits::LocalBasisType & localBasis() const
Extract basis of this finite element.
Definition discontinuous.hh:61
const Traits::LocalCoefficientsType & localCoefficients() const
Extract coefficients of this finite element.
Definition discontinuous.hh:71
unsigned int size() const
Return the number of basis functions.
Definition discontinuous.hh:87
types of component objects
Definition discontinuous.hh:35
LB LocalBasisType
type of the Basis
Definition discontinuous.hh:37
LI LocalInterpolationType
type of the Interpolation
Definition discontinuous.hh:41
DGLocalCoefficients LocalCoefficientsType
type of the Coefficients
Definition discontinuous.hh:39
A class providing local coefficients for dg spaces.
Definition dglocalcoefficients.hh:23