gyrotropic_outprint_tensor Subroutine

private subroutine gyrotropic_outprint_tensor(f_out_name, arrEf, arrEf1D, arrEfW, units, comment, symmetrize)

Uses

  • proc~~gyrotropic_outprint_tensor~~UsesGraph proc~gyrotropic_outprint_tensor gyrotropic_outprint_tensor module~w90_parameters w90_parameters proc~gyrotropic_outprint_tensor->module~w90_parameters module~w90_io w90_io proc~gyrotropic_outprint_tensor->module~w90_io module~w90_parameters->module~w90_io module~w90_constants w90_constants module~w90_parameters->module~w90_constants module~w90_io->module~w90_constants

Arguments

Type IntentOptional AttributesName
character(len=30), intent(in) :: f_out_name
real(kind=dp), intent(in), optional dimension(:, :, :):: arrEf
real(kind=dp), intent(in), optional dimension(:):: arrEf1D
real(kind=dp), intent(in), optional dimension(:, :, :, :):: arrEfW
character(len=30), intent(in), optional :: units
character(len=120), intent(in), optional :: comment
logical, intent(in), optional :: symmetrize

Calls

proc~~gyrotropic_outprint_tensor~~CallsGraph proc~gyrotropic_outprint_tensor gyrotropic_outprint_tensor proc~io_file_unit io_file_unit proc~gyrotropic_outprint_tensor->proc~io_file_unit proc~gyrotropic_outprint_tensor_w gyrotropic_outprint_tensor_w proc~gyrotropic_outprint_tensor->proc~gyrotropic_outprint_tensor_w

Called by

proc~~gyrotropic_outprint_tensor~~CalledByGraph proc~gyrotropic_outprint_tensor gyrotropic_outprint_tensor proc~gyrotropic_main gyrotropic_main proc~gyrotropic_main->proc~gyrotropic_outprint_tensor

Contents


Source Code

  subroutine gyrotropic_outprint_tensor(f_out_name, arrEf, arrEF1D, arrEfW, units, comment, symmetrize)
    use w90_parameters, only: gyrotropic_nfreq, gyrotropic_freq_list, &
      nfermi, fermi_energy_list
    use w90_io, only: io_file_unit, seedname, stdout

    character(len=30), intent(in) :: f_out_name
    character(len=30), intent(in), optional :: units
    character(len=120), intent(in), optional :: comment
    real(kind=dp), dimension(:, :, :), intent(in), optional :: arrEf
    real(kind=dp), dimension(:, :, :, :), intent(in), optional :: arrEfW
    real(kind=dp), dimension(:), intent(in), optional :: arrEf1D
    logical, optional, intent(in) :: symmetrize

    character(len=120)  :: file_name
    integer             :: i, file_unit
    logical             :: lsym

    lsym = .true.
    if (present(symmetrize)) then
      if (.not. symmetrize) lsym = .false.
    endif

    file_name = trim(seedname)//"-gyrotropic-"//trim(f_out_name)//".dat"
    file_name = trim(file_name)
    file_unit = io_file_unit()
    write (stdout, '(/,3x,a)') '* '//file_name
    open (file_unit, FILE=file_name, STATUS='UNKNOWN', FORM='FORMATTED')

    if (present(comment)) write (file_unit, *) "#"//trim(comment)
    if (present(units)) write (file_unit, *) "# in units of [ "//trim(units)//" ] "

    if (present(arrEf)) then
      call gyrotropic_outprint_tensor_w(file_unit, 0.0_dp, arr33N=arrEf, symmetrize=lsym)
    elseif (present(arrEfW)) then
      do i = 1, gyrotropic_nfreq
        call gyrotropic_outprint_tensor_w(file_unit, real(gyrotropic_freq_list(i)), arr33N=arrEfW(:, :, :, i), symmetrize=lsym)
      enddo
    elseif (present(arrEf1D)) then
      call gyrotropic_outprint_tensor_w(file_unit, 0.0_dp, arrN=arrEf1D)
    endif

    close (file_unit)

  end subroutine gyrotropic_outprint_tensor