dune-grid
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
grid
albertagrid
macroelement.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_ALBERTA_MACROELEMENT_HH
6
#define DUNE_ALBERTA_MACROELEMENT_HH
7
8
#include <
dune/grid/albertagrid/misc.hh
>
9
10
#if HAVE_ALBERTA
11
12
namespace
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
ALBERTA
#define ALBERTA
Definition
albertaheader.hh:29
misc.hh
Dune
Include standard header files.
Definition
agrid.hh:60
Dune::Alberta
Definition
albertagrid.cc:23
Dune::Alberta::InteriorBoundary
static const int InteriorBoundary
Definition
misc.hh:59
Dune::Alberta::GlobalVector
ALBERTA REAL_D GlobalVector
Definition
misc.hh:50
Dune::Alberta::MacroElement
Definition
macroelement.hh:24
Dune::Alberta::MacroElement::isBoundary
bool isBoundary(const int face) const
Definition
macroelement.hh:42
Dune::Alberta::MacroElement::neighbor
const MacroElement< dim > * neighbor(const int face) const
Definition
macroelement.hh:56
Dune::Alberta::MacroElement::boundaryId
int boundaryId(const int face) const
Definition
macroelement.hh:49
Dune::Alberta::MacroElement::coordinate
const GlobalVector & coordinate(const int vertex) const
Definition
macroelement.hh:34
Generated by
1.17.0