Skip to content

Commit 6f779bf

Browse files
committed
debugging
1 parent 5c12c08 commit 6f779bf

File tree

5 files changed

+26
-34
lines changed

5 files changed

+26
-34
lines changed

src/Model/ParticleTracking/prt-prp.f90

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,6 @@ subroutine release(this, ip, trelease)
429429

430430
! Accumulate mass for release point
431431
this%rptm(ip) = this%rptm(ip) + DONE
432-
433-
print *, "released particle: ", ip
434-
435432
end subroutine release
436433

437434
subroutine initialize_particle(this, particle, ip, trelease)

src/Solution/ParticleTracker/Method.f90

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ subroutine save(this, particle, reason)
188188
end if
189189

190190
call this%trackctl%save(particle, kper=per, kstp=stp, reason=reason)
191-
print *, "saving"
192-
! if (kper == 3) stop
193191

194192
end subroutine save
195193

@@ -267,7 +265,6 @@ subroutine check(this, particle, cell_defn)
267265
! dry particle
268266
if (particle%idrymeth == 0) then
269267
! drop to water table
270-
print *, "dropping"
271268
particle%z = cell_defn%top
272269
call this%save(particle, reason=1)
273270
else if (particle%idrymeth == 1) then

src/Solution/ParticleTracker/MethodCellTernary.f90

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module MethodCellTernaryModule
99
use SubcellTriModule, only: SubcellTriType, create_subcell_tri
1010
use ParticleModule
1111
use GeomUtilModule, only: area
12-
use ConstantsModule, only: DZERO, DONE, DTWO
12+
use ConstantsModule, only: DZERO, DONE, DTWO, DSIX
1313
implicit none
1414

1515
private
@@ -139,18 +139,6 @@ subroutine pass_mct(this, particle)
139139
inface = this%nverts + 3
140140
end select
141141

142-
print *, "--------", isc, particle%iscp, exitFace, particle%iscefp
143-
! if (inface /= exitFace .and. isc == particle%iscp .and. exitFace == particle%iscefp) then
144-
! print *, 'subcell cycle, terminating'
145-
! particle%advancing = .false.
146-
! particle%idomain(3) = particle%iscp
147-
! particle%istatus = 2
148-
! call this%save(particle, reason=3)
149-
! else
150-
! particle%iscp = particle%idomain(3)
151-
! particle%iscefp = exitFace
152-
! end if
153-
154142
if (inface .eq. -1) then
155143
particle%iboundary(2) = 0
156144
else if (inface .eq. 0) then
@@ -278,6 +266,9 @@ subroutine load_subcell(this, particle, subcell)
278266
y1 = this%yvertnext(iv0)
279267
x2 = this%xctr
280268
y2 = this%yctr
269+
270+
print *, "subcell in load_subcell: ", ic, isc, x0, y0, x1, y1, x2, y2
271+
281272
x1rel = x1 - x0
282273
y1rel = y1 - y0
283274
x2rel = x2 - x0
@@ -410,12 +401,23 @@ subroutine vertvelo(this)
410401
! Cell area
411402
areacell = area(this%xvert, this%yvert)
412403

404+
print *, "areacell in vertvelo:, ", areacell
405+
413406
! Cell centroid (in general, this is NOT the average of the vertex coordinates)
414-
sixa = areacell * 6.d0
407+
sixa = areacell * DSIX
415408
wk1 = -(this%xvert * this%yvertnext - this%xvertnext * this%yvert)
409+
410+
print *, "xvert in vertvelo: ", this%xvert
411+
print *, "yvert in vertvelo: ", this%yvert
412+
print *, "xvertnext in vertvelo: ", this%xvertnext
413+
print *, "yvertnext in vertvelo: ", this%yvertnext
414+
416415
this%xctr = sum((this%xvert + this%xvertnext) * wk1) / sixa
417416
this%yctr = sum((this%yvert + this%yvertnext) * wk1) / sixa
418417

