d4par Subroutine

public subroutine d4par(fname, param_, lmbd, env)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fname
type(dftd_parameter), intent(out) :: param_
integer, intent(in) :: lmbd
type(mctc_logger) :: env

Source Code

subroutine d4par(fname, param_, lmbd, env)
   character(len=*), intent(in) :: fname
   type(dftd_parameter), intent(out) :: param_
   integer, intent(in) :: lmbd
   type(mctc_logger) :: env

   class(damping_param), allocatable :: param

   call get_rational_damping(fname, param, merge(1.0_wp, 0.0_wp, lmbd == 3))
   if (allocated(param)) then
      select type(param)
      type is(rational_damping_param)
         env%sane = .true.
         param_%s6 = param%s6
         param_%s8 = param%s8
         param_%s9 = param%s9
         param_%a1 = param%a1
         param_%a2 = param%a2
         param_%alp = param%alp
      class default
         env%sane = .false.
      end select
   else
      env%sane = .false.
   end if
end subroutine d4par