fortran - Is this code structure correct? -
i have been trying newton-raphson method work, after trying no success. no bugs method not converge. error reduces extent, 1.e-8, , remains in range.
remarks:
- all arguments defined locally. implicit none statement used everywhere.
- newton-raphson method implemented in subroutine main invoked programm.
i wondering if code structure correct. here outline of code:
module mod_1 subroutine sub_1(input_1,input_2,output_1) ... end subroutine subroutine sub_2(input_1,input_2,output_2) ... end subroutine function f_1(input_1,input_2) !declarations call sub_1(input_1,input_2,output_1) call sub_2(input_1,input_2,output_2) !and other statements end function end module subroutine main(input_1,input_2,output_3) use mod_1 ! using subroutines , functions in mod_1 ! here newton-raphson method implemented. end subroutine
moreover, read somewhere frequent use of subroutines or functions, case in code, causes slow convergence or worse failure of convergence. excessive usage of calls routines cause inaccurate results?!!
Comments
Post a Comment