- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am new to the fortran programming language and wondered if anybody could point me in the direction of a possible numerical recipe which could do the following.
I have a code which runs many iterations of a system lifetime using an iterative counting loop. During each iteration the program moves randomly through 32 system states. The current system state is reflected by the value of a system state vector B.
I need a subprogram which when called on the first time stores the value of vector B at that instant in an array (B1). On the next iterationI need it to move the original B1 to a new location in the array and store the current value of B in the array (B2). The next time i need it to move B1 and B2 to new locations in the array, and store the current value of B (B3).
In this way I need to be able to call on the subprogram to write out the contents of the array so that i can find out the previous three system states.
Can anybody suggest anything?
Cheers for taking the time to read this.
I am new to the fortran programming language and wondered if anybody could point me in the direction of a possible numerical recipe which could do the following.
I have a code which runs many iterations of a system lifetime using an iterative counting loop. During each iteration the program moves randomly through 32 system states. The current system state is reflected by the value of a system state vector B.
I need a subprogram which when called on the first time stores the value of vector B at that instant in an array (B1). On the next iterationI need it to move the original B1 to a new location in the array and store the current value of B in the array (B2). The next time i need it to move B1 and B2 to new locations in the array, and store the current value of B (B3).
In this way I need to be able to call on the subprogram to write out the contents of the array so that i can find out the previous three system states.
Can anybody suggest anything?
Cheers for taking the time to read this.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Andrew Cunningham
Hi
I am new to the fortran programming language and wondered if anybody could point me in the direction of a possible numerical recipe which could do the following.
I have a code which runs many iterations of a system lifetime using an iterative counting loop. During each iteration the program moves randomly through 32 system states. The current system state is reflected by the value of a system state vector B.
I need a subprogram which when called on the first time stores the value of vector B at that instant in an array (B1). On the next iterationI need it to move the original B1 to a new location in the array and store the current value of B in the array (B2). The next time i need it to move B1 and B2 to new locations in the array, and store the current value of B (B3).
In this way I need to be able to call on the subprogram to write out the contents of the array so that i can find out the previous three system states.
Can anybody suggest anything?
Cheers for taking the time to read this.
I am new to the fortran programming language and wondered if anybody could point me in the direction of a possible numerical recipe which could do the following.
I have a code which runs many iterations of a system lifetime using an iterative counting loop. During each iteration the program moves randomly through 32 system states. The current system state is reflected by the value of a system state vector B.
I need a subprogram which when called on the first time stores the value of vector B at that instant in an array (B1). On the next iterationI need it to move the original B1 to a new location in the array and store the current value of B in the array (B2). The next time i need it to move B1 and B2 to new locations in the array, and store the current value of B (B3).
In this way I need to be able to call on the subprogram to write out the contents of the array so that i can find out the previous three system states.
Can anybody suggest anything?
Cheers for taking the time to read this.
Sounds like homework to me! Moving data like that seems to me a waste of computing time.
I wouldn't move any data, just keep track of the iteration number and put the present set of data in the next column of a previously-defined 2 -D array.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I considered this option however the program runs iterations in the region of 10^(12) or more in some cases. This seems like a really large data which is why im now considering only storing the previous three.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page