dune-grid
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
grid
utility
persistentcontainerinterface.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_PERSISTENTCONTAINERINTERFACE_HH
6
#define DUNE_PERSISTENTCONTAINERINTERFACE_HH
7
8
#ifndef HEADERCHECK
9
#error "This header exists for documentation purposes only and should never be included directly."
10
#endif
11
12
namespace
Dune
13
{
14
53
template
<
class
G,
class
T >
54
class
PersistentContainerInterface
55
{
56
typedef
PersistentContainerInterface< G, T >
This;
57
58
struct
ImplementationDefined;
59
60
public
:
61
typedef
G
Grid
;
62
63
typedef
T
Value
;
64
65
typedef
ImplementationDefined
Size
;
66
typedef
ImplementationDefined
ConstIterator
;
67
typedef
ImplementationDefined
Iterator
;
68
69
// construction
70
79
PersistentContainerInterface
(
Grid
&grid,
int
codim,
const
Value
&value =
Value
() );
80
82
PersistentContainerInterface
(
const
This &other );
83
85
const
This &
operator=
(
const
This &other );
86
87
// element access
88
93
template
<
class
Entity >
94
const
Value
&
operator[]
(
const
Entity
&entity )
const
;
95
100
template
<
class
Entity >
101
Value
&
operator[]
(
const
Entity
&entity );
102
108
template
<
class
Entity >
109
const
Value
&
operator()
(
const
Entity
&entity,
int
subEntity )
const
;
110
116
template
<
class
Entity >
117
Value
&
operator()
(
const
Entity
&entity,
int
subEntity );
118
119
// capacity
120
126
Size
size
()
const
;
127
141
void
resize
(
const
Value
&value =
Value
() );
142
156
void
shrinkToFit
();
157
158
// modifiers
159
165
void
fill
(
const
Value
&value );
166
171
void
swap
( This &other );
172
173
// iterators
174
180
ConstIterator
begin
()
const
;
186
Iterator
begin
();
187
193
ConstIterator
end
()
const
;
199
Iterator
end
();
200
201
// information
202
204
int
codimension
()
const
;
205
};
206
207
}
// namespace Dune
208
209
#endif
// #ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH
Dune
Include standard header files.
Definition
agrid.hh:60
Dune::Entity
Wrapper class for entities.
Definition
common/entity.hh:66
Dune::PersistentContainerInterface::Size
ImplementationDefined Size
Definition
persistentcontainerinterface.hh:65
Dune::PersistentContainerInterface::PersistentContainerInterface
PersistentContainerInterface(Grid &grid, int codim, const Value &value=Value())
constructor
Dune::PersistentContainerInterface::operator[]
const Value & operator[](const Entity &entity) const
access the data associated with an entity
Dune::PersistentContainerInterface::Value
T Value
Definition
persistentcontainerinterface.hh:63
Dune::PersistentContainerInterface::size
Size size() const
number of entries in the container
Dune::PersistentContainerInterface::Iterator
ImplementationDefined Iterator
Definition
persistentcontainerinterface.hh:67
Dune::PersistentContainerInterface::PersistentContainerInterface
PersistentContainerInterface(const This &other)
copy constructor
Dune::PersistentContainerInterface::ConstIterator
ImplementationDefined ConstIterator
Definition
persistentcontainerinterface.hh:66
Dune::PersistentContainerInterface::end
ConstIterator end() const
returns an iterator pointing to the last element of the container
Dune::PersistentContainerInterface::begin
ConstIterator begin() const
returns an iterator pointing to the first element of the container
Dune::PersistentContainerInterface::begin
Iterator begin()
returns an iterator pointing to the first element of the container
Dune::PersistentContainerInterface::end
Iterator end()
returns an iterator pointing to the last element of the container
Dune::PersistentContainerInterface::shrinkToFit
void shrinkToFit()
remove unnecessary entries from container
Dune::PersistentContainerInterface::codimension
int codimension() const
return the codimension, the container attaches data to
Dune::PersistentContainerInterface::Grid
G Grid
Definition
persistentcontainerinterface.hh:61
Dune::PersistentContainerInterface::swap
void swap(This &other)
exchange the content of the container with another one
Dune::PersistentContainerInterface::resize
void resize(const Value &value=Value())
reserve memory for all entities in the grid
Dune::PersistentContainerInterface::fill
void fill(const Value &value)
set all accessible entries to a given value
Dune::PersistentContainerInterface::operator()
const Value & operator()(const Entity &entity, int subEntity) const
access the data associated with a subentity
Dune::PersistentContainerInterface::operator=
const This & operator=(const This &other)
assignment operator
Generated by
1.17.0