setup_surface Subroutine

private subroutine setup_surface(files, control, bc)

Open MPI_shared write file, allocate memory and setup pointers

Arguments

Type IntentOptional AttributesName
type(filetype), intent(in) :: files
type(controltype), intent(in) :: control
type(boundarytype), intent(in) :: bc

Calls

proc~~setup_surface~~CallsGraph proc~setup_surface setup_surface proc~find_wall find_wall proc~setup_surface->proc~find_wall proc~link_aliases link_aliases proc~setup_surface->proc~link_aliases proc~allocate_memory~3 allocate_memory proc~setup_surface->proc~allocate_memory~3 mpi_file_open mpi_file_open proc~setup_surface->mpi_file_open mpi_barrier mpi_barrier proc~setup_surface->mpi_barrier debugcall debugcall proc~setup_surface->debugcall proc~link_aliases->debugcall proc~allocate_memory~3->debugcall interface~alloc alloc proc~allocate_memory~3->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_surface~~CalledByGraph proc~setup_surface setup_surface proc~write_surfnode write_surfnode proc~write_surfnode->proc~setup_surface proc~setup_solver setup_solver proc~setup_solver->proc~write_surfnode 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_surface(files, control, bc)
      !< Open MPI_shared write file, allocate memory and
      !< setup pointers

      implicit none
      type(boundarytype), intent(in) :: bc
      type(filetype), intent(in) :: files
      type(controltype), intent(in) :: control
      integer :: stat

      DebugCall('setup_surface')
      if(process_id==0)then
      open(files%NODESURF_FILE_UNIT, file=files%surface_node_points, iostat=stat)
      if(stat==0) close(files%NODESURF_FILE_UNIT, status='delete')
      end if
      call mpi_barrier(MPI_COMM_WORLD,ierr)
      call MPI_FILE_OPEN(MPI_COMM_WORLD, files%surface_node_points, &
                        MPI_MODE_WRONLY + MPI_MODE_CREATE + MPI_MODE_EXCL, &
                        MPI_INFO_NULL, thisfile, ierr)
      call find_wall(bc)
      call allocate_memory(control)
      call link_aliases()

    end subroutine setup_surface