418+
print *, "xctr in vertvelo: ", this%xctr
419+
print *, "yctr in vertvelo: ", this%yctr
420+
419421
! Subcell areas
420422
do i = 1, this%nverts
421423
xvals(1) = this%xvert(i)

src/Solution/ParticleTracker/MethodSubcellTernary.f90

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ end subroutine apply_mst
6262

6363
!> @brief Track a particle across a triangular subcell.
6464
subroutine track_subcell(this, subcell, particle, tmax)
65+
! modules
66+
use TdisModule, only: kper, kstp
6567
! dummy
6668
class(MethodSubcellTernaryType), intent(inout) :: this
6769
class(SubcellTriType), intent(in) :: subcell
@@ -164,6 +166,8 @@ subroutine track_subcell(this, subcell, particle, tmax)
164166
vzbot = subcell%vzbot
165167
vztop = subcell%vztop
166168

169+
print *, "subcell in track_subcell: ", subcell%icell, subcell%isubcell, x0, y0, x1, y1, x2, y2
170+
167171
! Transform coordinates to the "canonical" configuration:
168172
! barycentric in two dimensions with alpha, beta & gamma
169173
! such that at f2 alpha = 0, f0 beta = 0, f1 gamma = 0.
@@ -215,13 +219,11 @@ subroutine track_subcell(this, subcell, particle, tmax)
215219
! considering only the velocity component in the direction of
216220
! the face. Then compute the particle's exit time.
217221
if (itrifaceexit /= 0) then
218-
print *, "exit thru side"
219222
! Exit through lateral subcell face
220223
exitFace = itrifaceexit
221224
dtexit = dtexitxy
222225
else if (dtexitz < dtexitxy) then
223226
! Exit through top or bottom
224-
print *, "exit thru top or bottom"
225227
if (itopbotexit == -1) then
226228
exitFace = 4
227229
else
@@ -232,16 +234,6 @@ subroutine track_subcell(this, subcell, particle, tmax)
232234
texit = particle%ttrack + dtexit
233235
t0 = particle%ttrack
234236

235-
! ! don't allow a particle to return to the subcell was just in
236-
! if (particle%idomain(2) == particle%icp .and. particle%idomain(3) == particle%iscp) then
237-
! print *, "isc: ", particle%idomain(3)
238-
! particle%idomain(3) = particle%iscp
239-
! particle%istatus = 5
240-
! particle%advancing = .false.
241-
! call this%save(particle, reason=3)
242-
! return
243-
! end if
244-
245237
! Select user tracking times to solve. If this is the first time step
246238
! of the simulation, include all times before it begins; if it is the
247239
! last time step include all times after it ends only if the 'extend'
@@ -302,8 +294,11 @@ subroutine track_subcell(this, subcell, particle, tmax)
302294
! save previous subcell id and exit face
303295
particle%iscp = particle%idomain(3)
304296
particle%iscefp = particle%iboundary(3)
305-
print *, "exit face: ", particle%iboundary(3)
306-
print *, "subcell: ", particle%idomain(3)
297+
! print *, "exit face: ", particle%iboundary(3)
298+
! print *, "subcell: ", particle%idomain(3)
299+
! print *, "subcell vertices: ", subcell%x0, subcell%x1, subcell%x2, subcell%y0, subcell%y1, subcell%y2
300+
! print *, "cell vertices: ", this%cell%defn%polyvert
301+
if (kper == 52 .and. kstp == 1) stop
307302

308303
call this%save(particle, reason=reason)
309304
end subroutine track_subcell

src/Timing/tdis.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ subroutine tdis_set_counters()
131131
write (line, fmtvspts) kper, kstp
132132
case (MNORMAL)
133133
write (line, fmtspts) cpref, kper, kstp, trim(cend)
134+
! write (line, "(a)") ""
134135
end select
135136
if (isim_level >= VALL) &
136137
call write_message(line)

0 commit comments

Comments
 (0)