expand_settings Subroutine

public subroutine expand_settings(settings)

Arguments

Type IntentOptional Attributes Name
type(settings_type), intent(inout) :: settings

Called by

proc~~expand_settings~~CalledByGraph proc~expand_settings expand_settings proc~w90_set_option_c2d w90_set_option_c2d proc~w90_set_option_c2d->proc~expand_settings proc~w90_set_option_i1d w90_set_option_i1d proc~w90_set_option_i1d->proc~expand_settings proc~w90_set_option_i2d w90_set_option_i2d proc~w90_set_option_i2d->proc~expand_settings proc~w90_set_option_int w90_set_option_int proc~w90_set_option_int->proc~expand_settings proc~w90_set_option_logical w90_set_option_logical proc~w90_set_option_logical->proc~expand_settings proc~w90_set_option_r1d w90_set_option_r1d proc~w90_set_option_r1d->proc~expand_settings proc~w90_set_option_r2d w90_set_option_r2d proc~w90_set_option_r2d->proc~expand_settings proc~w90_set_option_real w90_set_option_real proc~w90_set_option_real->proc~expand_settings proc~w90_set_option_text w90_set_option_text proc~w90_set_option_text->proc~expand_settings interface~w90_set_option w90_set_option interface~w90_set_option->proc~w90_set_option_c2d interface~w90_set_option->proc~w90_set_option_i1d interface~w90_set_option->proc~w90_set_option_i2d interface~w90_set_option->proc~w90_set_option_int interface~w90_set_option->proc~w90_set_option_logical interface~w90_set_option->proc~w90_set_option_r1d interface~w90_set_option->proc~w90_set_option_r2d interface~w90_set_option->proc~w90_set_option_real interface~w90_set_option->proc~w90_set_option_text proc~w90_set_option_double1d_f w90_set_option_double1d_f proc~w90_set_option_double1d_f->interface~w90_set_option proc~w90_set_option_double2d_f w90_set_option_double2d_f proc~w90_set_option_double2d_f->interface~w90_set_option proc~w90_set_option_double_f w90_set_option_double_f proc~w90_set_option_double_f->interface~w90_set_option proc~w90_set_option_int1d_f w90_set_option_int1d_f proc~w90_set_option_int1d_f->interface~w90_set_option proc~w90_set_option_int2d_f w90_set_option_int2d_f proc~w90_set_option_int2d_f->interface~w90_set_option proc~w90_set_option_int_f w90_set_option_int_f proc~w90_set_option_int_f->interface~w90_set_option proc~w90_set_option_logical_f w90_set_option_logical_f proc~w90_set_option_logical_f->interface~w90_set_option proc~w90_set_option_text2d_f w90_set_option_text2d_f proc~w90_set_option_text2d_f->interface~w90_set_option proc~w90_set_option_text_f w90_set_option_text_f proc~w90_set_option_text_f->interface~w90_set_option

Source Code

  subroutine expand_settings(settings) ! this is a compromise to avoid a fixed size
    type(settings_data), allocatable :: nentries(:)
    type(settings_type), intent(inout) :: settings
    integer :: n, m ! old, new sizes
    integer, parameter :: incsize = 20 ! default increment when settings array grows
    n = settings%num_entries_max
    m = n + incsize
    allocate (nentries(m)); nentries(1:n) = settings%entries(1:n); call move_alloc(nentries, settings%entries) !f2003, note that "new" space not initialised
    settings%num_entries_max = m
  end subroutine expand_settings