![]() |
WENO code for Wave Equation
1 Attachment(s)
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 |
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). |
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. |
Quote:
Thanks for ur time. |
Quote:
Do you have any suggestion to correct the error while I have U( i-r+j)? Best |
Link to WENO code in fortran
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 |
All times are GMT -4. The time now is 03:54. |