MONC
Private Member Functions | List of all members
collections_mod::c_next_real Interface Reference

Private Member Functions

real(kind=default_precision) function iterator_get_next_real (iterator)
 Returns the next real (double precision) referenced by the iterator and advanced it,
or an error if it has reached the end of iteration. More...
 

Detailed Description

Definition at line 598 of file collections.F90.

Member Function/Subroutine Documentation

◆ iterator_get_next_real()

real(kind=default_precision) function collections_mod::c_next_real::iterator_get_next_real ( type(iterator_type), intent(inout)  iterator)
private

Returns the next real (double precision) referenced by the iterator and advanced it,
or an error if it has reached the end of iteration.

Parameters
iteratorThe iterator of which to access and advance the next element
Returns
The next double precision real, conversion between single and integers is done automatically

Definition at line 3231 of file collections.F90.

3232  type(iterator_type), intent(inout) :: iterator
3233 
3234  class(*), pointer :: generic
3235 
3236  generic=>iterator_get_next_generic(iterator)
3237  if (associated(generic)) then
3238  select type(vr=>generic)
3239  type is (real(kind=default_precision))
3240  iterator_get_next_real=vr
3241  type is (real)
3242  iterator_get_next_real=conv_single_real_to_double(vr)
3243  type is (integer)
3244  iterator_get_next_real=conv_single_real_to_double(conv_to_real(vr))
3245  end select
3246  else
3247  call log_log(log_error, "Can not get next real in iterator as iterator has reached end of collection")
3248  end if

The documentation for this interface was generated from the following file:
logging_mod::log_error
integer, parameter, public log_error
Only log ERROR messages.
Definition: logging.F90:11
logging_mod::log_log
subroutine, public log_log(level, message, str)
Logs a message at the specified level. If the level is above the current level then the message is ig...
Definition: logging.F90:75
datadefn_mod::default_precision
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
Definition: datadefn.F90:17