Sets up the hypre grid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hypre_obj), | intent(inout) | :: | this |
Hypre machinery |
impure subroutine hypre_obj_SetupGridS(this) !> Sets up the hypre grid. implicit none class(hypre_obj), intent(inout) :: this !! Hypre machinery ! Work variables integer :: periodicity(3) integer :: ierr ! Create a 3D grid object call HYPRE_StructGridCreate(this%comm,this%dim,this%grid, ierr) ! Set Hypre grid extents (only one block per mpi rank) call HYPRE_StructGridSetExtents(this%grid,this%block%lo(1:this%dim),this%block%hi(1:this%dim),ierr) ! Assume full periodicity (periodicity=[nx,ny,nz]) periodicity = 0 if (this%block%periods(1).eqv. .true.) call this%parallel%max(this%block%hi(1),periodicity(1)) if (this%block%periods(2).eqv. .true.) call this%parallel%max(this%block%hi(2),periodicity(2)) if (this%block%periods(3).eqv. .true.) call this%parallel%max(this%block%hi(3),periodicity(3)) call HYPRE_StructGridSetPeriodic(this%grid,periodicity(1:this%dim),ierr) ! Assemble the grid call HYPRE_StructGridAssemble(this%grid,ierr) return end subroutine hypre_obj_SetupGridS