I am trying to solve the 1d heat equation using crank-nicolson scheme. And for that i have used the thomas algorithm in the subroutine. Can you please check my subroutine too, did i missed some codes?? Im trying to connect the subroutine into main program and link it together to generate the value of u(n+1,j) and open the output and graphics into the matlab files.
There were no complier errors. So after i complie and run the program, i got run-time error.
Run-time Error:
Error 112, Reference to undefined variable,array element or function result[/UNDEF]
CRANK_NICOLSON ~THOMAS_ALGORITHM- in file crank_nicolsonf.95 at line : q = a(j)/b(j-1)
main - in file crank_nicolson.f95 at line : call thomas_algorithm(a,b,c,d,JI+1,u_new)