load_temporal_cos Subroutine

private subroutine load_temporal_cos(freq, phi, offset, conf, thandle)

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(inout) :: freq

temporal predefined fun type

real(kind=rk), intent(inout) :: phi

temporal predefined fun type

real(kind=rk), intent(inout) :: offset

temporal predefined fun type

type(flu_State) :: conf

lua state type

integer, intent(in) :: thandle

aotus parent handle


Calls

proc~~load_temporal_cos~~CallsGraph proc~load_temporal_cos load_temporal_cos proc~aot_get_val~2 aot_get_val proc~load_temporal_cos->proc~aot_get_val~2 proc~tem_abort tem_abort proc~load_temporal_cos->proc~tem_abort mpi_abort mpi_abort proc~tem_abort->mpi_abort

Called by

proc~~load_temporal_cos~~CalledByGraph proc~load_temporal_cos load_temporal_cos proc~tem_load_temporal tem_load_temporal proc~tem_load_temporal->proc~load_temporal_cos proc~load_spacetime_predefined load_spacetime_predefined proc~load_spacetime_predefined->proc~tem_load_temporal proc~tem_load_spacetime_single tem_load_spacetime_single proc~tem_load_spacetime_single->proc~load_spacetime_predefined proc~tem_load_spacetime_single->proc~tem_load_spacetime_single proc~tem_load_spacetime_table tem_load_spacetime_table proc~tem_load_spacetime_table->proc~tem_load_spacetime_single interface~tem_load_spacetime tem_load_spacetime interface~tem_load_spacetime->proc~tem_load_spacetime_single

Contents

Source Code


Source Code

  subroutine load_temporal_cos( freq, phi, offset, conf, thandle )
    ! ---------------------------------------------------------------------------
    !> temporal predefined fun type
    real(kind=rk), intent(inout) :: freq, phi, offset
    !> lua state type
    type(flu_State) :: conf
    !> aotus parent handle
    integer, intent(in) :: thandle
    ! ---------------------------------------------------------------------------
    ! local variables
    integer :: iError
    ! ---------------------------------------------------------------------------

    ! load angular velocity
    call aot_get_val( L       = conf,      &
      &               thandle = thandle,   &
      &               key     = 'frequency',       &
      &               val     = freq,         &
      &               ErrCode = iError,                                        &
      &               default = 1.0_rk)
    if (btest(iError, aoterr_Fatal)) then
      write(logUnit(1),*)'FATAL Error occured, while retrieving min_factor :'
      if (btest(iError, aoterr_NonExistent))                                   &
        & write(logUnit(1),*)'Variable not existent!'
      if (btest(iError, aoterr_WrongType))                                     &
        & write(logUnit(1),*)'Variable has wrong type!'
      write(logUnit(1),*)'STOPPING'
      call tem_abort()
    end if

    ! load initial phase
    call aot_get_val( L       = conf,    &
      &               thandle = thandle, &
      &               key     = 'phase', &
      &               val     = phi,     &
      &               ErrCode = iError,                                        &
      &               default = 0.0_rk   )
    if (btest(iError, aoterr_Fatal)) then
      write(logUnit(1),*)'FATAL Error occured, while retrieving max_factor :'
      if (btest(iError, aoterr_NonExistent))                                   &
        & write(logUnit(1),*)'Variable not existent!'
      if (btest(iError, aoterr_WrongType))                                     &
        & write(logUnit(1),*)'Variable has wrong type!'
      write(logUnit(1),*)'STOPPING'
      call tem_abort()
    end if

    ! load initial phase
    call aot_get_val( L       = conf,    &
      &               thandle = thandle, &
      &               key     = 'offset', &
      &               val     = offset,   &
      &               ErrCode = iError,                                        &
      &               default = 0.0_rk   )
    if (btest(iError, aoterr_Fatal)) then
      write(logUnit(1),*)'FATAL Error occured, while retrieving max_factor :'
      if (btest(iError, aoterr_NonExistent))                                   &
        & write(logUnit(1),*)'Variable not existent!'
      if (btest(iError, aoterr_WrongType))                                     &
        & write(logUnit(1),*)'Variable has wrong type!'
      write(logUnit(1),*)'STOPPING'
      call tem_abort()
    end if

    write(logUnit(3), "(A, F10.5)") " frequency: ", freq
    write(logUnit(3), "(A, F10.5)") "     phase: ", phi
    write(logUnit(3), "(A, F10.5)") "    offset: ", offset

  end subroutine load_temporal_cos