EVOLUTION: Improve the conservation in the SSPRK3(2)4 method.
The 4th step produced errors large enought to give significant conservation errors. Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
03e99457cc
commit
39c3cdf7a4
@ -3036,9 +3036,6 @@ module evolution
|
||||
integer :: i, l, n, nrej, status
|
||||
real(kind=8) :: tm, dtm, dh, fc
|
||||
|
||||
real(kind=8), parameter :: onethird = 1.0d+00 / 3.0d+00, &
|
||||
twothird = 2.0d+00 / 3.0d+00
|
||||
|
||||
character(len=*), parameter :: loc = 'EVOLUTION:evolve_ssp324()'
|
||||
|
||||
!-------------------------------------------------------------------------------
|
||||
@ -3113,10 +3110,10 @@ module evolution
|
||||
do l = 1, n
|
||||
pdata => data_blocks(l)%ptr
|
||||
|
||||
pdata%uu(:,:,:,:,3) = onethird * pdata%uu(:,:,:,:,1) &
|
||||
+ twothird * pdata%uu(:,:,:,:,2)
|
||||
pdata%uu(:,:,:,:,2) = twothird * pdata%uu(:,:,:,:,1) &
|
||||
+ onethird * pdata%uu(:,:,:,:,2)
|
||||
pdata%uu(:,:,:,:,3) = ( pdata%uu(:,:,:,:,1) &
|
||||
+ 2.0d+00 * pdata%uu(:,:,:,:,2)) / 3.0d+00
|
||||
pdata%uu(:,:,:,:,2) = (2.0d+00 * pdata%uu(:,:,:,:,1) &
|
||||
+ pdata%uu(:,:,:,:,2)) / 3.0d+00
|
||||
end do
|
||||
!$omp end parallel do
|
||||
|
||||
@ -3224,8 +3221,8 @@ module evolution
|
||||
|
||||
call update_variables(tm, dtm, status)
|
||||
if (status /= 0) &
|
||||
call print_message(loc, "Possible bug: the revert to " // &
|
||||
"the previous state found it unphysical.")
|
||||
call print_message(loc, "Possible bug: " // &
|
||||
"the previous state seems unphysical.")
|
||||
end if
|
||||
|
||||
niterations = niterations + 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user