General hat subroutine that handles the resolution steps:
* ini
solver initialization
* ana
solver analyzis when it's proposed by the solver
* fac
solver factorization
* sol
solver solution
* fre
solver memory release when it's proposed by the solver
* end
solver end
Type | 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) ; return ; endif
if ( index(step, 'ana')/=0 ) then ; call analyse_solver( mat) ; return ; endif
if ( index(step, 'fac')/=0 ) then ; call factorize_solver(mat) ; return ; endif
if ( index(step, 'sol')/=0 ) then ; call solution_solver( mat) ; return ; endif
if ( index(step, 'fre')/=0 ) then ; call freefact_solver( mat) ; return ; endif
if ( index(step, 'end')/=0 ) then ; call close_solver( mat) ; return ; endif
stop 'Bad step chosen in SOLVE_SYST'
return
endsubroutine solve_syst