dune-grid 2.10
Loading...
Searching...
No Matches
concepts/archetypes/entity.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_GRID_CONCEPT_ARCHETYPES_ENTITY_HH
6#define DUNE_GRID_CONCEPT_ARCHETYPES_ENTITY_HH
7
8#include <dune/geometry/type.hh>
12
13#ifndef DOXYGEN
14namespace Dune::Concept::Archetypes {
15
16template <int codim>
17struct EntitySeed
18{
19 static constexpr int codimension = codim;
20 bool isValid () const;
21};
22
23
24template <int dim, int codim>
25struct Entity
26{
27 static constexpr int dimension = dim;
28 static constexpr int codimension = codim;
29 static constexpr int mydimension = dim - codim;
30
31 using Geometry = Archetypes::Geometry<mydimension,mydimension>;
32 using EntitySeed = Archetypes::EntitySeed<codimension>;
33
34 int level () const;
35 Dune::PartitionType partitionType () const;
36 Geometry geometry () const;
37 Dune::GeometryType type () const;
38 unsigned int subEntities (int cd) const;
39 EntitySeed seed () const;
40
41 template <int cc>
42 Archetypes::Entity<dim,cc> subEntity (int i) const;
43
44 bool operator== (Entity const& entity) const;
45 bool operator!= (Entity const& entity) const;
46};
47
48} // end namespace Dune::Concept::Archetypes
49#endif // DOXYGEN
50
51#endif // DUNE_GRID_CONCEPT_ARCHETYPES_ENTITY_HH
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:30