factorize_solver Subroutine

public subroutine factorize_solver(mat)

Arguments

Type IntentOptional AttributesName
type(MAT_SOLV), intent(inout) :: mat

high level system type


Calls

proc~~factorize_solver~~CallsGraph proc~factorize_solver factorize_solver proc~s_umfpack_di_numeric s_umfpack_di_numeric proc~factorize_solver->proc~s_umfpack_di_numeric ma48_factorize ma48_factorize proc~factorize_solver->ma48_factorize dmumps dmumps proc~factorize_solver->dmumps proc~umfpack_di_free_numeric umfpack_di_free_numeric proc~factorize_solver->proc~umfpack_di_free_numeric proc~umfpack_di_numeric umfpack_di_numeric proc~s_umfpack_di_numeric->proc~umfpack_di_numeric interface~c_umfpack_di_free_numeric c_umfpack_di_free_numeric proc~umfpack_di_free_numeric->interface~c_umfpack_di_free_numeric interface~c_umfpack_di_numeric c_umfpack_di_numeric proc~umfpack_di_numeric->interface~c_umfpack_di_numeric

Called by

proc~~factorize_solver~~CalledByGraph proc~factorize_solver factorize_solver proc~solve_syst solve_syst proc~solve_syst->proc~factorize_solver program~test_solvers test_solvers program~test_solvers->proc~solve_syst

Contents

Source Code


Source Code

   subroutine factorize_solver(mat)
   implicit none
   type(MAT_SOLV), intent(inout) :: mat   !! *high level system type*

      select case(mat%slv_t)

         case(MA48)
            call ma48_factorize( matrix  = mat%matma48%zmat, &
                                 factors = mat%matma48%fact, &
                                 control = mat%matma48%ctrl, &
                                 finfo   = mat%matma48%finf, &
                                 fast    = mat%matma48%fast)
            if (mat%matma48%finf%flag < 0) then
               write(OPU,*) 'Failure of ma48_factorize with finfo%flag = ', mat%matma48%finf%flag
               stop
            endif

         case(MUMP)
            mat%matmump%job = 2
            call dmumps(mat%matmump)

         case(SULU)
            ! Just factorize once, in the case that the matrix doesn't change much
            if (mat%matsulu%first) call fact_superlu( sulu    = mat%matsulu, &
                                                      verbose = (mat%matsulu%options%PrintStat==1))

         case(UMFP)
            call umfpack_di_free_numeric(Numeric = mat%matumfp%c_numeric) ! first release memory
            call s_umfpack_di_numeric(Ap       = mat%jptr,                 &
                                      Ai       = mat%irow,                 &
                                      Ax       = mat%a_elt,                &
                                      Symbolic = mat%matumfp%c_symbolic,   &
                                      Numeric  = mat%matumfp%c_numeric,    &
                                      Control  = mat%matumfp%c_control,    &
                                      Info     = mat%matumfp%c_info)

         case default
            stop 'Unknown solver type, FACTORIZE_SOLVER'

      endselect
   return
   endsubroutine factorize_solver