Scratch-file particle event buffer module.
|
| type | scratchfilebuffertype |
| | Scratch-file particle event buffer. Records are written to an unformatted sequential scratch file that is rewound on discard and read back sequentially on flush. More...
|
| |
◆ scratch_append()
Definition at line 40 of file ScratchFileBuffer.f90.
41 class(ScratchFileBufferType) :: this
42 type(ParticleTrackRecordType),
intent(in) :: rec
44 this%nrecords = this%nrecords + 1
◆ scratch_destroy()
Definition at line 72 of file ScratchFileBuffer.f90.
73 class(ScratchFileBufferType) :: this
74 if (this%iun > 0)
then
◆ scratch_discard()
◆ scratch_flush()
Definition at line 47 of file ScratchFileBuffer.f90.
48 class(ScratchFileBufferType) :: this
49 type(ParticleTrackFileType),
intent(in) :: files(:)
51 type(ParticleTrackRecordType) :: rec
54 do n = 1, this%nrecords
57 if (files(i)%iun > 0 .and. &
58 (files(i)%iprp == -1 .or. files(i)%iprp == rec%iprp)) &
59 call save_record(files(i)%iun, rec, files(i)%csv)
◆ scratch_init()
Definition at line 31 of file ScratchFileBuffer.f90.
32 class(ScratchFileBufferType) :: this
34 open (newunit=this%iun, status=
'scratch', form=
'unformatted', &
35 access=
'sequential', iostat=istat)
37 call pstop(1,
'failed to open scratch track buffer file')