Dune Core Modules (2.5.0)

yaspgridentityseed.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#ifndef DUNE_GRID_YASPGRIDENTITYSEED_HH
4#define DUNE_GRID_YASPGRIDENTITYSEED_HH
5
10namespace Dune {
11
14 template<int codim, class GridImp>
16 {
18 enum { dim=GridImp::dimension };
19
20 public:
22 enum { codimension = codim };
23
26 : _l(-1), _o(0)
27 {
28 std::fill(_c.begin(),_c.end(),0);
29 }
30
32 YaspEntitySeed (int level, std::array<int, dim> coord, int o = 0)
33 : _l(level), _c(coord), _o(o)
34 {}
35
38 : _l(rhs._l), _c(rhs._c), _o(rhs._o)
39 {}
40
42 bool isValid() const
43 {
44 return _l != -1;
45 }
46
47 int level () const { return _l; }
48 const std::array<int, dim> & coord() const { return _c; }
49 int offset () const { return _o; }
50
51 protected:
52 int _l; // grid level
53 std::array<int, dim> _c; // coord in the global grid
54 int _o; // the offset: which YGridComponent, does the entity belong to
55 };
56
57} // namespace Dune
58
59#endif // DUNE_GRID_YASPGRIDENTITYSEED_HH
Describes the minimal information necessary to create a fully functional YaspEntity.
Definition: yaspgridentityseed.hh:16
YaspEntitySeed()
default construct an invalid entity seed
Definition: yaspgridentityseed.hh:25
YaspEntitySeed(int level, std::array< int, dim > coord, int o=0)
constructor
Definition: yaspgridentityseed.hh:32
YaspEntitySeed(const YaspEntitySeed &rhs)
copy constructor
Definition: yaspgridentityseed.hh:37
bool isValid() const
check whether the EntitySeed refers to a valid Entity
Definition: yaspgridentityseed.hh:42
Dune namespace.
Definition: alignment.hh:11
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 13, 23:29, 2024)