EVOLUTION: Initialize array du in update_increment().

We do not update all elements of array du(:,:,:,:) in
update_increment(), therefore some of its elements may be NaNs. Make
sure that all elements have arithmetic representation by initializing
du(:,:,:,:) with zeros.

Also, indicate that array du(:,:,:,:) is only output argument.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2015-05-27 17:58:30 -03:00
parent 309b6b2e0b
commit 769e69d704

View File

@ -1909,7 +1909,7 @@ module evolution
! subroutine arguments ! subroutine arguments
! !
type(block_data), pointer , intent(inout) :: pdata type(block_data), pointer , intent(inout) :: pdata
real(kind=8), dimension(nv,im,jm,km), intent(inout) :: du real(kind=8), dimension(nv,im,jm,km), intent( out) :: du
! local variables ! local variables
! !
@ -1933,6 +1933,10 @@ module evolution
dzi = adzi(pdata%meta%level) dzi = adzi(pdata%meta%level)
#endif /* NDIMS == 3 */ #endif /* NDIMS == 3 */
! initialize du
!
du(1:nv,1:im,1:jm,1:km) = 0.0d+00
! calculate the variable update from the directional fluxes ! calculate the variable update from the directional fluxes
! !
do k = kbl, keu do k = kbl, keu