16 logical :: is_initialized = .false.
23 integer,
allocatable :: iaux(:)
26 real(kind=double),
allocatable :: raux(:)
39 procedure,
public,
nopass ::
range
65 subroutine range(size, ibegin, iend)
67 integer,
intent(in) :: size
68 integer,
intent(out) :: ibegin
69 integer,
intent(inout) :: iend
72 iend = ibegin +
size - 1
87 class(
scrt),
intent(inout) :: this
88 integer,
intent(in) :: lun_err
89 integer,
intent(in) :: niaux
90 integer,
intent(in) :: nraux
95 this%is_initialized = .true.
98 allocate (this%iaux(this%niaux), this%raux(this%nraux), stat=res)
100 ' array iaux raux', res)
112 class(
scrt),
intent(inout) :: this
113 integer,
intent(in) :: lun
118 if (this%is_initialized)
then
119 deallocate (this%iaux, this%raux, stat=res)
121 'dealloc fail for type scrt member iaux raux', res)
124 this%is_initialized = .false.
138 class(
scrt),
intent(in) :: this
139 integer,
intent(in) :: lun
141 if (this%is_initialized)
then
142 write (lun, *)
'niaux = ', this%niaux,
'nraux = ', this%nraux
144 write (lun, *)
'Scratch type not initialized'
162 class(
scrt),
intent(in) :: this
163 integer,
intent(in) :: niaux
164 integer,
intent(in) :: nraux
168 if (niaux .gt. this%niaux .or. &
169 nraux .gt. this%nraux .or. &
170 .not. this%is_initialized)
then
integer, parameter err_alloc
Error allocation failed.
integer, parameter err_dealloc
Error deallocation failed.
logical function ioerr(lun, errno, call_proc, add_msg, add_int)
Handle and write alert I/O warnings and errors.
Auxiliary module to store an integer and real array used (typically as optional argument) as scratch ...
subroutine init_scrt(this, lun_err, niaux, nraux)
Static constructor for scratch::scrt.
subroutine info_scrt(this, lun)
Info procedure for scratch::scrt.
subroutine kill_scrt(this, lun)
Destructor for scratch::scrt.
logical function check_scrt(this, niaux, nraux)
Check is scratch arrays are big enoguh.
subroutine range(size, ibegin, iend)
Procedure to define portion of member scrt::iaux or scrt::raux.