Sets the entries of the rhs vector, one element at a time.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hypre_obj), | intent(inout) | :: | this |
Hypre machinery |
||
| type(eulerian_obj_r), | intent(in) | :: | rhs |
Right hand side |
impure subroutine hypre_obj_SetRHSIJ(this,rhs) !> Sets the entries of the rhs vector, one element at a time. implicit none class(hypre_obj), intent(inout) :: this !! Hypre machinery type(eulerian_obj_r), intent(in) :: rhs !! Right hand side ! Work variables integer :: n,i,j,k integer :: ierr associate(lo=>this%block%lo, hi=>this%block%hi, irow=>this%irow, & irow_hi=>this%irow_hi,irow_lo =>this%irow_lo) n = 0 do k=lo(3),hi(3) do j=lo(2),hi(2) do i=lo(1),hi(1) n = n + 1 this%rhs_values(n) = rhs%cell(i,j,k)*this%h2 this%rows(n) = irow%cell(i,j,k) end do end do end do call HYPRE_IJVectorSetValues(this%rhs, irow_hi-irow_lo+1,this%rows,this%rhs_values, ierr) end associate call HYPRE_IJVectorAssemble(this%rhs, ierr) return end subroutine hypre_obj_SetRHSIJ