|
[Sponsors] |
July 18, 2017, 01:54 |
WENO code for Wave Equation
|
#1 |
Member
Hanye Azimi
Join Date: Oct 2016
Posts: 42
Rep Power: 10 |
Hi there
I've written a code in Frtran for a wave Equation with WENO scheme but after running I get this error "Array U has value 0 which is less than lower bound of 1" Are you familar whith this error? I attached the code. I'll appreciate if you take a look and let me know if you find out the problem. Best wishes |
|
July 18, 2017, 03:50 |
|
#2 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,897
Rep Power: 73 |
Quote:
That is your program error...the index of the vector has a value (zero) and violates the access to the array. Use the check_bound options in your compiler. If you really want to use the idex 0 you have to declare the array to start from 0 (you can also declare for nevative values). |
||
July 18, 2017, 03:55 |
|
#3 |
Senior Member
Join Date: Oct 2011
Posts: 242
Rep Power: 17 |
Hello,
This error typically means that you are trying to access unallocated memory. This happens in your loop because the index i-r+j goes outside of the prescribed dimension 1:150. |
|
July 18, 2017, 04:58 |
|
#4 | |
Member
Hanye Azimi
Join Date: Oct 2016
Posts: 42
Rep Power: 10 |
Quote:
Thanks for ur time. |
||
July 18, 2017, 05:03 |
|
#5 | |
Member
Hanye Azimi
Join Date: Oct 2016
Posts: 42
Rep Power: 10 |
Quote:
Do you have any suggestion to correct the error while I have U( i-r+j)? Best |
||
October 16, 2017, 17:35 |
Link to WENO code in fortran
|
#6 |
New Member
Aranya Dan
Join Date: Oct 2017
Posts: 19
Rep Power: 9 |
Not sure if this helps but here is a link to my working code in fortran (Weno5, 1D) for reference
https://github.com/aranyadan/WENO51D_fortran |
|
Tags |
fortran, wave equation, weno code |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
error message | cuteapathy | CFX | 14 | March 20, 2012 07:45 |
orlandi code for poisson equation with FFT ( paid tutorial) | HaKu | Main CFD Forum | 0 | June 29, 2009 16:40 |
Lubrication Reynolds Equation Free Fortran Code | CHULS | Main CFD Forum | 2 | August 13, 2007 16:25 |
F77 Code for Energy Equation | Carlos | Main CFD Forum | 0 | April 2, 2002 15:57 |
Design Integration with CFD? | John C. Chien | Main CFD Forum | 19 | May 17, 2001 16:56 |