Skip to content

Commit 9c2d146

Browse files
committed
move header/dtypes back
1 parent 37974bc commit 9c2d146

4 files changed

Lines changed: 23 additions & 23 deletions

File tree

src/Solution/ParticleTracker/Particle/MemoryBuffer.f90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module MemoryBufferModule
44

55
use KindModule, only: I4B
66
use ParticleTrackEventBufferModule, only: ParticleTrackEventBufferType, &
7-
TrackRecordType, &
7+
ParticleTrackRecordType, &
88
ParticleTrackFileType, &
99
save_record
1010

@@ -15,7 +15,7 @@ module MemoryBufferModule
1515
!> @brief In-memory particle event buffer. Records are held in a
1616
!! dynamically growing array that doubles in capacity as needed.
1717
type, extends(ParticleTrackEventBufferType) :: MemoryBufferType
18-
type(TrackRecordType), allocatable :: records(:) !< buffer
18+
type(ParticleTrackRecordType), allocatable :: records(:) !< buffer
1919
contains
2020
procedure :: append => memory_append
2121
procedure :: flush => memory_flush
@@ -27,8 +27,8 @@ module MemoryBufferModule
2727

2828
subroutine memory_append(this, rec)
2929
class(MemoryBufferType) :: this
30-
type(TrackRecordType), intent(in) :: rec
31-
type(TrackRecordType), allocatable :: tmp(:)
30+
type(ParticleTrackRecordType), intent(in) :: rec
31+
type(ParticleTrackRecordType), allocatable :: tmp(:)
3232

3333
if (.not. allocated(this%records)) then
3434
allocate (this%records(64))
@@ -45,7 +45,7 @@ subroutine memory_flush(this, files)
4545
class(MemoryBufferType) :: this
4646
type(ParticleTrackFileType), intent(in) :: files(:)
4747
integer(I4B) :: n, i
48-
type(TrackRecordType) :: rec
48+
type(ParticleTrackRecordType) :: rec
4949

5050
do n = 1, this%nrecords
5151
rec = this%records(n)

src/Solution/ParticleTracker/Particle/ParticleTrackEventBuffer.f90

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
!> @brief Particle track event buffer module.
22
!!
3-
!! Defines the abstract ParticleTrackEventBufferType, the TrackRecordType
3+
!! Defines the abstract ParticleTrackEventBufferType, the ParticleTrackRecordType
44
!! and ParticleTrackFileType data types, and the save_record helper used
55
!! by concrete buffer implementations.
66
!<
@@ -11,21 +11,13 @@ module ParticleTrackEventBufferModule
1111

1212
implicit none
1313

14-
character(len=*), parameter, public :: TRACKHEADER = &
15-
'kper,kstp,imdl,iprp,irpt,ilay,icell,izone,&
16-
&istatus,ireason,trelease,t,x,y,z,name'
17-
18-
character(len=*), parameter, public :: TRACKDTYPES = &
19-
'<i4,<i4,<i4,<i4,<i4,<i4,<i4,<i4,&
20-
&<i4,<i4,<f8,<f8,<f8,<f8,<f8,|S40'
21-
2214
!> @brief Flat record of a particle track event.
23-
type :: TrackRecordType
15+
type :: ParticleTrackRecordType
2416
integer(I4B) :: kper, kstp, imdl, iprp, irpt, ilay, icu, izone
2517
integer(I4B) :: istatus, ireason
2618
real(DP) :: trelease, ttrack, x, y, z
2719
character(len=40) :: name
28-
end type TrackRecordType
20+
end type ParticleTrackRecordType
2921

3022
!> @brief Output file containing all or some particle pathlines.
3123
!!
@@ -52,9 +44,9 @@ module ParticleTrackEventBufferModule
5244

5345
abstract interface
5446
subroutine buffer_append(this, rec)
55-
import ParticleTrackEventBufferType, TrackRecordType
47+
import ParticleTrackEventBufferType, ParticleTrackRecordType
5648
class(ParticleTrackEventBufferType) :: this
57-
type(TrackRecordType), intent(in) :: rec
49+
type(ParticleTrackRecordType), intent(in) :: rec
5850
end subroutine buffer_append
5951

6052
subroutine buffer_flush(this, files)
@@ -79,7 +71,7 @@ end subroutine buffer_init
7971
!> @brief Save an event record to a binary or CSV file.
8072
subroutine save_record(iun, rec, csv)
8173
integer(I4B), intent(in) :: iun
82-
type(TrackRecordType), intent(in) :: rec
74+
type(ParticleTrackRecordType), intent(in) :: rec
8375
logical(LGP), intent(in) :: csv
8476

8577
if (csv) then

src/Solution/ParticleTracker/Particle/ParticleTracks.f90

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ module ParticleTracksModule
4343
ParticleTrackEventSelectionType, &
4444
add_particle_event
4545

46+
character(len=*), parameter, public :: TRACKHEADER = &
47+
'kper,kstp,imdl,iprp,irpt,ilay,icell,izone,&
48+
&istatus,ireason,trelease,t,x,y,z,name'
49+
50+
character(len=*), parameter, public :: TRACKDTYPES = &
51+
'<i4,<i4,<i4,<i4,<i4,<i4,<i4,<i4,&
52+
&<i4,<i4,<f8,<f8,<f8,<f8,<f8,|S40'
53+
4654
!> @brief Selection of particle events.
4755
type :: ParticleTrackEventSelectionType
4856
logical(LGP) :: release !< track release events
@@ -211,7 +219,7 @@ subroutine buffer_event(this, particle, event)
211219
class(ParticleTracksType) :: this
212220
type(ParticleType), pointer, intent(in) :: particle
213221
class(ParticleEventType), pointer, intent(in) :: event
214-
type(TrackRecordType) :: rec
222+
type(ParticleTrackRecordType) :: rec
215223

216224
rec%kper = event%kper; rec%kstp = event%kstp
217225
rec%imdl = event%imdl; rec%iprp = event%iprp

src/Solution/ParticleTracker/Particle/ScratchFileBuffer.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module ScratchFileBufferModule
55
use KindModule, only: I4B
66
use ErrorUtilModule, only: pstop
77
use ParticleTrackEventBufferModule, only: ParticleTrackEventBufferType, &
8-
TrackRecordType, &
8+
ParticleTrackRecordType, &
99
ParticleTrackFileType, &
1010
save_record
1111

@@ -39,7 +39,7 @@ end subroutine scratch_init
3939

4040
subroutine scratch_append(this, rec)
4141
class(ScratchFileBufferType) :: this
42-
type(TrackRecordType), intent(in) :: rec
42+
type(ParticleTrackRecordType), intent(in) :: rec
4343
write (this%iun) rec
4444
this%nrecords = this%nrecords + 1
4545
end subroutine scratch_append
@@ -48,7 +48,7 @@ subroutine scratch_flush(this, files)
4848
class(ScratchFileBufferType) :: this
4949
type(ParticleTrackFileType), intent(in) :: files(:)
5050
integer(I4B) :: n, i
51-
type(TrackRecordType) :: rec
51+
type(ParticleTrackRecordType) :: rec
5252

5353
rewind (this%iun)
5454
do n = 1, this%nrecords

0 commit comments

Comments
 (0)