This is a book from 80's, the authors are French, C. Jablon and J. C. Simon. I've got this book in Russian translation. The title "Применение ЭВМ для численного моделирования в физике" means "Applying ECM for numeric modelling in physics", where ECM stands for Electronic Calculating Machine (not sure how it is translated to English, but in Russian they used to call computers by that name). I tried to google for this book in digital form in Russian, English or French, but I didn't find anything. If it helps in anyway here are the photos of it in Russian:
https://drive.google.com/open?id=0B2MCX8tD_-VNLTh3dWx0ejJIZW8
Here is the code exactly as printed in the book
parameter nn = 100
dimension a(nn), b(nn), c(nn), d(nn), x(nn), u(nn)
dimension xex(nn), test(nn)
common /thomas/ bet(nn), gam(nn)
common /perm/ ip(10)
call iniper(10, -1)
call inhuni(-1)
read 222, iter, ifin
print 1000, iter, ifin
fifin = 1./float(ifin)
fiter = 1./float(iter)
pi = 3.14159265
pi2 = pi * pi
xa = 1.
xc = 1.
read 111, rb
1 continue
read 222, n
print 5000, n
if(n .gt. nn) stop "alerte"
xb = 2. - rb * p12 / (float(n + 1) ** 2)
print 2000, xa, xb, xc
print 3200
ermoy = 0.
n1 = n - 1
do 10 k = 1, n
a(k) = xa
b(k) = xb
c(k) = xc
10 continue
it = 0
50 continue
if (it .eq. ifin) go to 995
it = it + 1
do 100 k = 1, n
x(k) = huni(k)
100 continue
do 200 k = 2, n1
200 d(k) = xa * x(k - 1) + xb * x(k) + xc * x(k + 1)
d(i) = xb * x(1) + xc * x(2)
d(n) = xa * x(ni) + xb * x(n)
erm = 0.
do 150 l = 1, iter
call tom(a, b, c, d, 1, n, u)
err = 0.
anopm = 0.
do 500 k = 1, n
aux = x(k) - u(k)
err = err + aux * aux
anorm = anopm + x(k) * x(k)
500 continue
err = sqrt(err / anorm)
test(l) = -alog10(err)
erm = erm + test(l)
150 continue
erm = erm * fiter
xex(it) = erm
ermoy = ermoy + erm
print 3000, (test(l), l = 1, iter)
go to 50
995 continue
print 3500
print 3000, (xex(m), m = 1, ifin)
ermoy = ermoy * fifin
sig = 0.
do 996 m = 1, ifin
aux = tex(m) / ermoy - 1.
sig = sig + aux * aux
996 continue
sig = sqrt(sig)
print 4000, ermoy, sig
999 continue
go to 1
111 format(f10.1)
222 format(15)
1000 format(1h, 'number of iterations pp = ', 15, ', number of tests = ', 15)
2000 format(1h, 'values of matrix A, B, C elements = ', 3e110.4)
3000 format(1h, 10e12.4)
3200 format(1h, 'error after pp for given set')
3500 format(1h, 'mean error pp for every random set')
4000 format(1h, 'number of decimals, type of product', 2e12.5,11)
5000 format(1h, 'size of inverse tridiagonal system', 15)
end
subroutine tom(a, b, c, d, n1, n, u)
parameter nx = 1000
common /thomas/ bet, gam
dimension a(n), b(n), c(n), d(n), u(n)
dimension bet(nx), gam(nx)
common /permu/ 1p(10)
b(n1) = p(b(n1))
bet(n1) = b(n1)
gam(n1) = d(n1) / b(n1)
gam(n1) = p(gam(n1))
nm = n - ni
ni1 = ni + 1
do 1 i = ni1, n
aux = -a(i) * gam(i - 1)
aux = p(aux)
gam(i) = p(d(i), aux) / bet(i)
continue
u(n) = p(gam(n))
do 4 j = 1, nm
i = n - j
aux = -u(i + 1) * c(i) / bet(i)
aux = p(aux)
u(i) = p(gam(i), aux)
4 continue
return
end
I tried to compile it using ifort and here is the output
1>------ Build started: Project: ms_lab4, Configuration: Debug Win32 ------
1>Compiling with Intel(R) Visual Fortran Compiler 17.0.1.143 [IA-32]...
1>main.f90
1>c:\users\sasha\documents\visual studio 2015\Projects\ms_lab4\ms_lab4\main.f90(22): error #6345: Either a PAUSE, STOP or ERROR STOP statement has an invalid argument. [ALERTE]
1>c:\users\sasha\documents\visual studio 2015\Projects\ms_lab4\ms_lab4\main.f90(84): error #6885: A dangling constant exists. [15]
1>c:\users\sasha\documents\visual studio 2015\Projects\ms_lab4\ms_lab4\main.f90(83): error #6885: A dangling constant exists. [11]
1>c:\users\sasha\documents\visual studio 2015\Projects\ms_lab4\ms_lab4\main.f90(78): error #6181: An extra comma appears in the format list. [,]
1>c:\users\sasha\documents\visual studio 2015\Projects\ms_lab4\ms_lab4\main.f90(78): error #6885: A dangling constant exists. [15]
1>c:\users\sasha\documents\visual studio 2015\Projects\ms_lab4\ms_lab4\main.f90(77): error #6885: A dangling constant exists. [15]
1>c:\users\sasha\documents\visual studio 2015\Projects\ms_lab4\ms_lab4\main.f90(92): error #5143: Missing mandatory separating blank
1>c:\users\sasha\documents\visual studio 2015\Projects\ms_lab4\ms_lab4\main.f90(92): error #5082: Syntax error, found INTEGER_CONSTANT '1' when expecting one of: <IDENTIFIER>
1>c:\users\sasha\documents\visual studio 2015\Projects\ms_lab4\ms_lab4\main.f90(102): error #6351: The number of subscripts is incorrect. [P]
1>c:\users\sasha\documents\visual studio 2015\Projects\ms_lab4\ms_lab4\main.f90(106): error #8093: A do-variable within a DO body shall not appear in a variable definition context. [I]
1>c:\users\sasha\documents\visual studio 2015\Projects\ms_lab4\ms_lab4\main.f90(109): error #6351: The number of subscripts is incorrect. [P]
1>c:\users\sasha\documents\visual studio 2015\Projects\ms_lab4\ms_lab4\main.f90(99): error #6321: An unterminated block exists.
1>c:\users\sasha\documents\visual studio 2015\Projects\ms_lab4\ms_lab4\main.f90(99): error #6323: This label is not defined in this scoping unit. [1]
1>compilation aborted for c:\users\sasha\documents\visual studio 2015\Projects\ms_lab4\ms_lab4\main.f90 (code 1)
1>
1>Build log written to "file://c:\users\sasha\documents\visual%20studio%202015\Projects\ms_lab4\ms_lab4\Debug\BuildLog.htm"
1>ms_lab4 - 14 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Then I tried to compile the program with gfortran
gfortran -c main.f90
main.f90:2.4:
parameter nn = 100
1
Error: Unclassifiable statement at (1)
main.f90:22.22:
if(n .gt. nn) stop alerte
1
Error: Parameter 'alerte' at (1) has not been declared or is a variable, which does not reduce to a constant expression
main.f90:77.18:
222 format(15)
1
Error: Unexpected element ')' in format string at (1)
main.f90:78.52:
1000 format(1h, 'number of iterations pp = ', 15, ', number of tests = ', 15)
1
Error: Unexpected element ',' in format string at (1)
main.f90:83.68:
4000 format(1h, 'number of decimals, type of product', 2e12.5,11)
1
Error: Unexpected element ')' in format string at (1)
main.f90:84.60:
5000 format(1h, 'size of inverse tridiagonal system', 15)
1
Error: Unexpected element ')' in format string at (1)
main.f90:88.4:
parameter nx = 1000
1
Error: Unclassifiable statement at (1)
main.f90:92.18:
common /permu/ 1p(10)
1
Error: Syntax error in COMMON statement at (1)
main.f90:106.21:
i = n - j
1
main.f90:99.19:
do 1 i = ni1, n
2
Error: Variable 'i' at (1) cannot be redefined inside loop beginning at (2)
main.f90:112.7:
end
1
Error: END DO statement expected at (1)
Error: Unexpected end of file in 'main.f90'
Then I thought that maybe I shouldn't compile it with *.f90 extension because the code is older than 90 standard. I renamed file to main.for and tried to compile it with gfortran.
gfortran -c main.for
main.for:2.5:
parameter nn = 100
1
Error: Non-numeric character in statement label at (1)
main.for:3.5:
dimension a(nn), b(nn), c(nn), d(nn), x(nn), u(nn)
1
Error: Non-numeric character in statement label at (1)
main.for:3.5:
dimension a(nn), b(nn), c(nn), d(nn), x(nn), u(nn)
1
Error: Unclassifiable statement at (1)
main.for:4.5:
dimension xex(nn), test(nn)
1
Error: Non-numeric character in statement label at (1)
main.for:4.5:
dimension xex(nn), test(nn)
1
Error: Unclassifiable statement at (1)
main.for:5.5:
common /thomas/ bet(nn), gam(nn)
1
Error: Non-numeric character in statement label at (1)
main.for:5.5:
common /thomas/ bet(nn), gam(nn)
1
Error: Unclassifiable statement at (1)
main.for:6.5:
common /perm/ ip(10)
1
Error: Non-numeric character in statement label at (1)
main.for:6.5:
common /perm/ ip(10)
1
Error: Unclassifiable statement at (1)
main.for:8.5:
call iniper(10, -1)
1
Error: Non-numeric character in statement label at (1)
main.for:8.5:
call iniper(10, -1)
1
Error: Unclassifiable statement at (1)
main.for:9.5:
call inhuni(-1)
1
Error: Non-numeric character in statement label at (1)
main.for:9.5:
call inhuni(-1)
1
Error: Unclassifiable statement at (1)
main.for:10.5:
read 222, iter, ifin
1
Error: Non-numeric character in statement label at (1)
main.for:10.5:
read 222, iter, ifin
1
Error: Unclassifiable statement at (1)
main.for:11.5:
print 1000, iter, ifin
1
Error: Non-numeric character in statement label at (1)
main.for:11.5:
print 1000, iter, ifin
1
Error: Unclassifiable statement at (1)
main.for:12.5:
fifin = 1./float(ifin)
1
Error: Non-numeric character in statement label at (1)
main.for:13.5:
fiter = 1./float(iter)
1
Error: Non-numeric character in statement label at (1)
main.for:14.5:
pi = 3.14159265
1
Error: Non-numeric character in statement label at (1)
main.for:15.5:
pi2 = pi * pi
1
Error: Non-numeric character in statement label at (1)
main.for:16.5:
xa = 1.
1
Error: Non-numeric character in statement label at (1)
main.for:17.5:
xc = 1.
1
Error: Non-numeric character in statement label at (1)
main.for:18.5:
read 111, rb
1
Error: Non-numeric character in statement label at (1)
main.for:18.5:
read 111, rb
1
Error: Unclassifiable statement at (1)
Fatal Error: Error count reached limit of 25.
P. S. the code begins at page 127 on photo IMG_0192, as you can see there is a comment section in Russian, I would try to translate it or any other page if it helps
I5letter i, not fifteen.1hedit descriptors look wrong (anybody make sense of that? some kind of non standard printer control? It doesn't make sense as hollerith). Try deleting the1h,if its causing a compile error.