Subroutine to prepare the SULU_ENV components
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(SULU_ENV), | intent(inout) | :: | sulu |
subroutine prep_superlu(sulu) !! Subroutine to prepare the [[SULU_ENV]] components implicit none type(sulu_env), intent(inout) :: sulu integer(kind=I4) :: nn, nz, nb nn = sulu%n nz = sulu%nz nb = sulu%nrhs if (.not.allocated( sulu%perm_c )) allocate( sulu%perm_c(1:nn) ) if (.not.allocated( sulu%perm_r )) allocate( sulu%perm_r(1:nn) ) if (.not.allocated( sulu%etree )) allocate( sulu%etree( 1:nn) ) if (.not.allocated( sulu%RR )) allocate( sulu%RR(1:nn) ) if (.not.allocated( sulu%CC )) allocate( sulu%CC(1:nn) ) if (.not.allocated( sulu%ferr )) allocate( sulu%ferr(1:nb) ) if (.not.allocated( sulu%berr )) allocate( sulu%berr(1:nb) ) if (.not.allocated( sulu%rpg )) allocate( sulu%rpg(1:nb) ) if (.not.allocated( sulu%rcond )) allocate( sulu%rcond(1:nb) ) if (.not.allocated( sulu%x )) allocate( sulu%x(1:nn) ) sulu%x(1:nn) = 0 call dCreate_CompCol_Matrix( A = sulu%SMA, & ! out SuperMatrix m = sulu%n, & ! in int n = sulu%n, & ! in int nnz = sulu%nz, & ! in int nzval = sulu%a_elt, & ! in double dimension() rowind = sulu%irow, & ! in int dimension() colptr = sulu%jptr, & ! in int dimension() stype = SLU_NC, & ! in int dtype = SLU_D, & ! in int mtype = SLU_GE & ! in int ) call dCreate_Dense_Matrix( BX = sulu%smb, & ! out SuperMatrix m = sulu%n, & ! in int n = sulu%nrhs, & ! in int x = sulu%b, & ! in double dimension() ldx = sulu%n, & ! in int stype = SLU_DN, & ! in int dtype = SLU_D, & ! in int mtype = SLU_GE & ! in int ) call dCreate_Dense_Matrix( BX = sulu%smx, & ! out SuperMatrix m = sulu%n, & ! in int n = sulu%nrhs, & ! in int x = sulu%x, & ! in double dimension() ldx = sulu%n, & ! in int stype = SLU_DN, & ! in int dtype = SLU_D, & ! in int mtype = SLU_GE & ! in int ) return endsubroutine prep_superlu