You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the ref_ratio is a vector of IntVect's and can theoretically allow for non-uniform refinement in each direction. However, in the Fortran interface routine "F_Interfaces/AmrCore/AMReX_FAmrCore.cpp" there is an explicit check to make sure that the refinement ratio is uniform in all directions. Going on a hunch that this was because there were no Fortran interfaces that allow for non-uniform refinement ratios, I created new Fortran interfaces for amrex_average_down, amrex_fillpatch, and amrex_fillcoarsepatch to allow for a vector definition of ref_ratio (rr is passed in as a pointer which is then assigned to an IntVect which then uses the default C/C++ interfaces). However, I think there are some more subtleties that I'm missing because I can't refine more than 1 or 2 levels without getting NaN and Inf values. Can the pure C++ version of AMReX use non-uniform refinement ratios and if so, what do I need to account for when using the Fortran interfaces (non-uniform blocking factors, non-uniform ghost cells during multi-fab construction, etc.)? I'm not adverse to adding/modifying Fortran interfaces if that is the only issue. I'm using the current 24.02 tagged version.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I noticed that the ref_ratio is a vector of IntVect's and can theoretically allow for non-uniform refinement in each direction. However, in the Fortran interface routine "F_Interfaces/AmrCore/AMReX_FAmrCore.cpp" there is an explicit check to make sure that the refinement ratio is uniform in all directions. Going on a hunch that this was because there were no Fortran interfaces that allow for non-uniform refinement ratios, I created new Fortran interfaces for amrex_average_down, amrex_fillpatch, and amrex_fillcoarsepatch to allow for a vector definition of ref_ratio (rr is passed in as a pointer which is then assigned to an IntVect which then uses the default C/C++ interfaces). However, I think there are some more subtleties that I'm missing because I can't refine more than 1 or 2 levels without getting NaN and Inf values. Can the pure C++ version of AMReX use non-uniform refinement ratios and if so, what do I need to account for when using the Fortran interfaces (non-uniform blocking factors, non-uniform ghost cells during multi-fab construction, etc.)? I'm not adverse to adding/modifying Fortran interfaces if that is the only issue. I'm using the current 24.02 tagged version.
Thanks,
John
Beta Was this translation helpful? Give feedback.
All reactions