DUNE PDELab (git)

yaspgridgeometry.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_YASPGRIDGEOMETRY_HH
6#define DUNE_GRID_YASPGRIDGEOMETRY_HH
7
23namespace Dune {
24
29 template<int mydim,int cdim, class GridImp>
30 class YaspGeometry : public AxisAlignedCubeGeometry<typename GridImp::ctype,mydim,cdim>
31 {
32 public:
34 typedef typename GridImp::ctype ctype;
35
37 YaspGeometry (const FieldVector<ctype, cdim>& ll, const FieldVector<ctype, cdim>& ur, const std::bitset<cdim>& shift)
38 : AxisAlignedCubeGeometry<ctype,mydim,cdim>(ll,ur,shift)
39 {
40 assert(mydim == shift.count());
41 }
42 };
43
45 template<int mydim, class GridImp>
46 class YaspGeometry<mydim,mydim,GridImp> : public AxisAlignedCubeGeometry<typename GridImp::ctype,mydim,mydim>
47 {
48 public:
49 typedef typename GridImp::ctype ctype;
50
53 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(ll,ur)
54 {}
55
58 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(other)
59 {}
60 };
61
63 template<int cdim, class GridImp>
64 class YaspGeometry<0,cdim,GridImp> : public AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>
65 {
66 public:
67 typedef typename GridImp::ctype ctype;
68
71 : AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>( p )
72 {}
73
74 YaspGeometry ( const FieldVector< ctype, cdim > &p, const FieldVector< ctype, cdim > &, const std::bitset<cdim> &)
75 : AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>( p )
76 {}
77 };
78} // namespace Dune
79
80#endif // DUNE_GRID_YASPGRIDGEOMETRY_HH
A geometry implementation for axis-aligned hypercubes.
Definition: axisalignedcubegeometry.hh:50
YaspGeometry(const FieldVector< ctype, cdim > &p)
constructor
Definition: yaspgridgeometry.hh:70
YaspGeometry(const YaspGeometry &other)
copy constructor (skipping temporary variables)
Definition: yaspgridgeometry.hh:57
YaspGeometry(const FieldVector< ctype, mydim > &ll, const FieldVector< ctype, mydim > &ur)
constructor from midpoint and extension
Definition: yaspgridgeometry.hh:52
The general version that handles all codimensions but 0 and dim.
Definition: yaspgridgeometry.hh:31
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:37
GridImp::ctype ctype
define type used for coordinates in grid module
Definition: yaspgridgeometry.hh:34
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)