Skip to content

Commit 9c24e09

Browse files
committed
Merge branch 'hack_doconcurrent' of github.com:xcompact3d/x3div into hack_doconcurrent
2 parents 0c9310b + eac03e4 commit 9c24e09

File tree

3 files changed

+725
-3
lines changed

3 files changed

+725
-3
lines changed

src/parameters.f90

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@ subroutine parameter()
116116
dy2 = dy * dy
117117
dz2 = dz * dz
118118

119-
xnu=one/re
119+
if (abs(re) > epsilon(re)) then
120+
xnu = one / re
121+
else
122+
xnu = zero
123+
endif
120124

121125
anglex = sin(pi*angle/180._mytype)
122126
angley = cos(pi*angle/180._mytype)

src/thomas.f90

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,17 @@ subroutine zthomas_12(tt, ff, fs, fw, nx, ny, nz)
202202

203203
end subroutine zthomas_12
204204

205-
! Thomas algorithm for a 1D vector
206-
subroutine thomas1d(tt, ff, fs, fw, nn)
205+
!
206+
! Thomas algorithm for a 1D vector (solve My = x with tri-diagonal M)
207+
! See comments in the subroutine prepare (x3d_operator_1d.f90)
208+
!
209+
! tt, inout, vector x and y
210+
! ff, in, upper diagonal of the tri-diagonal matrix
211+
! fs, in, used during the forward step
212+
! fw, in, used during the backward step
213+
! nn, in, size of the vector
214+
!
215+
pure subroutine thomas1d(tt, ff, fs, fw, nn)
207216

208217
implicit none
209218

0 commit comments

Comments
 (0)