Nektar++
library
LocalRegions
Expansion0D.h
Go to the documentation of this file.
1
///////////////////////////////////////////////////////////////////////////////
2
//
3
// File Expansion0D.h
4
//
5
// For more information, please see: http://www.nektar.info
6
//
7
// The MIT License
8
//
9
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10
// Department of Aeronautics, Imperial College London (UK), and Scientific
11
// Computing and Imaging Institute, University of Utah (USA).
12
//
13
// Permission is hereby granted, free of charge, to any person obtaining a
14
// copy of this software and associated documentation files (the "Software"),
15
// to deal in the Software without restriction, including without limitation
16
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17
// and/or sell copies of the Software, and to permit persons to whom the
18
// Software is furnished to do so, subject to the following conditions:
19
//
20
// The above copyright notice and this permission notice shall be included
21
// in all copies or substantial portions of the Software.
22
//
23
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29
// DEALINGS IN THE SOFTWARE.
30
//
31
// Description: Header file for Expansion0D routines
32
//
33
///////////////////////////////////////////////////////////////////////////////
34
35
#ifndef EXPANSION0D_H
36
#define EXPANSION0D_H
37
38
#include <
LocalRegions/Expansion.h
>
39
#include <
StdRegions/StdExpansion0D.h
>
40
#include <
LocalRegions/LocalRegionsDeclspec.h
>
41
#include <
LocalRegions/Expansion1D.h
>
42
#include <
SpatialDomains/Geometry0D.h
>
43
44
namespace
Nektar
45
{
46
namespace
LocalRegions
47
{
48
class
Expansion0D
;
49
typedef
std::shared_ptr<Expansion0D>
Expansion0DSharedPtr
;
50
typedef
std::vector< Expansion0DSharedPtr >
Expansion0DVector
;
51
52
class
Expansion0D
:
virtual
public
Expansion
,
53
virtual
public
StdRegions::StdExpansion0D
54
{
55
public
:
56
LOCAL_REGIONS_EXPORT
Expansion0D
(
57
SpatialDomains::Geometry0DSharedPtr
pGeom);
58
59
LOCAL_REGIONS_EXPORT
virtual
~Expansion0D
() {}
60
61
inline
Expansion1DSharedPtr
GetLeftAdjacentElementExp
()
const
;
62
63
inline
Expansion1DSharedPtr
GetRightAdjacentElementExp
()
const
;
64
65
inline
int
GetLeftAdjacentElementVertex
()
const
;
66
67
inline
int
GetRightAdjacentElementVertex
()
const
;
68
69
inline
void
SetAdjacentElementExp
(
70
int
vertex,
71
Expansion1DSharedPtr
&v);
72
73
inline
SpatialDomains::Geometry0DSharedPtr
GetGeom0D
()
const
;
74
75
protected
:
76
77
private
:
78
Expansion1DWeakPtr
m_elementLeft
;
79
Expansion1DWeakPtr
m_elementRight
;
80
int
m_elementVertexLeft
;
81
int
m_elementVertexRight
;
82
};
83
84
inline
Expansion1DSharedPtr
Expansion0D::
85
GetLeftAdjacentElementExp
()
const
86
{
87
ASSERTL1
(
m_elementLeft
.lock().get(),
88
"Left adjacent element not set."
);
89
90
return
m_elementLeft
.lock();
91
}
92
93
inline
Expansion1DSharedPtr
Expansion0D::
94
GetRightAdjacentElementExp
()
const
95
{
96
ASSERTL1
(
m_elementLeft
.lock().get(),
97
"Right adjacent element not set."
);
98
99
return
m_elementRight
.lock();
100
}
101
102
inline
int
Expansion0D::GetLeftAdjacentElementVertex
()
const
103
{
104
return
m_elementVertexLeft
;
105
}
106
107
inline
int
Expansion0D::GetRightAdjacentElementVertex
()
const
108
{
109
return
m_elementVertexRight
;
110
}
111
112
inline
void
Expansion0D::SetAdjacentElementExp
(
113
int
vertex,
114
Expansion1DSharedPtr
&v)
115
{
116
if
(
m_elementLeft
.lock().get())
117
{
118
//ASSERTL1(!m_elementRight.lock().get(),
119
// "Both adjacent elements already set.");
120
m_elementRight
= v;
121
m_elementVertexRight
= vertex;
122
}
123
else
124
{
125
m_elementLeft
= v;
126
m_elementVertexLeft
= vertex;
127
}
128
}
129
130
inline
SpatialDomains::Geometry0DSharedPtr
131
Expansion0D::GetGeom0D
()
const
132
{
133
return
std::dynamic_pointer_cast<SpatialDomains::
134
Geometry0D>(
m_geom
);
135
136
}
137
}
//end of namespace
138
}
//end of namespace
139
140
#endif
Nektar
Definition:
CoupledSolver.h:1
Geometry0D.h
Nektar::LocalRegions::Expansion0D::m_elementVertexRight
int m_elementVertexRight
Definition:
Expansion0D.h:81
Nektar::LocalRegions::Expansion0D::Expansion0D
Expansion0D(SpatialDomains::Geometry0DSharedPtr pGeom)
Definition:
Expansion0D.cpp:41
LocalRegionsDeclspec.h
Nektar::StdRegions::StdExpansion0D
Definition:
StdExpansion0D.h:49
Expansion.h
Nektar::LocalRegions::Expansion1DWeakPtr
std::weak_ptr< Expansion1D > Expansion1DWeakPtr
Definition:
Expansion1D.h:53
Nektar::LocalRegions::Expansion::m_geom
SpatialDomains::GeometrySharedPtr m_geom
Definition:
Expansion.h:127
Nektar::LocalRegions::Expansion0D::GetLeftAdjacentElementVertex
int GetLeftAdjacentElementVertex() const
Definition:
Expansion0D.h:102
Nektar::LocalRegions::Expansion0D::m_elementVertexLeft
int m_elementVertexLeft
Definition:
Expansion0D.h:80
Nektar::LocalRegions::Expansion0D::SetAdjacentElementExp
void SetAdjacentElementExp(int vertex, Expansion1DSharedPtr &v)
Definition:
Expansion0D.h:112
Nektar::LocalRegions::Expansion0D::GetLeftAdjacentElementExp
Expansion1DSharedPtr GetLeftAdjacentElementExp() const
Definition:
Expansion0D.h:85
Nektar::LocalRegions::Expansion0DSharedPtr
std::shared_ptr< Expansion0D > Expansion0DSharedPtr
Definition:
Expansion0D.h:48
Nektar::LocalRegions::Expansion0D::m_elementLeft
Expansion1DWeakPtr m_elementLeft
Definition:
Expansion0D.h:78
Nektar::LocalRegions::Expansion0D::~Expansion0D
virtual ~Expansion0D()
Definition:
Expansion0D.h:59
Nektar::LocalRegions::Expansion0D::m_elementRight
Expansion1DWeakPtr m_elementRight
Definition:
Expansion0D.h:79
Nektar::LocalRegions::Expansion0D::GetRightAdjacentElementExp
Expansion1DSharedPtr GetRightAdjacentElementExp() const
Definition:
Expansion0D.h:94
Nektar::SpatialDomains::Geometry0DSharedPtr
std::shared_ptr< Geometry0D > Geometry0DSharedPtr
Definition:
Geometry0D.h:45
StdExpansion0D.h
Nektar::LocalRegions::Expansion0DVector
std::vector< Expansion0DSharedPtr > Expansion0DVector
Definition:
Expansion0D.h:50
Nektar::LocalRegions::Expansion0D::GetGeom0D
SpatialDomains::Geometry0DSharedPtr GetGeom0D() const
Definition:
Expansion0D.h:131
Nektar::LocalRegions::Expansion0D::GetRightAdjacentElementVertex
int GetRightAdjacentElementVertex() const
Definition:
Expansion0D.h:107
Expansion1D.h
Nektar::LocalRegions::Expansion
Definition:
Expansion.h:70
LOCAL_REGIONS_EXPORT
#define LOCAL_REGIONS_EXPORT
Definition:
LocalRegionsDeclspec.h:42
ASSERTL1
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition:
ErrorUtil.hpp:250
Nektar::LocalRegions::Expansion1DSharedPtr
std::shared_ptr< Expansion1D > Expansion1DSharedPtr
Definition:
Expansion1D.h:51
Nektar::LocalRegions::Expansion0D
Definition:
Expansion0D.h:52
Generated on Wed Jan 20 2021 03:33:33 for Nektar++ by
1.8.13