Skip to content
Snippets Groups Projects
Commit 204d84ac authored by Jacques Xing's avatar Jacques Xing Committed by Dave Moxey
Browse files

Add missing m_ prefix to member variables in FFTW

parent 05ac944a
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,7 @@ v5.3.0
- Add DIRKOrder1, BDFImplicitOrder3, BDFImplicitOrder4, RungeKutta1, and RungeKutta3 schemes to the register (!1485)
- Use DIRK (instead of IMEXdirk) schemes for the start-up phase of high-order BDF and AM schemes (!1485).
- Reduced memory usage in the FilterHistoryPoint (!1458)
- Add missing m_ prefix to member variables in FFTW (!1504)
**Python**
- Add wrappers for Interpreter and Equation classes (!1329)
......
......@@ -45,14 +45,14 @@ std::string NekFFTW::className =
NekFFTW::NekFFTW(int N) : NektarFFT(N)
{
m_wsp = Array<OneD, NekDouble>(m_N);
phys = Array<OneD, NekDouble>(m_N);
coef = Array<OneD, NekDouble>(m_N);
m_wsp = Array<OneD, NekDouble>(m_N);
m_phys = Array<OneD, NekDouble>(m_N);
m_coef = Array<OneD, NekDouble>(m_N);
plan_forward =
fftw_plan_r2r_1d(m_N, &phys[0], &coef[0], FFTW_R2HC, FFTW_ESTIMATE);
plan_backward =
fftw_plan_r2r_1d(m_N, &coef[0], &phys[0], FFTW_HC2R, FFTW_ESTIMATE);
m_plan_forward =
fftw_plan_r2r_1d(m_N, &m_phys[0], &m_coef[0], FFTW_R2HC, FFTW_ESTIMATE);
m_plan_backward =
fftw_plan_r2r_1d(m_N, &m_coef[0], &m_phys[0], FFTW_HC2R, FFTW_ESTIMATE);
m_FFTW_w = Array<OneD, NekDouble>(m_N);
m_FFTW_w_inv = Array<OneD, NekDouble>(m_N);
......@@ -79,26 +79,26 @@ NekFFTW::~NekFFTW()
void NekFFTW::v_FFTFwdTrans(Array<OneD, NekDouble> &inarray,
Array<OneD, NekDouble> &outarray)
{
Vmath::Vcopy(m_N, inarray, 1, phys, 1);
Vmath::Vcopy(m_N, inarray, 1, m_phys, 1);
fftw_execute(plan_forward);
fftw_execute(m_plan_forward);
Reshuffle_FFTW2Nek(coef);
Reshuffle_FFTW2Nek(m_coef);
Vmath::Vcopy(m_N, coef, 1, outarray, 1);
Vmath::Vcopy(m_N, m_coef, 1, outarray, 1);
}
// Backward transformation
void NekFFTW::v_FFTBwdTrans(Array<OneD, NekDouble> &inarray,
Array<OneD, NekDouble> &outarray)
{
Vmath::Vcopy(m_N, inarray, 1, coef, 1);
Vmath::Vcopy(m_N, inarray, 1, m_coef, 1);
Reshuffle_Nek2FFTW(coef);
Reshuffle_Nek2FFTW(m_coef);
fftw_execute(plan_backward);
fftw_execute(m_plan_backward);
Vmath::Vcopy(m_N, phys, 1, outarray, 1);
Vmath::Vcopy(m_N, m_phys, 1, outarray, 1);
}
// Reshuffle FFTW2Nek
......
......@@ -81,13 +81,13 @@ protected:
Array<OneD, NekDouble>
m_FFTW_w_inv; // weights to convert arrays from FFTW to Nektar++ format
Array<OneD, NekDouble> phys;
Array<OneD, NekDouble> coef;
Array<OneD, NekDouble> m_phys;
Array<OneD, NekDouble> m_coef;
Array<OneD, NekDouble> m_wsp; // Workspace area for transforms
fftw_plan plan_backward; // plan to execute a backward FFT in FFTW
fftw_plan plan_forward; // plan to execute a forward FFT in FFTW
fftw_plan m_plan_backward; // plan to execute a backward FFT in FFTW
fftw_plan m_plan_forward; // plan to execute a forward FFT in FFTW
/**
* Reshuffling routines to put the coefficients in Nektar++/FFTW format.
* The routines take as an input the number of points N, the vector of
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment