Nektar++
PulseWavePressureArea.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: PulseWavePressureArea.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// License for the specific language governing rights and limitations under
14// Permission is hereby granted, free of charge, to any person obtaining a
15// copy of this software and associated documentation files (the "Software"),
16// to deal in the Software without restriction, including without limitation
17// the rights to use, copy, modify, merge, publish, distribute, sublicense,
18// and/or sell copies of the Software, and to permit persons to whom the
19// Software is furnished to do so, subject to the following conditions:
20//
21// The above copyright notice and this permission notice shall be included
22// in all copies or substantial portions of the Software.
23//
24// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30// DEALINGS IN THE SOFTWARE.
31//
32// Description: PulseWavePressureArea header
33//
34///////////////////////////////////////////////////////////////////////////////
35
36#ifndef NEKTAR_PULSEWAVEPRESSUREAREA_H
37#define NEKTAR_PULSEWAVEPRESSUREAREA_H
38
43
44namespace Nektar
45{
46
47class PulseWavePressureArea;
48
49typedef std::shared_ptr<PulseWavePressureArea> PulseWavePressureAreaSharedPtr;
50
52
58
60{
61public:
64
65 virtual ~PulseWavePressureArea();
66
67 inline void GetPressure(NekDouble &P, const NekDouble &beta,
68 const NekDouble &A, const NekDouble &A0,
69 const NekDouble &dAUdx, const NekDouble &gamma = 0,
70 const NekDouble &alpha = 0.5);
71
72 inline void GetC(NekDouble &c, const NekDouble &beta, const NekDouble &A,
73 const NekDouble &A0, const NekDouble &alpha = 0.5);
74
75 inline void GetW1(NekDouble &W1, const NekDouble &u, const NekDouble &beta,
76 const NekDouble &A, const NekDouble &A0,
77 const NekDouble &alpha = 0.5);
78
79 inline void GetW2(NekDouble &W2, const NekDouble &u, const NekDouble &beta,
80 const NekDouble &A, const NekDouble &A0,
81 const NekDouble &alpha = 0.5);
82
83 inline void GetAFromChars(NekDouble &A, const NekDouble &W1,
84 const NekDouble &W2, const NekDouble &beta,
85 const NekDouble &A0,
86 const NekDouble &alpha = 0.5);
87
88 inline void GetUFromChars(NekDouble &u, const NekDouble &W1,
89 const NekDouble &W2);
90
91 inline void GetCharIntegral(NekDouble &I, const NekDouble &beta,
92 const NekDouble &A, const NekDouble &A0,
93 const NekDouble &alpha = 0.5);
94
96 const Array<OneD, NekDouble> &Au,
97 const Array<OneD, NekDouble> &uu,
99 const Array<OneD, NekDouble> &A0,
100 const Array<OneD, NekDouble> &alpha,
101 const std::string &type);
102
103protected:
104 virtual void v_GetPressure(NekDouble &P, const NekDouble &beta,
105 const NekDouble &A, const NekDouble &A0,
106 const NekDouble &dAUdx,
107 const NekDouble &gamma = 0,
108 const NekDouble &alpha = 0.5) = 0;
109
110 virtual void v_GetC(NekDouble &c, const NekDouble &beta, const NekDouble &A,
111 const NekDouble &A0, const NekDouble &alpha = 0.5) = 0;
112
113 virtual void v_GetW1(NekDouble &W1, const NekDouble &u,
114 const NekDouble &beta, const NekDouble &A,
115 const NekDouble &A0, const NekDouble &alpha = 0.5) = 0;
116
117 virtual void v_GetW2(NekDouble &W2, const NekDouble &u,
118 const NekDouble &beta, const NekDouble &A,
119 const NekDouble &A0, const NekDouble &alpha = 0.5) = 0;
120
121 virtual void v_GetAFromChars(NekDouble &A, const NekDouble &W1,
122 const NekDouble &W2, const NekDouble &beta,
123 const NekDouble &A0,
124 const NekDouble &alpha = 0.5) = 0;
125
126 virtual void v_GetUFromChars(NekDouble &u, const NekDouble &W1,
127 const NekDouble &W2) = 0;
128
129 virtual void v_GetCharIntegral(NekDouble &I, const NekDouble &beta,
130 const NekDouble &A, const NekDouble &A0,
131 const NekDouble &alpha = 0.5) = 0;
132
134 const Array<OneD, NekDouble> &Au,
135 const Array<OneD, NekDouble> &uu,
137 const Array<OneD, NekDouble> &A0,
138 const Array<OneD, NekDouble> &alpha,
139 const std::string &type) = 0;
140
143
146
147private:
148};
149
151 NekDouble &P, const NekDouble &beta, const NekDouble &A,
152 const NekDouble &A0, const NekDouble &dAUdx, const NekDouble &gamma,
153 const NekDouble &alpha)
154{
155 v_GetPressure(P, beta, A, A0, dAUdx, gamma, alpha);
156}
157
159 const NekDouble &A, const NekDouble &A0,
160 const NekDouble &alpha)
161{
162 v_GetC(c, beta, A, A0, alpha);
163}
164
166 const NekDouble &beta,
167 const NekDouble &A,
168 const NekDouble &A0,
169 const NekDouble &alpha)
170{
171 v_GetW1(W1, u, beta, A, A0, alpha);
172}
173
175 const NekDouble &beta,
176 const NekDouble &A,
177 const NekDouble &A0,
178 const NekDouble &alpha)
179{
180 v_GetW2(W2, u, beta, A, A0, alpha);
181}
182
184 NekDouble &A, const NekDouble &W1, const NekDouble &W2,
185 const NekDouble &beta, const NekDouble &A0, const NekDouble &alpha)
186{
187 v_GetAFromChars(A, W1, W2, beta, A0, alpha);
188}
189
191 const NekDouble &W1,
192 const NekDouble &W2)
193{
194 v_GetUFromChars(u, W1, W2);
195}
196
198 const NekDouble &beta,
199 const NekDouble &A,
200 const NekDouble &A0,
201 const NekDouble &alpha)
202{
203 v_GetCharIntegral(I, beta, A, A0, alpha);
204}
205
209 const Array<OneD, NekDouble> &A0, const Array<OneD, NekDouble> &alpha,
210 const std::string &type)
211{
212 v_GetJacobianInverse(invJ, Au, uu, beta, A0, alpha, type);
213}
214
215} // namespace Nektar
216#endif
Provides a generic Factory class.
void GetCharIntegral(NekDouble &I, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)
void GetW2(NekDouble &W2, const NekDouble &u, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)
void GetC(NekDouble &c, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)
virtual void v_GetW1(NekDouble &W1, const NekDouble &u, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)=0
virtual void v_GetJacobianInverse(NekMatrix< NekDouble > &invJ, const Array< OneD, NekDouble > &Au, const Array< OneD, NekDouble > &uu, const Array< OneD, NekDouble > &beta, const Array< OneD, NekDouble > &A0, const Array< OneD, NekDouble > &alpha, const std::string &type)=0
virtual void v_GetCharIntegral(NekDouble &I, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)=0
void GetW1(NekDouble &W1, const NekDouble &u, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)
virtual void v_GetUFromChars(NekDouble &u, const NekDouble &W1, const NekDouble &W2)=0
Array< OneD, MultiRegions::ExpListSharedPtr > m_vessels
virtual void v_GetPressure(NekDouble &P, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &dAUdx, const NekDouble &gamma=0, const NekDouble &alpha=0.5)=0
void GetJacobianInverse(NekMatrix< NekDouble > &invJ, const Array< OneD, NekDouble > &Au, const Array< OneD, NekDouble > &uu, const Array< OneD, NekDouble > &beta, const Array< OneD, NekDouble > &A0, const Array< OneD, NekDouble > &alpha, const std::string &type)
LibUtilities::SessionReaderSharedPtr m_session
virtual void v_GetC(NekDouble &c, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)=0
void GetUFromChars(NekDouble &u, const NekDouble &W1, const NekDouble &W2)
virtual void v_GetW2(NekDouble &W2, const NekDouble &u, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)=0
void GetAFromChars(NekDouble &A, const NekDouble &W1, const NekDouble &W2, const NekDouble &beta, const NekDouble &A0, const NekDouble &alpha=0.5)
PulseWavePressureArea(Array< OneD, MultiRegions::ExpListSharedPtr > &pVessel, const LibUtilities::SessionReaderSharedPtr &pSession)
virtual void v_GetAFromChars(NekDouble &A, const NekDouble &W1, const NekDouble &W2, const NekDouble &beta, const NekDouble &A0, const NekDouble &alpha=0.5)=0
void GetPressure(NekDouble &P, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &dAUdx, const NekDouble &gamma=0, const NekDouble &alpha=0.5)
std::shared_ptr< SessionReader > SessionReaderSharedPtr
@ beta
Gauss Radau pinned at x=-1,.
Definition: PointsType.h:59
@ P
Monomial polynomials .
Definition: BasisType.h:62
std::shared_ptr< PulseWavePressureArea > PulseWavePressureAreaSharedPtr
LibUtilities::NekFactory< std::string, PulseWavePressureArea, Array< OneD, MultiRegions::ExpListSharedPtr > &, const LibUtilities::SessionReaderSharedPtr & > PressureAreaFactory
PressureAreaFactory & GetPressureAreaFactory()
static PulseWavePressureAreaSharedPtr NullPulseWavePressureAreaSharedPtr
double NekDouble