write_header Subroutine

public subroutine write_header(header_type, opt_integer_)

writes headers on screen

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: header_type

specifies the type of the header: 'main', 'input_read', 'input_check', 'input_summary', 'initialization', 'check_norm', 'save_basis', 'save_pes', 'radial_terms', 'save_radial_terms', 'reconstruction'

integer(kind=int32), intent(in), optional :: opt_integer_

optional integer used in case "block" to pass jtot value


Calls

proc~~write_header~~CallsGraph proc~write_header write_header proc~write_message write_message proc~write_header->proc~write_message proc~write_error write_error proc~write_header->proc~write_error interface~incorrect_value incorrect_value proc~write_header->interface~incorrect_value proc~write_error->proc~write_message proc~incorrect_value_ch incorrect_value_ch interface~incorrect_value->proc~incorrect_value_ch proc~incorrect_value_dp incorrect_value_dp interface~incorrect_value->proc~incorrect_value_dp proc~incorrect_value_int32 incorrect_value_int32 interface~incorrect_value->proc~incorrect_value_int32 proc~incorrect_value_sp incorrect_value_sp interface~incorrect_value->proc~incorrect_value_sp proc~incorrect_value_ch->proc~write_error proc~incorrect_value_dp->proc~write_error proc~incorrect_value_int32->proc~write_error proc~incorrect_value_sp->proc~write_error

Called by

proc~~write_header~~CalledByGraph proc~write_header write_header program~scattering SCATTERING program~scattering->proc~write_header

Contents

Source Code


Variables

Type Visibility Attributes Name Initial
character(len=100), private :: header_star
character(len=100), private :: header_str
integer(kind=int32), private :: len_str_
character(len=10), private :: tmp_str_

Source Code

      subroutine write_header(header_type, opt_integer_)
         !! writes headers on screen
         character(len = *), intent(in) :: header_type
            !! specifies the type of the header: 'main', 'input_read',
            !! 'input_check', 'input_summary', 'initialization', 'check_norm',
            !! 'save_basis', 'save_pes', 'radial_terms', 'save_radial_terms',
            !! 'reconstruction'
         integer(int32), optional, intent(in) :: opt_integer_
            !! optional integer used in case "block" to pass jtot value
         !---------------------------------------------------------------------!
         character(len = 100) :: header_star, header_str
         character(len = 10)  :: tmp_str_
         integer(int32) :: len_str_
         !---------------------------------------------------------------------!
         select case(trim(header_type))
            case('main')
               write(header_star, fmt = "(a90)") repeat("-", 90)
               call write_message(header_star)
               call write_message(header_star)
               write(header_str, fmt = '(a,25x,a43,20x,a)')                    &
                       '|','BIGOS quantum scattering package, vs. 0.0.1','|'
               call write_message(header_str)
               write(header_str, fmt = '(a,36x,a19,33x,a)')                    &
                       '|', 'the SCATTERING code','|'
               call write_message(header_str)
               write(header_str, fmt = '(a,29x,a31,28x,a)')                    &
                       '|', 'adjusted for H2-He calculations','|'
               call write_message(header_str)
               write(header_str, fmt = '(a,37x,a17,34x,a)')                    &
                       '|', 'by Hubert Jozwiak','|'
               call write_message(header_str)
               write(header_str, fmt = '(a,40x,a11,37x,a)')                    &
                       '|', '20/12/2023 ','|'
               call write_message(header_star)
               call write_message(header_star)
            case('jtot_loop')
               call write_message(repeat("-", 90))
               call write_message(repeat(" ", 20) // "-- " //                  &
                  "Start the loop over total angular momentum" // " --")
            case('block')
               call write_message(repeat('=', 90))
               if (present(opt_integer_)) then
                  write(tmp_str_, "(i10)") opt_integer_
                  len_str_ = len_trim(tmp_str_)
                  write(*, '("||", A, "JTOT = ", A, A, "||")')                 &
                     repeat(' ', 39 - len_str_), tmp_str_, repeat(' ', 40)
                  call write_message(repeat('=', 90))
               else
                  call write_error("JTOT value not provided in " //            &
                     "write_header_block")
               endif
            case('loop_terminated')
               call write_message(repeat('=', 90))
               call write_message(repeat(" ", 20) // "-- " //                  &
                  "Finished the loop over total angular momentum" // " --")
            case('summary')
               call write_message(repeat('-', 90))
               call write_message("|" // repeat(" ", 40) // "SUMMARY" //       &
                  repeat(" ", 41) // "|")
               call write_message(repeat('-', 90))
            case default
               call incorrect_value('header_type (write_header)', header_type)
         end select
         !---------------------------------------------------------------------!
      end subroutine write_header