-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable FFT Mac projector #1381
base: main
Are you sure you want to change the base?
Enable FFT Mac projector #1381
Conversation
@moprak-nrel do you think you could test this branch with that case you were running? |
I think you will need to use |
Or does AMReX have one you can use? |
@WeiqunZhang does anyone parse a user option for |
No, there is no runtime parameter in amrex or amrex-hydro for using fft for mac projection. Here, |
I can confirm that with this PR, building Notice how Here is also the output from a single timestep,
without FFT:
|
We need to decide how to proceed with the regtests/cdash; with this PR, by default, the MAC projections will use FFT (when applicable) when amr-wind is built with I had to explicitly add |
Can you add that case as a regtest with the kind of guard we use for netcdf for example? |
As a quick verification test, I ran the burggraf flow reg test (with
Without FFT:
|
…amr-wind is build with fft support)
m_fft_mac_proj = std::make_unique<Hydro::FFTMacProjector>( | ||
m_repo.mesh().Geom(0), lobc, hibc); | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like if the user has requested fft, but it is not possible to use, there is no warning or abort to notify the user that it is not being used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I can add a warning conditional on the input file having mac_proj.use_fft = 1
. That would distinguish FFT being automatically enabled/disabled appropriately when AMR-Wind is compiled with FFT vs a user explicitly requesting to use FFT.
m_mac_proj->setUMAC(mac_vec); | ||
#ifdef AMR_WIND_USE_FFT | ||
if (m_fft_mac_proj) { | ||
m_fft_mac_proj->setUMAC(mac_vec[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did the usage of this change? the 0 index seems odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I guess this is because the FFT is restricted to single level. A comment may be instructive here, especially to avoid it getting accidentally copy-pasted in the future
Summary
Enable FFT Mac projector. Needs to go in after #1371.
Pull request type
Please check the type of change introduced:
Checklist
The following is included:
This PR was tested by running:
Co-authored-by: prakash [email protected]
Thanks to @WeiqunZhang for the patch!