Definition at line 17 of file ArrayHandlers.f90.
◆ expand_character()
subroutine arrayhandlersmodule::expandarray::expand_character |
( |
character(len=*), dimension(:), intent(inout), allocatable |
array, |
|
|
integer(i4b), intent(in), optional |
increment |
|
) |
| |
|
private |
Definition at line 205 of file ArrayHandlers.f90.
207 character(len=*),
allocatable,
intent(inout) :: array(:)
208 integer(I4B),
optional,
intent(in) :: increment
210 character(len=MAXCHARLEN),
allocatable,
dimension(:) :: temp
211 integer(I4B) :: i, inc, nold, nnew, lenc
215 if (lenc > maxcharlen) &
216 call pstop(138,
'Error in ArrayHandlersModule: '// &
217 'Need to increase MAXCHARLEN. Stopping...')
220 if (
present(increment))
then
223 if (inc < 0)
call pstop(1,
"increment must be nonnegative")
232 if (
allocated(array))
then
235 allocate (temp(nold))
240 allocate (array(nnew))
244 do i = nold + 1, nnew
249 allocate (array(inc))
◆ expand_double()
subroutine arrayhandlersmodule::expandarray::expand_double |
( |
real(dp), dimension(:), intent(inout), allocatable |
array, |
|
|
integer(i4b), intent(in), optional |
increment |
|
) |
| |
|
private |
Definition at line 139 of file ArrayHandlers.f90.
141 real(DP),
allocatable,
intent(inout) :: array(:)
142 integer(I4B),
optional,
intent(in) :: increment
144 integer(I4B) :: inc, lb, n
145 real(DP),
allocatable,
dimension(:) :: temp
148 if (
present(increment))
then
151 if (inc < 0)
call pstop(1,
"increment must be nonnegative")
159 if (
allocated(array))
then
160 lb = lbound(array, 1)
162 allocate (temp(lb:(lb + n + inc - 1)))
163 temp(lb:(lb + n - 1)) = array
165 call move_alloc(temp, array)
167 allocate (array(inc))
◆ expand_integer()
subroutine arrayhandlersmodule::expandarray::expand_integer |
( |
integer(i4b), dimension(:), intent(inout), allocatable |
array, |
|
|
integer(i4b), intent(in), optional |
increment |
|
) |
| |
|
private |
Definition at line 107 of file ArrayHandlers.f90.
109 integer(I4B),
allocatable,
intent(inout) :: array(:)
110 integer(I4B),
optional,
intent(in) :: increment
112 integer(I4B) :: inc, lb, n
113 integer(I4B),
allocatable,
dimension(:) :: temp
116 if (
present(increment))
then
119 if (inc < 0)
call pstop(1,
"increment must be nonnegative")
127 if (
allocated(array))
then
128 lb = lbound(array, 1)
130 allocate (temp(lb:(lb + n + inc - 1)))
131 temp(lb:(lb + n - 1)) = array
133 call move_alloc(temp, array)
135 allocate (array(inc))
◆ expand_logical()
subroutine arrayhandlersmodule::expandarray::expand_logical |
( |
logical(lgp), dimension(:), intent(inout), allocatable |
array, |
|
|
integer(i4b), intent(in), optional |
increment |
|
) |
| |
|
private |
Definition at line 172 of file ArrayHandlers.f90.
174 logical(LGP),
allocatable,
intent(inout) :: array(:)
175 integer(I4B),
optional,
intent(in) :: increment
177 integer(I4B) :: inc, lb, n
178 logical(LGP),
allocatable,
dimension(:) :: temp
181 if (
present(increment))
then
184 if (inc < 0)
call pstop(1,
"increment must be nonnegative")
192 if (
allocated(array))
then
193 lb = lbound(array, 1)
195 allocate (temp(lb:(lb + n + inc - 1)))
196 temp(lb:(lb + n - 1)) = array
198 call move_alloc(temp, array)
200 allocate (array(inc))
The documentation for this interface was generated from the following file: