|
[Sponsors] |
November 12, 2004, 06:27 |
INTFLG
|
#1 |
Guest
Posts: n/a
|
Hi could anyone please tell me how to use the intflg(100) array. As far as I understand it helps you determine at what step of the itteration you want your calculations to be done. The question is, that I dont know how to use it. Any help is welcomed Regards CM
|
|
November 12, 2004, 09:28 |
Re: INTFLG
|
#2 |
Guest
Posts: n/a
|
No, intflg is an array of 100 integers which star initialises to 0. You can change these values to whatever you want in your user subroutines and star will "remember" them: the values will not change unless you change them. So they mean whatever you want them to mean. They're quite useful for remembering something from one call of a subroutine to the next, or for passing a message from one subroutine to another.
|
|
November 15, 2004, 08:20 |
Re: INTFLG
|
#3 |
Guest
Posts: n/a
|
Hi Richard, thanks for your post. Could you please give me an example, if this is not much to ask. Say if you want something you calculated from posdat and then pass it to SORSCA in one itteration? Hope this is not a problem for you, best regards, CM
|
|
November 15, 2004, 08:56 |
Re: INTFLG
|
#4 |
Guest
Posts: n/a
|
It's easy really. Suppose you wanted your posdat to tell your sorsca which cell has the highest temperature. You can choose any intflg, so let's choose intflg(1). Then, in your posdat you could have C Loop through all the cells and find the highest temperature tmax=-great do ic=1,ncell
if (t(ic,1).gt.tmax) then intflg(1)=ic tmax=t(ic,1) end if end do and then in your sorsca you have intflg(1) available and ready for use. Of course, you need to be sure that posdat is called before sorsca for this to work, but it is so you're safe. And you can only pass integer values through intflg so, in this example, you'd have to find a different way to actually pass the maximum temperature if you wanted to. But maybe this example is too specific. Really, there's not much more to it than my first reply: it's an array of integers which are initialised to zero by star and are always available to your user subroutines. You can do whatever you want with them. |
|
November 15, 2004, 12:57 |
Re: INTFLG
|
#5 |
Guest
Posts: n/a
|
Thankyou very much Richard,
CM |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
INTFLG | Juliet | Siemens | 5 | December 1, 2003 05:20 |