Note
General hat subroutine that handles the resolution steps:
ini
solver initializationana
solver analyzis when it’s proposed by the solverfac
solver factorizationsol
solver solutionfre
solver memory release when it’s proposed by the solverend
solver endType | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(MAT_SOLV), | intent(inout) | :: | mat |
high level system type |
||
character(len=*), | intent(in) | :: | step |
‘ini’=initialize, ‘ana’=analyze, ‘fac’=factorize, ‘sol’=solve, ‘fre’=free memory, ‘end’=close solver |
subroutine solve_syst(mat, step) implicit none type(MAT_SOLV), intent(inout) :: mat !! *high level system type* character(len=*), intent(in) :: step !! *'ini'=initialize, 'ana'=analyze, 'fac'=factorize, 'sol'=solve, 'fre'=free memory, 'end'=close solver* if ( index(step, 'ini')/=0 ) then ; call init_solver( mat) ; mat%ini = .true. ; return ; endif if ( index(step, 'ana')/=0 ) then ; call analyse_solver( mat) ; mat%ana = .true. ; return ; endif if ( index(step, 'fac')/=0 ) then ; call factorize_solver(mat) ; mat%fac = .true. ; return ; endif if ( index(step, 'sol')/=0 ) then ; call solution_solver( mat) ; mat%sol = .true. ; return ; endif if ( index(step, 'fre')/=0 ) then ; call freefact_solver( mat) ; mat%fre = .true. ; return ; endif if ( index(step, 'end')/=0 ) then ; call close_solver( mat) ; mat%end = .true. ; return ; endif stop 'Bad step chosen in SOLVE_SYST' return endsubroutine solve_syst