DUNE-FEM (unstable)

properties.hh
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2 // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 // vi: set et ts=4 sw=2 sts=2:
5 #ifndef DUNE_ISTL_AMG_PROPERTIES_HH
6 #define DUNE_ISTL_AMG_PROPERTIES_HH
7 
8 #include <dune/common/propertymap.hh>
9 
10 namespace Dune
11 {
12 
13  namespace Amg
14  {
29  {};
30 
31 
38  template<typename C, typename K, std::size_t i,typename T=typename C::ValueType,
39  typename R = typename C::Reference>
41  : public RAPropertyMapHelper<R,
42  RandomAccessBundledPropertyMap<C,K,i,T,R> >
43  {
44  public:
46  typedef C Container;
47 
49  typedef R Reference;
50 
52  typedef K Key;
53 
58 
59  enum {
61  index = i
62  };
63 
69  Reference operator[](const Key& key) const
70  {
71  return container_[key][index];
72  }
73 
79  : container_(&container)
80  {}
81 
84  : container_(0)
85  {}
86 
87  private:
89  Container* container_;
90  };
91  }
92 }
93 
94 #endif
A property map that extracts one property out of a bundle using operator[]()
Definition: properties.hh:43
Reference operator[](const Key &key) const
Get the property for a key.
Definition: properties.hh:69
RandomAccessBundledPropertyMap()
The default constructor.
Definition: properties.hh:83
R Reference
The reference type of the container.
Definition: properties.hh:49
RandomAccessBundledPropertyMap(Container &container)
Constructor.
Definition: properties.hh:78
K Key
The key of the property map.
Definition: properties.hh:52
LvaluePropertyMapTag Category
The category of the property map.
Definition: properties.hh:57
C Container
The container that holds the properties.
Definition: properties.hh:46
@ index
The index of the property in the bundle.
Definition: properties.hh:61
Dune namespace.
Definition: alignedallocator.hh:13
Tag idnetifying the visited property of a vertex.
Definition: properties.hh:29
Tag for the category of lvalue property maps.
Definition: propertymap.hh:57
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 16, 22:29, 2024)