Use a pointer to the data structure in prolong_block().
This commit is contained in:
parent
8ae2964b4f
commit
d4e6f7d0ee
15
src/mesh.F90
15
src/mesh.F90
@ -807,7 +807,7 @@ module mesh
|
||||
!
|
||||
subroutine prolong_block(pblock)
|
||||
|
||||
use blocks , only : block_meta, nchild, nfl, nqt
|
||||
use blocks , only : block_meta, block_data, nchild, nfl, nqt
|
||||
#ifdef MHD
|
||||
use blocks , only : ibx, iby, ibz
|
||||
#endif /* MHD */
|
||||
@ -840,9 +840,14 @@ module mesh
|
||||
! local pointers
|
||||
!
|
||||
type(block_meta), pointer :: pchild
|
||||
type(block_data), pointer :: pdata
|
||||
|
||||
!-------------------------------------------------------------------------------
|
||||
!
|
||||
! assign the pdata pointer
|
||||
!
|
||||
pdata => pblock%data
|
||||
|
||||
! prepare dimensions
|
||||
!
|
||||
dm(:) = (/ im, jm, km /)
|
||||
@ -861,7 +866,7 @@ module mesh
|
||||
! expand all variables and place them in the array u
|
||||
!
|
||||
do q = 1, nfl
|
||||
call expand(dm, fm, ng, pblock%data%u(q,:,:,:), u(q,:,:,:), 't', 't', 't')
|
||||
call expand(dm, fm, ng, pdata%u(q,:,:,:), u(q,:,:,:), 't', 't', 't')
|
||||
end do
|
||||
|
||||
#ifdef MHD
|
||||
@ -869,16 +874,14 @@ module mesh
|
||||
! expand the cell centered magnetic field components
|
||||
!
|
||||
do q = ibx, ibz
|
||||
call expand(dm, fm, ng, pblock%data%u(q,:,:,:), u(q,:,:,:), 't', 't', 't')
|
||||
call expand(dm, fm, ng, pdata%u(q,:,:,:), u(q,:,:,:), 't', 't', 't')
|
||||
end do
|
||||
#endif /* FIELDCD */
|
||||
#ifdef FLUXCT
|
||||
! expand the staggered magnetic field components preserving divergence-free
|
||||
! condition
|
||||
!
|
||||
call expand_mag(dm, fm, ng, pblock%data%u(ibx,:,:,:) &
|
||||
, pblock%data%u(iby,:,:,:) &
|
||||
, pblock%data%u(ibz,:,:,:) &
|
||||
call expand_mag(dm, fm, ng, pdata%u(ibx,:,:,:), pdata%u(iby,:,:,:), pdata%u(ibz,:,:,:) &
|
||||
, u(ibx,:,:,:), u(iby,:,:,:), u(ibz,:,:,:))
|
||||
#endif /* FLUXCT */
|
||||
#endif /* MHD */
|
||||
|
Loading…
x
Reference in New Issue
Block a user