I wrote a fortran program which numerically solve the non-linear problem -f(x)+sin(f(x))-gamma=0, x is defined in [-l, l] with conditions f'(-l)=he, f'(l)=he, where gamma and he are constants.
This is the subprograms:
module module_BVP
public :: Step, Tridiagonal_Solv_Mod, grid...
Hi, fellows.
I'm writing a scientific program for my thesis. But I have a little problem. I'm getting error message: severe <161>: Program Exception - array bounds exceeded for this line:
r(1) = alpha
Here is the whole subprogram:
subroutine Tridiagonal_Solv(n, a, b, alpha, beta, x, y...
I write a program for solving tridiagonal linear system of equations and I want to modify it - to read input data from file. The content of the file is:
n u v w r
4 0 3 2 0.5
2 3 1 4.2
-2 5 -3 7
1 4 0 9
where n is the dimension of the system and the u, v, w, r are the...
Hi, @FJacq.
Yes the "back_substitution" subroutine is in module file which I call in main program with USE statement.
i think the problem with NaN value is caused by the fact that the matrix have too much zeros and some where may be occurs dividing by zero.
I have to implement some other...
Hi, @FJacq. You correctly suggests that this is part of gaussian ellimination. I do what you told me. I correct the intent of c to (in out). I print the matrix "s" and the vector "c" at the entrance of the sub routine and the result is only zeros.
I just finished my application but for this subroutine
subroutine back_substitution(s, c)
implicit none
double precision, dimension(:,:), intent(out) :: s
double precision, dimension(:), intent(out) :: c
real :: w
integer :: i, j, n
n = size(c)
do i = n, 1, -1
w = c(i)
do j =...
Hy, guys.
I write a subroutine which has to solve differential equation numerically. Here it is
subroutine Tridiagonal_Solv(n, a, b, alpha,beta)
implicit none
integer :: n, i
double precision, intent(in) :: a, b, alpha, beta
real :: h
double precision, dimension(0:5)...
Hi, guys.
I have a problem with data reading from file.
The contents of the file is:
n a b alpha beta
5 0 3.1415926536 1 -1
But I receiving:
With this line of code I'm traing to visualize the data:
print "(i1, f2.1, f11.10...
Hi, guys.
I have to make a program in Fortran for numericaly solving a Boudary Value Problem second order ODE. I make a funktion for computing the step and a subroutine for computing x(i) and r(x(i)). My problem is that I don't now how to input the other coefficients of the system
Hello. I wrote one program in Fortran, but every time I run it the window opens and immediately closes. What can I do to keep my screen. In C + + for example, if you write at the end 'system ("pause")' that will not happen.
Hi, guys!
I have to write a console application that tabulate a function in a given interval. This is the code I wrote:
program Calculate_Function
real, dimension(0:200) :: x, y
real :: a, b, h, n
character(len=32) :: file_name
print *, "Input the name of the file: "
read *, file_name...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.