Merge branch 'master' into flux-tubes
This commit is contained in:
commit
2271b69255
@ -1247,7 +1247,7 @@ module evolution
|
||||
allocate(s(n,3))
|
||||
s(:,:) = 0.0d+00
|
||||
|
||||
fnorm = 1.0d+00 / (get_nleafs() * size(sc))
|
||||
fnorm = (1.0d+00 / nc)**NDIMS / nf / get_nleafs()
|
||||
|
||||
d(:) = 0.0d+00
|
||||
|
||||
@ -1261,13 +1261,13 @@ module evolution
|
||||
#if NDIMS == 3
|
||||
sc(:,:,:,:) = atol + rtol * abs(pdata%uu(1:nf,nb:ne,nb:ne,nb:ne,1))
|
||||
|
||||
s(l,1) = sum((pdata%uu(1:nf,nb:ne,nb:ne,nb:ne,1) / sc(:,:,:,:))**2)
|
||||
s(l,2) = sum((pdata%du(1:nf,nb:ne,nb:ne,nb:ne) / sc(:,:,:,:))**2)
|
||||
s(l,1) = sum(fnorm * (pdata%uu(1:nf,nb:ne,nb:ne,nb:ne,1) / sc(:,:,:,:))**2)
|
||||
s(l,2) = sum(fnorm * (pdata%du(1:nf,nb:ne,nb:ne,nb:ne) / sc(:,:,:,:))**2)
|
||||
#else /* NDIMS == 3 */
|
||||
sc(:,:,:,:) = atol + rtol * abs(pdata%uu(1:nf,nb:ne,nb:ne, : ,1))
|
||||
|
||||
s(l,1) = sum((pdata%uu(1:nf,nb:ne,nb:ne, : ,1) / sc(:,:,:,:))**2)
|
||||
s(l,2) = sum((pdata%du(1:nf,nb:ne,nb:ne, : ) / sc(:,:,:,:))**2)
|
||||
s(l,1) = sum(fnorm * (pdata%uu(1:nf,nb:ne,nb:ne, : ,1) / sc(:,:,:,:))**2)
|
||||
s(l,2) = sum(fnorm * (pdata%du(1:nf,nb:ne,nb:ne, : ) / sc(:,:,:,:))**2)
|
||||
#endif /* NDIMS == 3 */
|
||||
|
||||
pdata%u => pdata%uu(:,:,:,:,2)
|
||||
@ -1280,7 +1280,7 @@ module evolution
|
||||
call reduce_sum(d(1:2))
|
||||
#endif /* MPI */
|
||||
|
||||
d(1:2) = sqrt(fnorm * d(1:2))
|
||||
d(1:2) = sqrt(d(1:2))
|
||||
|
||||
if (minval(d(1:2)) >= 1.0d-05) then
|
||||
h0 = min(dt, 1.0d-02 * d(1) / d(2))
|
||||
@ -1338,7 +1338,7 @@ module evolution
|
||||
#else /* NDIMS == 3 */
|
||||
df(:,:,:,:) = df(:,:,:,:) - pdata%du(1:nf,nb:ne,nb:ne, : )
|
||||
#endif /* NDIMS == 3 */
|
||||
s(l,3) = sum((df(:,:,:,:) / sc(:,:,:,:))**2)
|
||||
s(l,3) = sum(fnorm * (df(:,:,:,:) / sc(:,:,:,:))**2)
|
||||
end do
|
||||
!$omp end parallel do
|
||||
d(3) = sum(s(:,3))
|
||||
@ -1348,7 +1348,7 @@ module evolution
|
||||
call reduce_sum(d(3:3))
|
||||
#endif /* MPI */
|
||||
|
||||
d(3) = sqrt(fnorm * d(3)) / h0
|
||||
d(3) = sqrt(d(3)) / h0
|
||||
|
||||
h1 = max(d(2), d(3))
|
||||
if (h1 > 1.0d-15) then
|
||||
|
Loading…
x
Reference in New Issue
Block a user