Merge branch 'master' into reconnection
This commit is contained in:
commit
6cf83a3fb4
@ -1125,6 +1125,7 @@ module equations
|
|||||||
! temporary variables
|
! temporary variables
|
||||||
!
|
!
|
||||||
character(len=255) :: msg
|
character(len=255) :: msg
|
||||||
|
character(len=16) :: sid, snc
|
||||||
integer :: n, p, nc, np
|
integer :: n, p, nc, np
|
||||||
integer :: i, il, iu
|
integer :: i, il, iu
|
||||||
integer :: j, jl, ju
|
integer :: j, jl, ju
|
||||||
@ -1162,7 +1163,10 @@ module equations
|
|||||||
|
|
||||||
! inform about the encountered unphysical states
|
! inform about the encountered unphysical states
|
||||||
!
|
!
|
||||||
write(msg,'(i4,1x,a,1x,i6)') nc, "unphysical states in block", id
|
write(sid,'(i15)') id
|
||||||
|
write(snc,'(i15)') nc
|
||||||
|
write(msg,'("Unphysical cells in block ID:",a," (",a," counted)")') &
|
||||||
|
trim(sid), trim(snc)
|
||||||
call print_warning(loc, trim(msg))
|
call print_warning(loc, trim(msg))
|
||||||
|
|
||||||
! allocate temporary vectors for unphysical states
|
! allocate temporary vectors for unphysical states
|
||||||
@ -1184,12 +1188,12 @@ module equations
|
|||||||
|
|
||||||
idx(:,n) = (/ i, j, k /)
|
idx(:,n) = (/ i, j, k /)
|
||||||
|
|
||||||
! increase the region until we find at least two physical cells, but no more
|
! increase the region until we find at least three physical cells, but no more
|
||||||
! than 2 cells away
|
! than 4 cells away
|
||||||
!
|
!
|
||||||
np = 0
|
np = 0
|
||||||
p = 1
|
p = 1
|
||||||
do while (np < 2 .and. p <= 4)
|
do while (np <= 2 .and. p <= 4)
|
||||||
il = max( 1, i - p)
|
il = max( 1, i - p)
|
||||||
iu = min(im, i + p)
|
iu = min(im, i + p)
|
||||||
jl = max( 1, j - p)
|
jl = max( 1, j - p)
|
||||||
@ -1204,7 +1208,7 @@ module equations
|
|||||||
|
|
||||||
! average primitive variables
|
! average primitive variables
|
||||||
!
|
!
|
||||||
if (np >= 2) then
|
if (np > 2) then
|
||||||
|
|
||||||
do p = 1, nv
|
do p = 1, nv
|
||||||
q(p,n) = sum(qq(p,il:iu,jl:ju,kl:ku), &
|
q(p,n) = sum(qq(p,il:iu,jl:ju,kl:ku), &
|
||||||
@ -1216,9 +1220,9 @@ module equations
|
|||||||
|
|
||||||
! print error, since no physical cells found for averaging
|
! print error, since no physical cells found for averaging
|
||||||
!
|
!
|
||||||
write(msg,'(a,a)') &
|
write(msg,'(a,1x,a)') &
|
||||||
"Not sufficient number of physical cells found!" &
|
"Cannot correct the unphysical cell." &
|
||||||
, "Cannot correct the unphysical cell."
|
, "Not sufficient number of physical neighbors!"
|
||||||
call print_error(loc, trim(msg))
|
call print_error(loc, trim(msg))
|
||||||
stop
|
stop
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user