init_antenna Subroutine

public subroutine init_antenna(driver_config_in, stir_config_in)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(driver_config_type), intent(in), optional :: driver_config_in
type(stir_config_type), intent(in), optional, dimension(:), allocatable :: stir_config_in

Contents

Source Code


Source Code

  subroutine init_antenna(driver_config_in, stir_config_in)
    use species, only: spec, nspec, init_species
    use run_parameters, only: beta
    implicit none
    type(driver_config_type), intent(in), optional :: driver_config_in
    type(stir_config_type), intent(in), dimension(:), allocatable, optional :: stir_config_in
    integer :: i
    
    if (initialized) return
    initialized = .true.
    
    if (.not. allocated(w_stir)) then
       call read_parameters(driver_config_in, stir_config_in)
       allocate (w_stir(nk_stir))
    end if
    
    beta_s = 0.
    if (beta > epsilon(0.0)) then
       do i=1,nspec
          !GGH What does this mean?  Is this a normalization?
          !GGH This converts from input frequency (normalized to kpar vA)
          !    to the code frequency
          !GGH This seems to give beta_s = 2*n0*T0/v_A^2
          beta_s = beta_s + beta*spec(i)%dens*spec(i)%mass
       end do
    else
       beta_s = 2.
    end if
  end subroutine init_antenna