amrvac / AGILE-experimental

MPI-AMRVAC: A Parallel Adaptive Mesh Refinement Framework
https://amrvac.org/
GNU General Public License v3.0
2 stars 1 forks source link

move block loop into finite_volume #19

Open oporth opened 3 weeks ago

oporth commented 3 weeks ago
jhidding commented 3 weeks ago

Reimplement finite_volume subroutine from /src/mod_finite_volume.t. The sCT parameter becomes bgT etc. This replaces the loop in mod_advance.t lines 680:705. The new function is called finite_volume_all. All w(i) references become bg%w(i) where bg%w stores data for all blocks.

!$acc loop parallel
do igrid=1,nleafstail
    call phys_to_primitive(iXI^L, ixI^L, wrpim(:,:,:,igrid), ps(igrid)%x(:,:))
end do

phys_to_primitive may need to be hardwired to hd_to_primitive_gpu from mod_hd_phys. To turn a subroutine into a device function use the !$acc routine directive.

Run agile baseline test case.