Average_down with nodal Multifabs in Fortran #2010
Unanswered
LordOfBunnies
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on writing a Lattice Boltzmann Method (LBM) code with AMR using Amrex. LBM is (generally) node based, so I need a way to fill in the coarser levels. The basic options for amrex_average_down in amrex_multifabutil_mod.f90, don't allow for any kind of nodal multifabs. I was able to modify a few files to get Amrex to accept the nodal multifabs from Fortran, but it's producing junk. It seems to be averaging across all of the coarse nodes and occasionally producing extremely large values (on the order of 1E29 and above).
I code primarily in Fortran, and I'm not as familiar with C++. I've attached the primary modified files. I'm using rr to pass an array from my test code (passing it (/2,2,2/) from Fortran), but getting the nodal average_down version requires an array.
So, a few questions:
Did I goof up in my coding?
Is there a way for average_down to produce good nodal results starting from Fortran?
How do I get Amrex to print out data (I'm using a test code right now) to see what is going wrong? Even printing out the results at every step of the averaging might help.
Is there another way to get the data onto the coarser grids which I don't know?
Thank you ahead of time.
AMReX_multifabutil_fi_save.txt
AMReX_multifabutil_mod_wnodal.txt
Beta Was this translation helpful? Give feedback.
All reactions