ROMS
Loading...
Searching...
No Matches
nrutil::arth Interface Reference

Public Member Functions

real(r4) function, dimension(n) arth_r (first, increment, n)
 
real(dp) function, dimension(n) arth_d (first, increment, n)
 
integer(i8b) function, dimension(n) arth_i (first, increment, n)
 

Detailed Description

Definition at line 33 of file nrutil.F.

Member Function/Subroutine Documentation

◆ arth_d()

real(dp) function, dimension(n) nrutil::arth::arth_d ( real(dp), intent(in) first,
real(dp), intent(in) increment,
integer(i8b), intent(in) n )

Definition at line 198 of file nrutil.F.

199!
200!=======================================================================
201! !
202! Array function returning an arithmetic progression, double !
203! precision. !
204! !
205!=======================================================================
206!
207! Imported variable declarations.
208!
209 integer(i8b), intent(in) :: n
210
211 real(dp), intent(in) :: first, increment
212 real(dp), dimension(n) :: arth_d
213!
214! Local variable declarations.
215!
216 integer(i8b) :: k, k2
217
218 real(dp) :: temp
219!
220!----------------------------------------------------------------------
221! Set arithmetic progression.
222!----------------------------------------------------------------------
223!
224 IF (n.gt.0) arth_d(1)=first
225 IF (n.le.npar_arth) THEN
226 DO k=2,n
227 arth_d(k)=arth_d(k-1)+increment
228 END DO
229 ELSE
230 DO k=2,npar2_arth
231 arth_d(k)=arth_d(k-1)+increment
232 END DO
233 temp=increment*npar2_arth
234 k=npar2_arth
235 DO
236 IF (k.ge.n) EXIT
237 k2=k+k
238 arth_d(k+1:min(k2,n))=temp+arth_d(1:min(k,n-k))
239 temp=temp+temp
240 k=k2
241 END DO
242 END IF
243
244 RETURN

References nrutil::arth_d(), nrutil::npar2_arth, and nrutil::npar_arth.

Here is the call graph for this function:

◆ arth_i()

integer(i8b) function, dimension(n) nrutil::arth::arth_i ( integer(i8b), intent(in) first,
integer(i8b), intent(in) increment,
integer(i8b), intent(in) n )

Definition at line 247 of file nrutil.F.

248!
249!=======================================================================
250! !
251! Integer array function returning an arithmetic progression. !
252! !
253!=======================================================================
254!
255! Imported variable declarations.
256!
257 integer(i8b), intent(in) :: first, increment, n
258 integer(i8b), dimension(n) :: arth_i
259!
260! Local variable declarations.
261!
262 integer(i8b) :: k, k2, temp
263!
264!----------------------------------------------------------------------
265! Set arithmetic progression.
266!----------------------------------------------------------------------
267!
268 IF (n.gt.0) arth_i(1)=first
269 IF (n.le.npar_arth) THEN
270 DO k=2,n
271 arth_i(k)=arth_i(k-1)+increment
272 END DO
273 ELSE
274 DO k=2,npar2_arth
275 arth_i(k)=arth_i(k-1)+increment
276 END DO
277 temp=increment*npar2_arth
278 k=npar2_arth
279 DO
280 IF (k.ge.n) EXIT
281 k2=k+k
282 arth_i(k+1:min(k2,n))=temp+arth_i(1:min(k,n-k))
283 temp=temp+temp
284 k=k2
285 END DO
286 END IF
287
288 RETURN

References nrutil::arth_i(), nrutil::npar2_arth, and nrutil::npar_arth.

Here is the call graph for this function:

◆ arth_r()

real(r4) function, dimension(n) nrutil::arth::arth_r ( real(r4), intent(in) first,
real(r4), intent(in) increment,
integer(i8b), intent(in) n )

Definition at line 149 of file nrutil.F.

150!
151!=======================================================================
152! !
153! Array function returning an arithmetic progression, single !
154! precision. !
155! !
156!=======================================================================
157!
158! Imported variable declarations.
159!
160 integer(i8b), intent(in) :: n
161
162 real(r4), intent(in) :: first, increment
163 real(r4), dimension(n) :: arth_r
164!
165! Local variable declarations.
166!
167 integer(i8b) :: k, k2
168
169 real(r4) :: temp
170!
171!----------------------------------------------------------------------
172! Set arithmetic progression.
173!----------------------------------------------------------------------
174!
175 IF (n.gt.0) arth_r(1)=first
176 IF (n.le.npar_arth) THEN
177 DO k=2,n
178 arth_r(k)=arth_r(k-1)+increment
179 END DO
180 ELSE
181 DO k=2,npar2_arth
182 arth_r(k)=arth_r(k-1)+increment
183 END DO
184 temp=increment*npar2_arth
185 k=npar2_arth
186 DO
187 IF (k.ge.n) EXIT
188 k2=k+k
189 arth_r(k+1:min(k2,n))=temp+arth_r(1:min(k,n-k))
190 temp=temp+temp
191 k=k2
192 END DO
193 END IF
194
195 RETURN

References nrutil::arth_r(), nrutil::npar2_arth, and nrutil::npar_arth.

Here is the call graph for this function:

The documentation for this interface was generated from the following file: