|
[Sponsors] |
October 17, 2003, 12:29 |
file call
|
#1 |
Guest
Posts: n/a
|
Hi,
This is a problem that is more related to Fortran than to star cd I guess, but here it is: I have two sets of cells separated from one another. In POSDAT I constructed two separate lists of cell numbers and centroids of these cells e.g. IP1, IP2 and CX1 and CX2, then I calculated the list of matched cells MATCH12, i.e. MATCH12(7,1) is the prostar cell number of the type 1 in pair 7. And then I wrote that list to a file, so that it could be accessed directly from another subroutine before POSDAT is called for restart runs, with: OPEN (101,File='Match.list') DO IM=1,ICOUNT5 write (101,*) IM,MATCH12(IM,1),MATCH12(IM,2) END DO close (101) Now, my question is how do I open this file when I would like to access this list in another subroutine, I know this should be very basic but I am a preety bad programer. Many thanks |
|
October 17, 2003, 13:05 |
Re: file call
|
#2 |
Guest
Posts: n/a
|
Hi Carlos,
I think you should invest in a book on fortran! Once you have created your file, you can open it in the same way you did before; open (101,file='Match.list') and then read the data from the file. If you want to be safe, use "inquire" to check if the file is there. If you want to pass information from one subroutine to anther, during the same simulation, look into using "common" blocks. Cheers. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
call for help | sihat | FLUENT | 1 | October 9, 2007 06:53 |
Call of Ratusr.f | jojo | Siemens | 6 | October 17, 2005 15:33 |
Call for papers | Steve Zhang | Main CFD Forum | 0 | December 7, 2001 10:46 |
Call for Papers | Alton J. Reich | Main CFD Forum | 0 | November 16, 2000 11:01 |
Call for Papers | Tom Gutjahr | Siemens | 0 | April 28, 2000 07:42 |