Dune Core Modules (2.8.0)

macroelement.hh
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
6#include <dune/grid/albertagrid/misc.hh>
7
8#if HAVE_ALBERTA
9
10namespace Dune
11{
12
13 namespace Alberta
14 {
15
16 // MacroElement
17 // ------------
18
19 template< int dim >
20 struct MacroElement
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
constexpr GeometryType vertex
GeometryType representing a vertex.
Definition: type.hh:504
Dune namespace.
Definition: alignedallocator.hh:11
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)