dune-grid 3.0-git
macroelement.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_ALBERTA_MACROELEMENT_HH
4#define DUNE_ALBERTA_MACROELEMENT_HH
5
7
8#if HAVE_ALBERTA
9
10namespace Dune
11{
12
13 namespace Alberta
14 {
15
16 // MacroElement
17 // ------------
18
19 template< int dim >
21 : public ALBERTA MACRO_EL
22 {
23 const GlobalVector &coordinate ( const int vertex ) const;
24
25 int boundaryId ( const int face ) const;
26 bool isBoundary ( const int face ) const;
27 const MacroElement< dim > *neighbor ( const int face ) const;
28 };
29
30
31 template< int dim >
32 inline const GlobalVector &MacroElement< dim >::coordinate ( const int vertex ) const
33 {
34 assert( (vertex >= 0) && (vertex < N_VERTICES_MAX) );
35 return *coord[ vertex ];
36 }
37
38
39 template< int dim >
40 inline bool MacroElement< dim >::isBoundary ( const int face ) const
41 {
42 return (boundaryId( face ) != InteriorBoundary);
43 }
44
45
46 template< int dim >
47 inline int MacroElement< dim >::boundaryId ( const int face ) const
48 {
49 return wall_bound[ face ];
50 }
51
52
53 template< int dim >
54 const MacroElement< dim > *MacroElement< dim >::neighbor ( const int face ) const
55 {
56 assert( (face >= 0) && (face < N_NEIGH_MAX) );
57 return static_cast< const MacroElement * >( neigh[ face ] );
58 }
59
60 }
61
62}
63
64#endif // #if HAVE_ALBERTA
65
66#endif // #ifndef DUNE_ALBERTA_MACROELEMENT_HH
#define ALBERTA
Definition albertaheader.hh:27
Include standard header files.
Definition agrid.hh:60
static const int InteriorBoundary
Definition misc.hh:56
ALBERTA REAL_D GlobalVector
Definition misc.hh:47
Definition macroelement.hh:22
bool isBoundary(const int face) const
Definition macroelement.hh:40
const MacroElement< dim > * neighbor(const int face) const
Definition macroelement.hh:54
int boundaryId(const int face) const
Definition macroelement.hh:47
const GlobalVector & coordinate(const int vertex) const
Definition macroelement.hh:32