- #1
cjm2176
- 8
- 0
Hello all,
I am trying to learn fortran 90 by rewriting some simple MATLAB codes I have in fortran.
I tried to rewrite a linear, 1D finite element code for an elliptic equation and my fortran and MATLAB codes both end up assembling the same system matrixes (K and f), but the solution to the linear system I am getting by calling dgsev in fortran makes no sense.
heres what I get using dgsev
5.84805285111992524E-295
-5.75492768302598656E+018
-2.50280951573243828E-214
2.50555212078780657E-292
-0.0000000000000000
-0.0000000000000000
-9.67185004345343066E+025
-9.67140655691703340E+025
-0.0000000000000000
and from matlab
5.0000000000000000
4.3750000000000000
3.7499999999999991
3.1249999999999991
2.5000000000000000
1.8750000000000000
1.2500000000000000
0.62500000000000000
0.0000000000000000
I am lost on this one, any ideas?
Thanks!
cjm2176
I am trying to learn fortran 90 by rewriting some simple MATLAB codes I have in fortran.
I tried to rewrite a linear, 1D finite element code for an elliptic equation and my fortran and MATLAB codes both end up assembling the same system matrixes (K and f), but the solution to the linear system I am getting by calling dgsev in fortran makes no sense.
heres what I get using dgsev
5.84805285111992524E-295
-5.75492768302598656E+018
-2.50280951573243828E-214
2.50555212078780657E-292
-0.0000000000000000
-0.0000000000000000
-9.67185004345343066E+025
-9.67140655691703340E+025
-0.0000000000000000
and from matlab
5.0000000000000000
4.3750000000000000
3.7499999999999991
3.1249999999999991
2.5000000000000000
1.8750000000000000
1.2500000000000000
0.62500000000000000
0.0000000000000000
I am lost on this one, any ideas?
Thanks!
cjm2176