read_layout_file Subroutine

public subroutine read_layout_file(files, control, bc)

Read the layout file for particular processor

Arguments

Type IntentOptional AttributesName
type(filetype), intent(inout) :: files

Files' name and handler

type(controltype), intent(in) :: control

Processor id for current block

type(boundarytype), intent(inout) :: bc

boundary conditions and fixed values


Calls

proc~~read_layout_file~~CallsGraph proc~read_layout_file read_layout_file debugcall debugcall proc~read_layout_file->debugcall proc~get_next_token_parallel get_next_token_parallel proc~read_layout_file->proc~get_next_token_parallel

Called by

proc~~read_layout_file~~CalledByGraph proc~read_layout_file read_layout_file proc~setup_solver setup_solver proc~setup_solver->proc~read_layout_file 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 read_layout_file(files,control, bc)
    !< Read the layout file for particular processor
    implicit none
    type(filetype), intent(inout) :: files
    !< Files' name and handler
    type(boundarytype), intent(inout) :: bc
    !< boundary conditions and fixed values
    character(len=STRING_BUFFER_LENGTH) :: buf
    !< read buffer
    character(len=128) :: grid_file_buf
    !< Name of the gridfile to load
    character(len=128) :: bc_file
    !< Name of the boundary condition file to load.
    type(controltype) ,intent(in)::control
    !< Processor id for current block
    integer :: total_entries      
    !< Total enteries in layout.md for each processorS
    integer :: i,buf_id 
    DebugCall('read_layout_file')

    open(files%CONFIG_FILE_UNIT, file=files%layout_file)

    ! Read the parameters from the file
    call get_next_token_parallel(files%CONFIG_FILE_UNIT, buf)
    read(buf,*)!control%total_process
    call get_next_token_parallel(files%CONFIG_FILE_UNIT, buf)
    read(buf,*)total_entries
    i = 0
    !print *, process_id
    call get_next_token_parallel(files%CONFIG_FILE_UNIT, buf)
    do while(i < control%process_id)
          call get_next_token_parallel(files%CONFIG_FILE_UNIT, buf)
       i = i+1
    end do
    read(buf,*) buf_id, grid_file_buf, bc_file, bc%imin_id, bc%imax_id, bc%jmin_id,bc%jmax_id,bc%kmin_id,bc%kmax_id
    write(files%gridfile, '(A)') 'system/mesh/gridfiles/'//trim(grid_file_buf)
    write(files%bcfile, '(A)') 'system/mesh/bc/'//trim(bc_file)
  end subroutine read_layout_file