Dune Core Modules (2.9.1)

mimeticall.hh
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 (C) 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_MIMETIC_ALL_HH
6#define DUNE_MIMETIC_ALL_HH
7
8#include <cstddef>
9
13
14#include <dune/geometry/type.hh>
15
16#include "../common/localbasis.hh"
17#include "../common/localkey.hh"
18
19namespace Dune
20{
21 template<class D, class R, int dim>
22 class MimeticLocalBasis
23 {
24 public:
27
28 MimeticLocalBasis (unsigned int variant_)
29 : variant(variant_)
30 {}
31
32 MimeticLocalBasis ()
33 : variant(0)
34 {}
35
36 unsigned int size () const { return variant; }
37
39 inline void evaluateFunction (
40 const typename Traits::DomainType& in,
41 std::vector<typename Traits::RangeType>& out) const
42 {
43 DUNE_THROW(Dune::Exception,"mimetic basis evaluation not available");
44 }
45
47 inline void evaluateJacobian (
48 const typename Traits::DomainType& in,
49 std::vector<typename Traits::JacobianType>& out) const
50 {
51 DUNE_THROW(Dune::Exception,"mimetic basis Jacobian evaluation not available");
52 }
53
55 void partial (const std::array<unsigned int, dim>& /*order*/,
56 const typename Traits::DomainType& /*in*/, // position
57 std::vector<typename Traits::RangeType>& /*out*/) const // return value
58 {
59 DUNE_THROW(Dune::Exception,"mimetic basis partial derivative evaluation not available");
60 }
61
63 unsigned int order () const
64 {
65 DUNE_THROW(Dune::Exception,"mimetic order evaluation not available");
66 }
67
68 private:
69 unsigned int variant;
70 };
71
72 template<class LB>
73 class MimeticLocalInterpolation
74 {
75 public:
76
78 template<typename F, typename C>
79 void interpolate (const F& f, std::vector<C>& out) const {
80 DUNE_THROW(Dune::Exception,"mimetic local interpolation not available");
81 }
82 };
83
88 {
89 public:
90 MimeticLocalCoefficients (unsigned int variant_)
91 : variant(variant_), li(variant_)
92 {
93 for (unsigned int i=0; i<variant; i++)
95 }
96
98 : variant(0), li(0)
99 {}
100
102 std::size_t size () const { return variant; }
103
105 const Dune::LocalKey& localKey (std::size_t i) const {
106 return li[i];
107 }
108
109 private:
110 unsigned int variant;
111 std::vector<Dune::LocalKey> li;
112 };
113}
114
115#endif
Base class for Dune-Exceptions.
Definition: exceptions.hh:96
A dense n x m matrix.
Definition: fmatrix.hh:117
vector space out of a tensor product of fields.
Definition: fvector.hh:95
Describe position of one degree of freedom.
Definition: localkey.hh:23
@ intersectionCodim
Codimension returned by LocalKey::codim() for degrees of freedom attached to an intersection.
Definition: localkey.hh:36
!
Definition: mimeticall.hh:88
const Dune::LocalKey & localKey(std::size_t i) const
map index i to local key
Definition: mimeticall.hh:105
std::size_t size() const
number of coefficients
Definition: mimeticall.hh:102
A few common exception classes.
Implements a matrix constructed from a given type representing a field and compile-time given number ...
Implements a vector constructed from a given type representing a field and a compile-time given size.
#define DUNE_THROW(E, m)
Definition: exceptions.hh:218
Dune namespace.
Definition: alignedallocator.hh:13
Type traits for LocalBasisVirtualInterface.
Definition: localbasis.hh:34
D DomainType
domain type
Definition: localbasis.hh:42
A unique label for each type of element that can occur in a grid.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)