Dune Core Modules (2.9.0)

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