hypre_obj_SetupGridS Subroutine

private impure subroutine hypre_obj_SetupGridS(this)

Sets up the hypre grid.

Type Bound

hypre_obj

Arguments

Type IntentOptional Attributes Name
class(hypre_obj), intent(inout) :: this

Hypre machinery


Calls

proc~~hypre_obj_setupgrids~~CallsGraph proc~hypre_obj_setupgrids hypre_obj%hypre_obj_SetupGridS hypre_structgridassemble hypre_structgridassemble proc~hypre_obj_setupgrids->hypre_structgridassemble hypre_structgridcreate hypre_structgridcreate proc~hypre_obj_setupgrids->hypre_structgridcreate hypre_structgridsetextents hypre_structgridsetextents proc~hypre_obj_setupgrids->hypre_structgridsetextents hypre_structgridsetperiodic hypre_structgridsetperiodic proc~hypre_obj_setupgrids->hypre_structgridsetperiodic

Called by

proc~~hypre_obj_setupgrids~~CalledByGraph proc~hypre_obj_setupgrids hypre_obj%hypre_obj_SetupGridS proc~hypre_obj_setup hypre_obj%hypre_obj_Setup proc~hypre_obj_setup->proc~hypre_obj_setupgrids proc~cdifs_obj_preparesolveroperatorsplap cdifs_obj_PrepareSolverOperatorsPLAP proc~cdifs_obj_preparesolveroperatorsplap->proc~hypre_obj_setup proc~cdifs_obj_preparesolveroperatorsvflap cdifs_obj_PrepareSolverOperatorsVFLAP proc~cdifs_obj_preparesolveroperatorsvflap->proc~hypre_obj_setup proc~grans_obj_preparesolveroperators grans_obj_PrepareSolverOperators proc~grans_obj_preparesolveroperators->proc~hypre_obj_setup proc~marker_set_computesolidvolfrac marker_set%marker_set_ComputeSolidVolFrac proc~marker_set_computesolidvolfrac->proc~hypre_obj_setup proc~cdifs_obj_preparesolveroperators cdifs_obj_PrepareSolverOperators proc~cdifs_obj_preparesolveroperators->proc~cdifs_obj_preparesolveroperatorsplap proc~cdifs_obj_preparesolveroperators->proc~cdifs_obj_preparesolveroperatorsvflap proc~grans_obj_preparesolver grans_obj_PrepareSolver proc~grans_obj_preparesolver->proc~grans_obj_preparesolveroperators interface~grans_obj_preparesolver grans_obj%grans_obj_PrepareSolver interface~grans_obj_preparesolver->proc~grans_obj_preparesolver proc~cdifs_obj_preparesolver cdifs_obj_PrepareSolver proc~cdifs_obj_preparesolver->proc~cdifs_obj_preparesolveroperators interface~cdifs_obj_preparesolver cdifs_obj%cdifs_obj_PrepareSolver interface~cdifs_obj_preparesolver->proc~cdifs_obj_preparesolver

Source Code

    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