Dune Core Modules (2.4.1)

yaspgridgeometry.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_YASPGRIDGEOMETRY_HH
4#define DUNE_GRID_YASPGRIDGEOMETRY_HH
5
21namespace Dune {
22
27 template<int mydim,int cdim, class GridImp>
28 class YaspGeometry : public AxisAlignedCubeGeometry<typename GridImp::ctype,mydim,cdim>
29 {
30 public:
32 typedef typename GridImp::ctype ctype;
33
36 : AxisAlignedCubeGeometry<ctype,mydim,cdim>(FieldVector<ctype,cdim>(0),FieldVector<ctype,cdim>(0))
37 {}
38
40 YaspGeometry (const FieldVector<ctype, cdim>& ll, const FieldVector<ctype, cdim>& ur, const std::bitset<cdim>& shift)
41 : AxisAlignedCubeGeometry<ctype,mydim,cdim>(ll,ur,shift)
42 {
43 assert(mydim == shift.count());
44 }
45
48 : AxisAlignedCubeGeometry<ctype,mydim,cdim>(other)
49 {}
50 };
51
53 template<int mydim, class GridImp>
54 class YaspGeometry<mydim,mydim,GridImp> : public AxisAlignedCubeGeometry<typename GridImp::ctype,mydim,mydim>
55 {
56 public:
57 typedef typename GridImp::ctype ctype;
58
61 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(FieldVector<ctype,mydim>(0),FieldVector<ctype,mydim>(0)) // anything
62 {}
63
66 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(ll,ur)
67 {}
68
71 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(other)
72 {}
73 };
74
76 template<int cdim, class GridImp>
77 class YaspGeometry<0,cdim,GridImp> : public AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>
78 {
79 public:
80 typedef typename GridImp::ctype ctype;
81
84 : AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>(FieldVector<ctype,cdim>(0)) // anything
85 {}
86
89 : AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>( p )
90 {}
91
92 YaspGeometry ( const FieldVector< ctype, cdim > &p, const FieldVector< ctype, cdim > &, const std::bitset<cdim> &)
93 : AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>( p )
94 {}
95 };
96} // namespace Dune
97
98#endif // DUNE_GRID_YASPGRIDGEOMETRY_HH
A geometry implementation for axis-aligned hypercubes.
Definition: axisalignedcubegeometry.hh:50
vector space out of a tensor product of fields.
Definition: fvector.hh:94
YaspGeometry()
default constructor
Definition: yaspgridgeometry.hh:83
YaspGeometry(const FieldVector< ctype, cdim > &p)
constructor
Definition: yaspgridgeometry.hh:88
YaspGeometry()
default constructor
Definition: yaspgridgeometry.hh:60
YaspGeometry(const YaspGeometry &other)
copy constructor (skipping temporary variables)
Definition: yaspgridgeometry.hh:70
YaspGeometry(const FieldVector< ctype, mydim > &ll, const FieldVector< ctype, mydim > &ur)
constructor from midpoint and extension
Definition: yaspgridgeometry.hh:65
The general version that handles all codimensions but 0 and dim.
Definition: yaspgridgeometry.hh:29
YaspGeometry(const FieldVector< ctype, cdim > &ll, const FieldVector< ctype, cdim > &ur, const std::bitset< cdim > &shift)
constructor from midpoint and extension and a bitset defining which unit vectors span the entity
Definition: yaspgridgeometry.hh:40
GridImp::ctype ctype
define type used for coordinates in grid module
Definition: yaspgridgeometry.hh:32
YaspGeometry()
default constructor
Definition: yaspgridgeometry.hh:35
YaspGeometry(const YaspGeometry &other)
copy constructor
Definition: yaspgridgeometry.hh:47
Dune namespace.
Definition: alignment.hh:10
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)