Skip to content

Commit

Permalink
Changed the names to saved matrices.
Browse files Browse the repository at this point in the history
modified:   Solvers_Mod/Dense/Ldlt.f90
modified:   Solvers_Mod/Dense/Lu.f90
modified:   Solvers_Mod/Incomplete/Ldlt.f90
  • Loading branch information
Niceno committed Feb 16, 2024
1 parent 9fe64c6 commit 3512886
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Solvers_Mod/Dense/Ldlt.f90
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ subroutine Solvers_Mod_Ldlt(grid, A, x, b)
call Solvers_Mod_Dense_Ldlt_Factorization(LD, A)
call Cpu_Time(time_pe)

call IO % Plot_Dense ("ld_after_factorization", LD)
call IO % Print_Dense("LD after factorization:", LD)
call IO % Plot_Dense ("dens_ldlt_factorized", LD)
call IO % Print_Dense("Dense LDL' factorized:", LD)

! Compute x
call Cpu_Time(time_ss)
Expand Down
8 changes: 4 additions & 4 deletions Solvers_Mod/Dense/Lu.f90
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ subroutine Solvers_Mod_Lu(grid, A, x, b, option)
LU % val(:,:) = 0

! Just plot and print original matrix
call IO % Plot_Dense ("a", A)
call IO % Print_Dense("A:", A)
call IO % Plot_Dense ("dens_a", A)
call IO % Print_Dense("Dense original matrix A:", A)

!------------------------!
! Actual computation !
Expand All @@ -74,8 +74,8 @@ subroutine Solvers_Mod_Lu(grid, A, x, b, option)
end if
call Cpu_Time(time_pe)

call IO % Plot_Dense ("lu_after_lu_factorization", LU)
call IO % Print_Dense("LU after LU factorization:", LU)
call IO % Plot_Dense ("dens_lu_factorized", LU)
call IO % Print_Dense("Dense LU factorized:", LU)

! Compute y by forward substitution (solve: Ly=b; diagonal equal to 1)
call Cpu_Time(time_ss)
Expand Down
5 changes: 2 additions & 3 deletions Solvers_Mod/Incomplete/Ldlt.f90
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,15 @@ subroutine Solvers_Mod_Incomplete_Ldlt(grid, A, x, b, fill_in)
call Solvers_Mod_Sparse_Ldlt_Factorization(LD, A)
call Cpu_Time(time_pe)

call IO % Plot_Sparse ("ldl_after_factorization", LD)
call IO % Print_Sparse("LDL' after factorization:", LD)
call IO % Plot_Sparse ("spar_ldlt_factorized", LD)
call IO % Print_Sparse("Sparse LDL' factorized:", LD)

! Compute x
call Cpu_Time(time_ss)
call Solvers_Mod_Sparse_Forward_Substitution (x, LD, b, d_one=.true.)
call Solvers_Mod_Sparse_Forward_Substitution (x, LD, x, d_only=.true.)
call Solvers_Mod_Sparse_Backward_Substitution(x, LD, x, t=.true., d_one=.true.)
call Cpu_Time(time_se)
!@ call In_Out_Mod_Print_Vector("Solution x:", x)

print '(a,1es10.4)', ' # Time for matrix preparation: ', time_pe - time_ps
print '(a,1es10.4)', ' # Time for solution: ', time_se - time_ss
Expand Down

0 comments on commit 3512886

Please sign in to comment.