factorize_solver Subroutine

private 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 dmumps dmumps proc~factorize_solver->dmumps proc~umfpack_di_free_numeric umfpack_di_free_numeric proc~factorize_solver->proc~umfpack_di_free_numeric ma48_factorize ma48_factorize proc~factorize_solver->ma48_factorize proc~s_umfpack_di_numeric s_umfpack_di_numeric proc~factorize_solver->proc~s_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 proc~umfpack_di_numeric umfpack_di_numeric proc~s_umfpack_di_numeric->proc~umfpack_di_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 proc~solve_fe_film solve_FE_film proc~solve_fe_film->proc~solve_syst proc~multi_scale_solve_fe_film multi_scale_solve_fe_film proc~multi_scale_solve_fe_film->proc~solve_syst proc~multi_scale_solve_fe_film->proc~solve_fe_film proc~solve_ms_prob solve_ms_prob proc~solve_ms_prob->proc~multi_scale_solve_fe_film proc~elementary_full_domain_fe_film_reynolds elementary_full_domain_FE_film_reynolds proc~elementary_full_domain_fe_film_reynolds->proc~solve_fe_film proc~solve_fe_prob solve_fe_prob proc~solve_fe_prob->proc~solve_fe_film proc~test_rough_fe test_rough_fe proc~test_rough_fe->proc~solve_fe_prob proc~test_bearing_x_fe test_bearing_x_fe proc~test_bearing_x_fe->proc~solve_fe_prob proc~test_pocket_fe test_pocket_fe proc~test_pocket_fe->proc~solve_fe_prob proc~test_bearing_y_fe test_bearing_y_fe proc~test_bearing_y_fe->proc~solve_fe_prob proc~test_rough_ms test_rough_ms proc~test_rough_ms->proc~solve_ms_prob proc~test_slider_fe test_slider_fe proc~test_slider_fe->proc~solve_fe_prob proc~test_slider_ms test_slider_ms proc~test_slider_ms->proc~solve_ms_prob proc~run_test run_test proc~run_test->proc~test_rough_fe proc~run_test->proc~test_bearing_x_fe proc~run_test->proc~test_pocket_fe proc~run_test->proc~test_bearing_y_fe proc~run_test->proc~test_rough_ms proc~run_test->proc~test_slider_fe proc~run_test->proc~test_slider_ms program~main main program~main->proc~run_test

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)
#if WITH_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
#else
   stop 'MA48_LIB not defined'
#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