-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrevise.f90
executable file
·59 lines (50 loc) · 1.4 KB
/
revise.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
module mod_revise
use mod_cons
use mod_var
implicit none
private
public revise,revisec
contains
!
! Corrects the m_phi to make it consistent
!
subroutine revise(BigQ)
real, intent(in), dimension(0:i1,0:j1,0:k1) :: BigQ
integer :: i,j,k
!
do k=1,kmax
do j=1,jmax
do i=1,imax
!m_x_phi(i,j,k)=m_x_phi(i,j,k)-(1.0-(phi_b(i+1,j,k)+phi_b(i,j,k)-1.0)**2)*&
! (BigQ(i+1,j,k)-BigQ(i,j,k))/dx
!m_y_phi(i,j,k)=m_y_phi(i,j,k)-(1.0-(phi_b(i,j+1,k)+phi_b(i,j,k)-1.0)**2)*&
! (BigQ(i,j+1,k)-BigQ(i,j,k))/dy
!m_z_phi(i,j,k)=m_z_phi(i,j,k)-(1.0-(phi_b(i,j,k+1)+phi_b(i,j,k)-1.0)**2)*&
! (BigQ(i,j,k+1)-BigQ(i,j,k))/dz
m_x_phi(i,j,k)=m_x_phi(i,j,k)-(BigQ(i+1,j,k)-BigQ(i,j,k))/dx
m_y_phi(i,j,k)=m_y_phi(i,j,k)-(BigQ(i,j+1,k)-BigQ(i,j,k))/dy
m_z_phi(i,j,k)=m_z_phi(i,j,k)-(BigQ(i,j,k+1)-BigQ(i,j,k))/dz
enddo
enddo
enddo
!
return
end subroutine revise
!
subroutine revisec(BigQ)
real, intent(in), dimension(0:i1,0:j1,0:k1) :: BigQ
integer :: i,j,k
!
do k=1,kmax
do j=1,jmax
do i=1,imax
m_x_phi_c(i,j,k)=m_x_phi_c(i,j,k)-(BigQ(i+1,j,k)-BigQ(i,j,k))/dx
m_y_phi_c(i,j,k)=m_y_phi_c(i,j,k)-(BigQ(i,j+1,k)-BigQ(i,j,k))/dy
m_z_phi_c(i,j,k)=m_z_phi_c(i,j,k)-(BigQ(i,j,k+1)-BigQ(i,j,k))/dz
enddo
enddo
enddo
!
return
end subroutine revisec
end module mod_revise