Set the entries of the rhs vector for the Struct interface.
| 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_SetRHSS(this,rhs) !> Set the entries of the rhs vector for the Struct interface. implicit none class(hypre_obj), intent(inout) :: this !! Hypre machinery type(eulerian_obj_r), intent(in) :: rhs !! Right hand side ! Work variables integer :: i,j,k integer :: ierr ! Loop over cell following Hypre convention (from bottom left, to top right) do k=this%block%lo(3),this%block%hi(3) do j=this%block%lo(2),this%block%hi(2) do i=this%block%lo(1),this%block%hi(1) call HYPRE_StructVectorSetValues(this%rhs,[i,j,k],rhs%cell(i,j,k),ierr) end do end do end do call HYPRE_StructVectorAssemble(this%rhs,ierr) return end subroutine hypre_obj_SetRHSS