dune-localfunctions 2.10
Loading...
Searching...
No Matches
emptypoints.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_LAGRANGE_EMPTYPOINTS_HH
6#define DUNE_LAGRANGE_EMPTYPOINTS_HH
7
8#include <vector>
9
10#include <dune/common/fvector.hh>
12
13namespace Dune
14{
15
16 template< class F, unsigned int dim >
18 {
20
21 template< class, class >
23
24 public:
25 static const int dimension = dim;
26
27 typedef F Field;
28
29 typedef FieldVector< Field, dimension > Vector;
30
31 const Vector &point () const
32 {
33 return point_;
34 }
35
36 const LocalKey &localKey () const
37 {
38 return localKey_;
39 }
40
41 const Field weight () const
42 {
43 return weight_;
44 }
45
49 };
50
51 // EmptyPointSet
52 // --------------
53
54 template< class F, unsigned int dim >
56 {
58
59 public:
60 typedef F Field;
61
62 static const unsigned int dimension = dim;
63
65
66 typedef typename std::vector< LagrangePoint >::const_iterator iterator;
67
68 protected:
69 EmptyPointSet ( const std::size_t order )
70 : order_( order )
71 {}
72
73 public:
74 const LagrangePoint &operator[] ( const unsigned int i ) const
75 {
76 assert( i < size() );
77 return points_[ i ];
78 }
79
80 iterator begin () const
81 {
82 return points_.begin();
83 }
84
85 iterator end () const
86 {
87 return points_.end();
88 }
89
90 const LocalKey &localKey ( const unsigned int i ) const
91 {
92 return (*this)[ i ].localKey();
93 }
94
95 std::size_t order () const
96 {
97 return order_;
98 }
99
100 std::size_t size () const
101 {
102 return points_.size();
103 }
104
105 protected:
106 std::size_t order_;
107 std::vector< LagrangePoint > points_;
108 };
109
110}
111
112#endif // DUNE_LAGRANGE_EMPTYPOINTS_HH
Definition bdfmcube.hh:18
Describe position of one degree of freedom.
Definition localkey.hh:24
Definition emptypoints.hh:18
const LocalKey & localKey() const
Definition emptypoints.hh:36
Field weight_
Definition emptypoints.hh:48
static const int dimension
Definition emptypoints.hh:25
friend class LagrangePointSetImpl
Definition emptypoints.hh:22
Vector point_
Definition emptypoints.hh:46
const Field weight() const
Definition emptypoints.hh:41
FieldVector< Field, dimension > Vector
Definition emptypoints.hh:29
F Field
Definition emptypoints.hh:27
const Vector & point() const
Definition emptypoints.hh:31
LocalKey localKey_
Definition emptypoints.hh:47
Definition emptypoints.hh:56
std::size_t order() const
Definition emptypoints.hh:95
std::size_t order_
Definition emptypoints.hh:106
static const unsigned int dimension
Definition emptypoints.hh:62
EmptyPointSet(const std::size_t order)
Definition emptypoints.hh:69
const LagrangePoint & operator[](const unsigned int i) const
Definition emptypoints.hh:74
std::size_t size() const
Definition emptypoints.hh:100
Dune::LagrangePoint< Field, dimension > LagrangePoint
Definition emptypoints.hh:64
const LocalKey & localKey(const unsigned int i) const
Definition emptypoints.hh:90
iterator begin() const
Definition emptypoints.hh:80
iterator end() const
Definition emptypoints.hh:85
F Field
Definition emptypoints.hh:60
std::vector< LagrangePoint > points_
Definition emptypoints.hh:107
std::vector< LagrangePoint >::const_iterator iterator
Definition emptypoints.hh:66