After searching github, I do notice below there are two repos contain Tompson’s DDE solver,
but Thompson’s DKLAG6 solver is still missing.
As both @Arjen and @ivanpribec pointed out, DDE_solver f90 come after DKLAG6, so perhaps no need for DKLAG6 anymore. So I do not know what should be the title of my thread, LOL.
Anyway, what Delay Differential Equations Solver(DDE) solver do you use? Besides Thompson’s DDE_SOLVER, is Hairer’s solver good enough?
Another irrelevant question, guys, if you learned the methods of Thompson and/or Hairer’s, and you write your own modern Fortran version of DDE and/or ODE solver. Is there a chance that your modern version can be significantly faster than code of Thompson and Hairer’s?
DKLAG6 apparently is a predecessor of DDE_SOLVER, so I would assume that the functionality is incorporated in the newer package. As I do not know these packages I may be completely wrong ;).
(Note though: the subject does interest me - from a recreational point of view, nothing I encounter in my work)
Thank you @Arjen !
Sorry my bad, I did not read @ivanpribec reply careful enough, and very loosely and stupidly mistakenly think DKLAG6 came after DDE_SOLVER. That is why I am actively looking for his DKLAG6 code, LOL.
Indeed, Thompson’s DDE solver should be better than his previous DKLAG6. I guess once have DDE_SOLVER, no need for DKLAG6.
I do not use any - like I said - but I am interested in the concept. I am also interested in the concept of DAEs - differential-algebraic equations, but I must admit that I have trouble understanding the classification of such equations
I was curious about the dde_solver package so I have a few examples and run them. They stop with: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.
This was with gofrtran 10.02.0 (on Windows). I have not investigated it in any detail ;), but Intel oneAPI Fortran is perfectly happy with running examples b2 and c2g. (There was a warning in the README for the dde_solver project.)
Found the problem - the statement starting at line 6274 is the culprit. MY_TRIM_FREQUENCY is zero, so the division is invalid. When I changed it to:
IF (NSTEPS>0 .AND. MY_TRIM_FREQUENCY > 0) THEN
IF ( MY_MAX_DELAY> 0.0D0 .AND. &
(NSTEPS/MY_TRIM_FREQUENCY)*MY_TRIM_FREQUENCY==NSTEPS) THEN
the numerical results were the same as for Intel oneAPI Fortran (at least for the one example I tried), with the exception of some print statements resulting in extra output in the result file instead of on the screen.
I just checked the dde_solver from WarrenWreckesser’s Github.
I use Intel OneAPI 2021.4 + VS2017, windows 10. I did not include odeavg.f90 in the code.
For the two examples b2 and c2g you mentioned, I have the below warning at two places see below:
warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value.
With two data points (the error I found with gfortran and the error you spotted with the debug mode of Intel oneAPI Fortran) I conclude that there is a pattern: the code will work if “short-circuiting” is used - in the screen dump you can see the condition “I <= MYNGUSER” but also the use of I as an index in various arrays. I think the first condition needs to be checked separately:
Thank you very much @Arjen !
By the way, I found my copy of S. Thompson’s DDE website, I put it in the folder of my above gitlab repo, called A Friendly Fortran DDE Solver
You could download the foler, and click index.html and bingo!
Try the FortranCalculus compiler / language. It may solve ODEs and Algebraic equations all at the same time.
What Delay Differential Equations Solver(DDE) solver do you use?
There are many to choose from that are stored in a library. A user just picks one by name and makes a run. Then picks another and does the same; nice and simple.