Sets up matrix with IJ interface.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hypre_obj), | intent(inout) | :: | this |
Hypre machinery |
impure subroutine hypre_obj_SetupMatrixIJ(this) !> Sets up matrix with IJ interface. implicit none class(hypre_obj), intent(inout) :: this !! Hypre machinery ! Work variables integer :: ierr ! Create an empty matrix object call HYPRE_IJMatrixCreate(this%comm, this%irow_lo,this%irow_hi, this%irow_lo,this%irow_hi,this%matrix,ierr) ! Set storage type: only HYPRE_PARCSR supported per HYPRE doc call HYPRE_IJMatrixSetObjectType(this%matrix,HYPRE_PARCSR,ierr) ! Initialize before setting coefficients call HYPRE_IJMatrixInitialize(this%matrix,ierr) ! Set matrix coefficients call hypre_obj_BuildMatrixIJ(this) ! Assemble matrix call HYPRE_IJMatrixAssemble(this%matrix, ierr) ! Get parcsr matrix object call HYPRE_IJMatrixGetObject(this%matrix,this%par_matrix,ierr) return end subroutine hypre_obj_SetupMatrixIJ