For Programmers: Free Programming Magazines  


Home > Archive > Fortran > September 2005 > arth - function in Numerical Recipes (F90)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author arth - function in Numerical Recipes (F90)
Ralf Schaa

2005-09-29, 9:57 pm

Hi all,

the (vectorized ?) integration subroutine 'trapzd' in Numerical Recipes
[p. 1052 (F90) Online Version] makes use of the helper function 'arth'
defined in the Numerical Recipes module 'nrutil' [p. 1364 (F90) Online
Version] and it makes some kind of arithmetic progression.

Now, I don't have a good understanding what it is doing and why it is
doing.

And what are the NPAR_ARTH, NPAR2_ARTH parameters for (defined in
'nrutil'), why is it done that way?

Comments on that would be highly appreciated.

Thanks
-Ralf

e p chandler

2005-09-30, 3:57 am

Ralf Schaa wrote:
> Hi all,
>
> the (vectorized ?) integration subroutine 'trapzd' in Numerical Recipes
> [p. 1052 (F90) Online Version] makes use of the helper function 'arth'
> defined in the Numerical Recipes module 'nrutil' [p. 1364 (F90) Online
> Version] and it makes some kind of arithmetic progression.
>
> Now, I don't have a good understanding what it is doing and why it is
> doing.
>


>From my reading of the manual it looks like these are "generic"

functions which return an array containing an arithmetic progression
given arguments (first,step,n).

Perhaps they generate the starting points and end points of each
interval?


> And what are the NPAR_ARTH, NPAR2_ARTH parameters for (defined in
> 'nrutil'), why is it done that way?
>
> Comments on that would be highly appreciated.
>
> Thanks
> -Ralf


"The parameters at the beginning of the module (names beginning with
NPAR ) are typically related to array lengths below which the
implementations revert to serial operations."

see http://library.lanl.gov/numerical/b...f/chap2c1f9.pdf (chapter
c1.2)

HTH (I just read manuals.)

Ralf Schaa

2005-09-30, 3:57 am

HTH wrote:
[...]
>Perhaps they generate the starting points and end points of each
>interval?


i think they generate all the abscisa values for the integration

[...]
>"The parameters at the beginning of the module (names beginning with
>NPAR ) are typically related to array lengths below which the
>implementations revert to serial operations."


okay, this is what i read as well. But what are the parameters actual
for? What have they to do with parallelisation ...?

Thank you
-Ralf

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com