View previous topic :: View next topic |
Author |
Message |
ed
Joined: 18 Jul 2008 Posts: 2
|
Posted: Sun Jul 27, 2008 12:45 pm Post subject: Numerical libraries |
|
|
Hello
I am looking for algorithms, mainly for solving ordinary and partial differential equations. I have used NAG in the past but it's too expensive for me.
There is a collection known as "Numerical Recipes" - it comes with both F90 code (legacy/unsupported) and C++. Does anyone have experience with Numerical Recipes, or know of any other low-cost alternatives?
Secondly: with Silverfrost, is it possible to call a C++ algorithm code from a Fortran program? (I can't program in C++)
Regards,
Ed. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Jul 28, 2008 2:37 pm Post subject: |
|
|
In answer to your second question, you can call C++ from FTN95 Fortran.
You will find details in ftn95.chm under Win32 platform->Mixed language programming->Calling C/C++ from FTN95.
In particular you need to be careful about which protocol is using in C++, c_decl or STDCALL. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Mon Jul 28, 2008 4:17 pm Post subject: |
|
|
Using the C versions provides one extra and unnecessary layer of potential problems - if you stick to the Fortran versions at least as a Fortran programmer you are likely to understand what they do.
Eddie |
|
Back to top |
|
|
ed
Joined: 18 Jul 2008 Posts: 2
|
Posted: Mon Jul 28, 2008 7:00 pm Post subject: |
|
|
OK - thanks for both replies. |
|
Back to top |
|
|
|