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