|
|
Up |
|
|
  |
Author: Henrik HolstHenrik Holst Date: Mar 17, 2008 20:39
Hello comp.lang.Fortran!
I am writing to seek ideas how to solve the "callback problem" problem
in
a modern fashion using whats available in the Fortran 95/2003
compilers, today.
I found many interesting threads on the subjects by search for
"reverse communication".
There was a discussion on the subject in the monster thread
"How old is the average Fortran programmer?"
but the discussion was drained in noise from old FORTRAN2 relics
talking about
their first codes written on punch cards before the best solution
could be found. :-)
Background:
|
| Show full article (3.10Kb) |
|
| | 37 Comments |
|
  |
Author: Greg LindahlGreg Lindahl Date: Mar 17, 2008 21:25
>I found many interesting threads on the subjects by search for
>"reverse communication".
You might do better looking for terms such as "lexical closures".
Anyway, one option you left off was using a module to stash the hidden
data. This is similar to using a common block, but a bit prettier.
>1) INTERNAL FUNCTIONS, are not allowed to be passed as arguments.
>A BIG design imo. This was my first try (and failure) to solve the
>problem.
We use these in perl all of the time, and it's well-understood how to
make them work efficiently. Ah well, no good wishing for what isn't.
-- greg
|
| |
|
| | no comments |
|
  |
Author: Arjen MarkusArjen Markus Date: Mar 18, 2008 01:20
On 18 mrt, 04:39, Henrik Holst gmail.com> wrote:
> Hello comp.lang.Fortran!
>
> I am writing to seek ideas how to solve the "callback problem" problem
> in
> a modern fashion using whats available in the Fortran 95/2003
> compilers, today.
>
> I found many interesting threads on the subjects by search for
> "reverse communication".
> There was a discussion on the subject in the monster thread
> "How old is the average Fortran programmer?"
> but the discussion was drained in noise from old FORTRAN2 relics
> talking about
> their first codes written on punch cards before the best solution
> could be found. :-)
>
> Background:
>
> I am implementing a library for various kind of numerical methods for ...
|
| Show full article (4.44Kb) |
| no comments |
|
  |
Author: Henrik HolstHenrik Holst Date: Mar 18, 2008 05:10
(Excuse my first post; I forgot that tw=80 was too much for usenet)
Thank you Greg Lindahl and Arjen Markus for your responces!
On Mar 18, 9:20 am, Arjen Markus wrote:
> In an article I have written for the Fortran Forum, I address
> precisely this question and how to solve it using F2003
> (whether I have found the optimal solution is another matter
> of course :)).
Is it published, and if so, under what name? I did only find "design
patterns for Fortran 90/95" (but seemed interesting by itself). I will
get it when I am at campus. :-)
|
| Show full article (2.13Kb) |
| no comments |
|
  |
Author: Arjen MarkusArjen Markus Date: Mar 18, 2008 05:24
On 18 mrt, 13:10, Henrik Holst gmail.com> wrote:
> (Excuse my first post; I forgot that tw=80 was too much for usenet)
>
> Thank you Greg Lindahl and Arjen Markus for your responces!
>
> On Mar 18, 9:20 am, Arjen Markus wrote:
>
>> In an article I have written for the Fortran Forum, I address
>> precisely this question and how to solve it using F2003
>> (whether I have found the optimal solution is another matter
>> of course :)).
>
> Is it published, and if so, under what name? I did only find "design
> patterns for Fortran 90/95" (but seemed interesting by itself). I will
> get it when I am at campus. :-)
>
>
>
>
> ...
|
| Show full article (2.53Kb) |
| no comments |
|
  |
Author: Dick HendricksonDick Hendrickson Date: Mar 18, 2008 06:51
Henrik Holst wrote:
> Hello comp.lang.Fortran!
>
> I am writing to seek ideas how to solve the "callback problem" problem
> in
> a modern fashion using whats available in the Fortran 95/2003
> compilers, today.
>
> I found many interesting threads on the subjects by search for
> "reverse communication".
> There was a discussion on the subject in the monster thread
> "How old is the average Fortran programmer?"
> but the discussion was drained in noise from old FORTRAN2 relics
> talking about
> their first codes written on punch cards before the best solution
> could be found. :-)
>
> Background:
>
> I am implementing a library for various kind of numerical methods for ...
|
| Show full article (4.72Kb) |
| no comments |
|
  |
Author: James Van BuskirkJames Van Buskirk Date: Mar 18, 2008 07:37
> I am writing to seek ideas how to solve the "callback problem" problem
> in
> a modern fashion using whats available in the Fortran 95/2003
> compilers, today.
> I am implementing a library for various kind of numerical methods for
> solving
> ODEs. The basic framework requires the possibility to evaluate f(t,y)
> (y is any
> 0 to 7 dimensional array) at a given point in T x Y space. This poses
> a problem
> for me because usually the f function does not only depend on t and y
> but on
> other user definable parameters.
> 1) INTERNAL FUNCTIONS, are not allowed to be passed as arguments.
> A BIG design imo. This was my first try (and failure) to solve the
> problem.
Are these going to be allowed in f08? Certainly ifort allows them.
|
| Show full article (2.12Kb) |
| no comments |
|
  |
Author: Dick HendricksonDick Hendrickson Date: Mar 18, 2008 08:08
James Van Buskirk wrote:
>> I am writing to seek ideas how to solve the "callback problem" problem
>> in
>> a modern fashion using whats available in the Fortran 95/2003
>> compilers, today.
>
>> I am implementing a library for various kind of numerical methods for
>> solving
>> ODEs. The basic framework requires the possibility to evaluate f(t,y)
>> (y is any
>> 0 to 7 dimensional array) at a given point in T x Y space. This poses
>> a problem
>> for me because usually the f function does not only depend on t and y
>> but on
>> other user definable parameters.
>
>> 1) INTERNAL FUNCTIONS, are not allowed to be passed as arguments. ...
|
| Show full article (2.70Kb) |
| no comments |
|
  |
Author: Dick HendricksonDick Hendrickson Date: Mar 18, 2008 08:10
James Van Buskirk wrote:
>> I am writing to seek ideas how to solve the "callback problem" problem
>> in
>> a modern fashion using whats available in the Fortran 95/2003
>> compilers, today.
>
>> I am implementing a library for various kind of numerical methods for
>> solving
>> ODEs. The basic framework requires the possibility to evaluate f(t,y)
>> (y is any
>> 0 to 7 dimensional array) at a given point in T x Y space. This poses
>> a problem
>> for me because usually the f function does not only depend on t and y
>> but on
>> other user definable parameters.
>
>> 1) INTERNAL FUNCTIONS, are not allowed to be passed as arguments. ...
|
| Show full article (1.08Kb) |
| no comments |
|
  |
|
|
  |
Author: Craig DedoCraig Dedo Date: Mar 18, 2008 09:42
> Hello comp.lang.Fortran!
>
> I am writing to seek ideas how to solve the "callback problem" problem
> in
> a modern fashion using whats available in the Fortran 95/2003
> compilers, today.
>
>
> Background:
>
> I am implementing a library for various kind of numerical methods for
> solving
> ODEs. The basic framework requires the possibility to evaluate f(t,y)
> (y is any
> 0 to 7 dimensional array) at a given point in T x Y space. This poses
> a problem
> for me because usually the f function does not only depend on t and y ...
|
| Show full article (2.72Kb) |
| no comments |
|
|
|
|