Loading...
Searching...
No Matches
properties.hh
Go to the documentation of this file.
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_ISTL_AMG_PROPERTIES_HH
#define DUNE_ISTL_AMG_PROPERTIES_HH
#include <dune/common/propertymap.hh>
namespace Dune
{
namespace Amg
{
struct VertexVisitedTag
{};
template<typename C, typename K, std::size_t i,typename T=typename C::ValueType,
typename R = typename C::Reference>
class RandomAccessBundledPropertyMap
: public RAPropertyMapHelper<R,
RandomAccessBundledPropertyMap<C,K,i,T,R> >
{
public:
typedef C Container;
typedef R Reference;
typedef K Key;
typedef LvaluePropertyMapTag Category;
enum {
index = i
};
Reference operator[](const Key& key) const
{
return container_[key][index];
}
RandomAccessBundledPropertyMap(Container& container)
: container_(&container)
{}
RandomAccessBundledPropertyMap()
: container_(0)
{}
private:
Container* container_;
};
}
}
#endif
Dune::Amg::RandomAccessBundledPropertyMap::operator[]
Reference operator[](const Key &key) const
Get the property for a key.
Definition properties.hh:69
Dune::Amg::RandomAccessBundledPropertyMap::RandomAccessBundledPropertyMap
RandomAccessBundledPropertyMap()
The default constructor.
Definition properties.hh:83
Dune::Amg::RandomAccessBundledPropertyMap::Reference
R Reference
The reference type of the container.
Definition properties.hh:49
Dune::Amg::RandomAccessBundledPropertyMap::RandomAccessBundledPropertyMap
RandomAccessBundledPropertyMap(Container &container)
Constructor.
Definition properties.hh:78
Dune::Amg::RandomAccessBundledPropertyMap::Key
K Key
The key of the property map.
Definition properties.hh:52
Dune::Amg::RandomAccessBundledPropertyMap::Category
LvaluePropertyMapTag Category
The category of the property map.
Definition properties.hh:57
Dune::Amg::RandomAccessBundledPropertyMap::Container
C Container
The container that holds the properties.
Definition properties.hh:46
Dune::Amg::RandomAccessBundledPropertyMap::index
@ index
The index of the property in the bundle.
Definition properties.hh:61
Dune
Definition allocator.hh:11
Dune::Amg
Definition novlpschwarz.hh:256
Dune::Amg::VertexVisitedTag
Tag idnetifying the visited property of a vertex.
Definition properties.hh:29