setup_interface Subroutine

public subroutine setup_interface(control, dims)

Allocate memory for the data communication between processors

Arguments

Type IntentOptional AttributesName
type(controltype), intent(in) :: control

Control parameters: n_var

type(extent), intent(in) :: dims

Extent of the domain:imx,jmx,kmx


Calls

proc~~setup_interface~~CallsGraph proc~setup_interface setup_interface interface~alloc alloc proc~setup_interface->interface~alloc proc~alloc_rank2_real alloc_rank2_real interface~alloc->proc~alloc_rank2_real proc~alloc_rank4_real alloc_rank4_real interface~alloc->proc~alloc_rank4_real proc~alloc_rank3_real alloc_rank3_real interface~alloc->proc~alloc_rank3_real proc~alloc_rank2_integer alloc_rank2_integer interface~alloc->proc~alloc_rank2_integer proc~alloc_rank1_integer alloc_rank1_integer interface~alloc->proc~alloc_rank1_integer proc~alloc_rank6_real alloc_rank6_real interface~alloc->proc~alloc_rank6_real proc~alloc_rank5_real alloc_rank5_real interface~alloc->proc~alloc_rank5_real proc~alloc_rank3_integer alloc_rank3_integer interface~alloc->proc~alloc_rank3_integer proc~alloc_rank1_real alloc_rank1_real interface~alloc->proc~alloc_rank1_real

Called by

proc~~setup_interface~~CalledByGraph proc~setup_interface setup_interface proc~setup_solver setup_solver proc~setup_solver->proc~setup_interface proc~start_run start_run proc~start_run->proc~setup_solver program~main main program~main->proc~start_run

Contents

Source Code


Source Code

    subroutine setup_interface(control, dims)
      !< Allocate memory for the data communication between processors
      implicit none
      type(controltype), intent(in) :: control
      !< Control parameters: n_var
      type(extent), intent(in) :: dims
      !< Extent of the domain:imx,jmx,kmx
      integer :: imx, jmx, kmx, n_var
      character(len=*), parameter ::errmsg="module: interface, subrouinte setup"
      !< Error message

      imx = dims%imx
      jmx = dims%jmx
      kmx = dims%kmx

      n_var = control%n_var

      ibuf_size = (jmx-1)*(kmx-1)*n_var*layers
      jbuf_size = (imx-1)*(kmx-1)*n_var*layers
      kbuf_size = (imx-1)*(jmx-1)*n_var*layers
      call alloc(imin_send_buf,1,ibuf_size, errmsg)
      call alloc(jmin_send_buf,1,jbuf_size, errmsg)
      call alloc(kmin_send_buf,1,kbuf_size, errmsg)
      call alloc(imin_recv_buf,1,ibuf_size, errmsg)
      call alloc(jmin_recv_buf,1,jbuf_size, errmsg)
      call alloc(kmin_recv_buf,1,kbuf_size, errmsg)
      call alloc(imax_send_buf,1,ibuf_size, errmsg)
      call alloc(jmax_send_buf,1,jbuf_size, errmsg)
      call alloc(kmax_send_buf,1,kbuf_size, errmsg)
      call alloc(imax_recv_buf,1,ibuf_size, errmsg)
      call alloc(jmax_recv_buf,1,jbuf_size, errmsg)
      call alloc(kmax_recv_buf,1,kbuf_size, errmsg)
    end subroutine setup_interface