read_periodic_bc_file Subroutine

private subroutine read_periodic_bc_file(files, control, bc)

Read periodic.md file in the system/mesh/layout/periodic.md

Arguments

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

Files' name and handler

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

Control parameters

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

boundary conditions and fixed values


Called by

proc~~read_periodic_bc_file~~CalledByGraph proc~read_periodic_bc_file read_periodic_bc_file proc~read_interface_map read_interface_map proc~read_interface_map->proc~read_periodic_bc_file proc~setup_grid setup_grid proc~setup_grid->proc~read_interface_map proc~setup_solver setup_solver proc~setup_solver->proc~setup_grid 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_periodic_bc_file(files, control, bc)
        !< Read periodic.md file in the system/mesh/layout/periodic.md
        implicit none
        type(filetype), intent(in) :: files
        !< Files' name and handler
        type(controltype), intent(in) :: control
        !< Control parameters
        type(boundarytype), intent(inout) :: bc
        !< boundary conditions and fixed values
        integer :: ios
        integer :: max_call
        integer :: i
        integer :: b1, b2
        integer :: f1, f2
        integer :: class

        open(files%PERIODIC_FILE_UNIT, file=files%periodicfile, status='old', action='read')
        read(files%PERIODIC_FILE_UNIT,*) !ignore first line (header)
        max_call = control%total_process*6
        do i=1,max_call
          read(files%PERIODIC_FILE_UNIT,*, iostat=ios) b1,b2,f1,f2, class
          if(is_iostat_end(ios)) EXIT
          if(b1==control%process_id)then
            bc%PbcId(f1) = b2
          end if
        end do
        close(files%PERIODIC_FILE_UNIT)
      end subroutine read_periodic_bc_file