49 : m_modelType(linerType), m_w0(w0), m_wI(wI), m_u0(u0), m_uI(uI)
65 for (
short i = 0; i < sizeF; ++i)
70 if (
m_A[sizeF - 1] != 1.0)
77 NekDouble iV_real =
m_A[0], iV_imag = 0.0, iV_mod = 0.0, lastImag = 0.0;
80 iV_real = iV_real +
m_A[k] * std::pow(
m_w0, k) * std::pow(-1.0, k / 2);
81 iV_imag = iV_imag +
m_A[k] * std::pow(
m_wI, k) * std::pow(-1.0, k / 2);
86 iV_imag +
m_A[k] * std::pow(
m_w0, k) * std::pow(-1.0, (k - 1) / 2);
88 iV_real +
m_A[k] * std::pow(
m_wI, k) * std::pow(-1.0, (k + 1) / 2);
90 iV_mod = 1.0 / (std::pow(iV_real, 2.0) + std::pow(iV_imag, 2.0));
91 iV_real = iV_real * iV_mod;
92 iV_imag = -iV_imag * iV_mod;
95 iV_real = iV_real *
m_u0 - iV_imag *
m_uI;
96 iV_imag = iV_real *
m_uI + iV_imag *
m_u0;
102 for (
short i = 0; i < nBC; ++i)
106 for (
short j = 0; j < nPnt[i]; ++j)
118 nExp, -
m_U[i][j][k - 1][0] *
m_wI - lastImag *
m_w0);
119 lastImag =
m_U[i][j][k - 1][0] *
m_w0 - lastImag *
m_wI;
129 "RungeKutta",
"", 4, {});
147 if (intTime == 0.0 &&
m_u0 == 0.0)
153 &
m_U[bound][point][i][0], 1, &
m_U[bound][point][i][0],
166 for (
int j = 0; j <
m_U.size(); ++j)
168 for (
int k = 0; k <
m_U[j].size(); ++k)
170 for (
int i = 1; i <
m_y[j][k].size(); ++i)
173 &
m_U[j][k][i][0], 1);
191 &
m_y[bound][point][1 + i][0], 1, &bsum[0], 1, &bsum[0], 1);
214 Vmath::Vcopy(inx[i].size(), &inx[i + 1][0], 1, &outx[i][0], 1);
219 Vmath::Vsub(inx[0].size(), &inx[0][0], 1, &asum[0], 1,
231 for (
int i = 0; i < inx.size(); ++i)
233 Vmath::Vcopy(inx[i].size(), &inx[i][0], 1, &outx[i][0], 1);
tBasePtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
void DefineProjection(FuncPointerT func, ObjectPointerT obj)
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
unsigned int GetDimension() const
Returns the number of dimensions for the point.
LibUtilities::TimeIntegrationSchemeSharedPtr m_timeScheme
NekVector< NekDouble > m_A
Array< OneD, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > > m_U
void InitObject(Array< OneD, NekDouble > &A, Array< OneD, NekDouble > &B, short sizeF, int nBC, Array< OneD, int > &nPnt, int nExp)
Initialization object for the AcousticSystem class.
PerforatedPlate(int linerType, NekDouble w0, NekDouble wI, NekDouble u0, NekDouble uI)
void LinerOperator(const Array< OneD, const Array< OneD, NekDouble > > &inx, Array< OneD, Array< OneD, NekDouble > > &outx, const NekDouble time)
Operator used for the ODE time integration.
void LinerProjection(const Array< OneD, Array< OneD, NekDouble > > &inx, Array< OneD, Array< OneD, NekDouble > > &outx, const NekDouble time)
Operator used for the ODE time integration.
Array< OneD, NekDouble > LinerOutput(int bound, int point, const NekDouble *u, const NekDouble intTime, const NekDouble simdt)
Function to compute the pressure jump across the perforated plate for a given value of the acoustic v...
Array< OneD, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > > m_y
NekVector< NekDouble > m_B
LibUtilities::TimeIntegrationSchemeOperators m_ODE
TimeIntegrationSchemeFactory & GetTimeIntegrationSchemeFactory()
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Svtvp (scalar times vector plus vector): z = alpha*x + y.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
void Zero(int n, T *x, const int incx)
Zero vector.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.