HiFiLES / HiFiLES-solver

High Fidelity Large Eddy Simulation Solver
Other
167 stars 130 forks source link

Question about the method "compute_modal_filter_1d" #65

Closed bizhishui closed 8 years ago

bizhishui commented 9 years ago

Hi all, I'm not sure about the procedure in constructing the "filter_upts" matrix via "inefficient matrix multiplication" (func.cpp). According the definition of "cblas_dgemm", the last two lines in that method should be: mtemp = mult_arrays(vandermonde,modal); filter_upts = mult_arrays(mtemp,inv_vandermonde); ???

Best regards Maxime

mlopez14 commented 9 years ago

Maxime, you bring a good point.

Multiplying by the inverse Vandermonde matrix yields the modal coefficients. As we have nodal data, that should be the first multiplication.

The result should then be multiplied by the Vandermonde matrix to recover the nodal data.

This then reveals that the order in the cblas_dgemm calls is incorrect, the order in the "inefficient matrix multiplication" is correct.

We'll correct it as soon as we make sure this interpretation is right.

bizhishui commented 9 years ago

Hi mlopez14, Thanks for your reply.

Best regards Maxime

jrbull commented 9 years ago

Maxime, You are indeed correct about the order of the multiplications. I have corrected the bug in a branch but have not yet merged it into the master. We will commit a fix to the master shortly.

Regards, Jonathan

Postdoctoral Scholar Dept of Aero/Astro Engineering Stanford University

On Jun 8, 2015, at 8:11 AM, jmaximelv notifications@github.com wrote:

Hi mlopez14, Thanks for your reply.

Best regards Maxime

— Reply to this email directly or view it on GitHub.

bizhishui commented 9 years ago

Hi Jonathan, Thanks for your attention for my question! So which mode is correct? The Blas mode or the inefficient matrix multiplication mode? And if there are some papers for this kind of filter? Thanks!

Best regards, Maxime

jrbull commented 9 years ago

Maxime, The BLAS mode is correct. If you don’t have BLAS, the 'inefficient matrix multiplication’ should read:

mtemp = mult_arrays(vandermonde,modal); filter_upts = mult_arrays(mtemp,inv_vandermonde);

as you suggested yourself. The theory behind modal filtering is covered in several papers, including: Blackburn and Schmidt (2003) 'Spectral element filtering techniques for large eddy simulation with dynamic estimation'

It is referred to as 'Low-pass spectral filtering via matrix–vector polynomial transform’

I hope that answers your questions. Regards, Jonathan

Postdoctoral Scholar Dept of Aero/Astro Engineering Stanford University

On Jul 9, 2015, at 5:42 PM, jmaximelv notifications@github.com wrote:

Hi Jonathan, Thanks for your attention for my question! So which mode is correct? The Blas mode or the inefficient matrix multiplication mode? And if there are some papers for this kind of filter? Thanks!

Best regards, Maxime

— Reply to this email directly or view it on GitHub.

bizhishui commented 9 years ago

Thanks! Jonathan.

Best regards, Maxime