Welcome, Guest

Author Topic: Any FORTRAN 77 Experts?  (Read 6406 times)

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Any FORTRAN 77 Experts?
« on: October 13, 2010, 09:08:49 PM »
I'm looking for some help converting the code contained in 'BSE tar file' found here:
http://astronomy.swin.edu.au/~jhurley/
... into something more useable for future inclusion into Universe Sandbox.

Let me know if you'd like to help.

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Any FORTRAN 77 Experts?
« Reply #1 on: October 13, 2010, 09:53:44 PM »
Know I shouldn't post here, cause I don't but, here's my two cents:

I wish I did. I wish I did...

deoxy99

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 872
  • ✨ the name's verb ✨
Re: Any FORTRAN 77 Experts?
« Reply #2 on: October 13, 2010, 09:57:38 PM »
I want to know how to do Fortran, but I don't know how to...

I wish I had learned beforehand.

SuperNova

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 387
  • ROW ROW, FIGHT THE POWAH!
    • Dreadnaught BG
Re: Any FORTRAN 77 Experts?
« Reply #3 on: October 17, 2010, 05:41:35 AM »
As i opened it into C++
it told me this

*
* const_bse.h
*
      INTEGER idum
      COMMON /VALUE3/ idum
      INTEGER idum2,iy,ir(32)
      COMMON /RAND3/ idum2,iy,ir
      INTEGER ktype(0:14,0:14)
      COMMON /TYPES/ ktype
      INTEGER ceflag,tflag,ifflag,nsflag,wdflag
      COMMON /FLAGS/ ceflag,tflag,ifflag,nsflag,wdflag
      INTEGER bhflag
*
      REAL*8 neta,bwind,hewind,mxns,alpha1,lambda
      REAL*8 sigma,beta,xi,acc2,epsnov,eddfac,gamma
      COMMON /VALUE1/ neta,bwind,hewind,mxns
      COMMON /VALUE2/ alpha1,lambda
      COMMON /VALUE4/ sigma,bhflag
      COMMON /VALUE5/ beta,xi,acc2,epsnov,eddfac,gamma
      REAL*8 pts1,pts2,pts3
      COMMON /POINTS/ pts1,pts2,pts3
      REAL*8 dmmax,drmax
      COMMON /TSTEPC/ dmmax,drmax
      REAL scm(50000,14),spp(20,3)
      COMMON /SINGLE/ scm,spp
      REAL bcm(50000,34),bpp(80,10)
      COMMON /BINARY/ bcm,bpp
*

Looks like you can't do anything with this, and there are no matches for Tar or BSE tar files on google.

Laura

  • *****
  • Posts: 123
Re: Any FORTRAN 77 Experts?
« Reply #4 on: October 17, 2010, 06:46:52 AM »
Tar is a compressed file format, like zip or rar.
It usually appears as archives suffixed .tar.gz
BSE (in this case) refers to the Binary Star Evolution algorithm.

Dan: You can take this C source code and compile a FORTRAN77 to C converter.
http://www.netlib.org/f2c/

frankdepinte

  • **
  • Posts: 17
Re: Any FORTRAN 77 Experts?
« Reply #5 on: October 18, 2010, 09:43:30 AM »
I have been programming in Fortran a while ago .
The output shown above only defines the variables in the Fortran Language .
Problem I have I can't acces the .tar files
Do you want it to have it translated to VisualBasic Dan ?
« Last Edit: October 18, 2010, 09:49:17 AM by frankdepinte »

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Any FORTRAN 77 Experts?
« Reply #6 on: October 18, 2010, 10:18:39 AM »
I have been programming in Fortran a while ago .
The output shown above only defines the variables in the Fortran Language .
Problem I have I can't acces the .tar files
Do you want it to have it translated to VisualBasic Dan ?

Wow... That would be awesome. Either VB.net or C# would be the most preferable.

I've downloaded, extracted, and re-ziped the files so you can check them out.

The Binary Star code includes both the Binary code and the original Stellar Evolution code.
« Last Edit: October 18, 2010, 12:40:50 PM by Dan Dixon »

frankdepinte

  • **
  • Posts: 17
Re: Any FORTRAN 77 Experts?
« Reply #7 on: October 21, 2010, 10:58:39 AM »
Unfortunately I'm not familiar with VB nor C+ Dan ,  :'(
As I'm not familiar with your target code I'm afraid I can't "translate" into the target language .
I even think it's not possible to translate , because Fortran uses other conventions for declaring variables , arrays, dimensioning , which must be done at start .

I took a look at the files which are in the zip -folder.
The programm is divided in a lot of subroutines and is well documented , so one can understand what's happening , just reading the comments .
I think Fortran 77 is not a really diffucult language to learn as it was one of the "basic " languages . A lot of statements are directly clear .
I'm afraid I can only suggest to dive into the language . There is a lot of information avaliable .
A possible start to get famliar is fi this :
http://www.idris.fr/data/cours/lang/fortran/f90/F77.html#p2.3

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Any FORTRAN 77 Experts?
« Reply #8 on: October 21, 2010, 05:40:33 PM »
No worries. Thanks for taking a look at it.

I even think it's not possible to translate , because Fortran uses other conventions for declaring variables , arrays, dimensioning , which must be done at start .

I don't understand why you think it's not possible to translate. Can you please explain?

And thanks for the link, that's useful.

What languages are you familiar with, out of curiosity?

frankdepinte

  • **
  • Posts: 17
Re: Any FORTRAN 77 Experts?
« Reply #9 on: October 22, 2010, 09:33:30 AM »
I mean it's not easy to translate litteraly into VB , converting is surely possible of course .
Maybe the sequence of instructions must be changed .
 I saw the output of the programm is also output on screen without graphics  if I'm not mistaken . So a lot of rewriting must be done .
The formulae can be reused imo .
I'm familiar with Fortran and different Basics .
PowerBasic I'm using a lot .