Exawind / amr-wind

AMReX-based structured wind solver
https://exawind.github.io/amr-wind
Other
103 stars 78 forks source link

Replace mfiter loops with the MF parallel for versions #1069

Open marchdf opened 1 month ago

marchdf commented 1 month ago

Summary

Replace mfiter loops with the MF parallel for versions. These take care of a bunch of defaults for use, creates fused parallelfors for the GPU (nominally results in faster code), and generally simplifies the code.

I am looking for volunteers. I have annotated all the mfiter loops that can be simplified. I probably missed some and some might not be doable on a second glance. I did a couple to show how it is done and there are other examples in the code.

Annotations are // this one for mfiter loop canditates.

Also identified // needs openmp pragma? for loops not containing openmp and that maybe should.

I am using clang-format 18 to format the code, which causes the formatting check to break. But I am going to leave that alone so we don't waste resources and will fix the formatting later.

Pull request type

Please check the type of change introduced:

Checklist

This PR was tested by running: