tem_spacetime_hash_id Function

public function tem_spacetime_hash_id(me, conf) result(id)

This function create unique id to create anonymous variable in tem_variable_loadMapping

Arguments

Type IntentOptional Attributes Name
type(tem_spacetime_fun_type), intent(in) :: me
type(flu_State), intent(in) :: conf

Return Value character(len=labelLen)


Calls

proc~~tem_spacetime_hash_id~~CallsGraph proc~tem_spacetime_hash_id tem_spacetime_hash_id proc~aot_fun_open aot_fun_open proc~tem_spacetime_hash_id->proc~aot_fun_open proc~aot_fun_id aot_fun_id proc~tem_spacetime_hash_id->proc~aot_fun_id proc~aot_fun_close aot_fun_close proc~tem_spacetime_hash_id->proc~aot_fun_close

Called by

proc~~tem_spacetime_hash_id~~CalledByGraph proc~tem_spacetime_hash_id tem_spacetime_hash_id proc~tem_variable_loadmapping_single tem_variable_loadMapping_single proc~tem_variable_loadmapping_single->proc~tem_spacetime_hash_id proc~tem_variable_loadmapping_vector tem_variable_loadMapping_vector proc~tem_variable_loadmapping_vector->proc~tem_variable_loadmapping_single interface~tem_variable_loadmapping tem_variable_loadMapping interface~tem_variable_loadmapping->proc~tem_variable_loadmapping_single interface~tem_variable_loadmapping->proc~tem_variable_loadmapping_vector proc~tem_load_bc_state tem_load_bc_state proc~tem_load_bc_state->interface~tem_variable_loadmapping

Contents

Source Code


Source Code

  function tem_spacetime_hash_id(me, conf) result(id)
    ! -------------------------------------------------------------------- !
    type(tem_spacetime_fun_type), intent(in) :: me
    type(flu_State), intent(in) :: conf
    character(len=labelLen) :: id
    ! -------------------------------------------------------------------- !
    type(aot_fun_type) :: fun
    integer :: i
    character(len=labelLen) :: tmp
    real :: rnd
    ! -------------------------------------------------------------------- !

    id = me%fun_kind
    select case(trim(me%fun_kind))
    case('none')
      id = trim(id) // 'NONE'

    case('const')
      id = trim(id) // 'const:'
      do i=1,ubound(me%const,1)
        write(tmp,'(en17.8)') me%const(i)
        id = trim(id) // trim(adjustl(tmp))
      end do

    case('lua_fun')
      id = trim(id) // 'lua_fun:'
      call aot_fun_open(L = conf, fun = fun, ref = me%lua_fun_ref)
      tmp = trim(aot_fun_id(fun))
      call aot_fun_close(L = conf, fun = fun)
      id = trim(id) // trim(tmp)

    case('combined')
      id = trim(id) // 'combined-TODO:'
      call random_number(rnd)
      write(tmp, '(en17.8)') rnd
      id = trim(id) // trim(tmp)
    case('miescatter_displacementfieldz')
      id = trim(id) // 'mieZ-TODO:'
      call random_number(rnd)
      write(tmp, '(en17.8)') rnd
      id = trim(id) // trim(tmp)
    case('miescatter_magneticfieldx')
      id = trim(id) // 'mieX-TODO:'
      call random_number(rnd)
      write(tmp, '(en17.8)') rnd
      id = trim(id) // trim(tmp)
    case('miescatter_magneticfieldy')
      id = trim(id) // 'mieY-TODO:'
      call random_number(rnd)
      write(tmp, '(en17.8)') rnd
      id = trim(id) // trim(tmp)
    case('cylindricalWave')
      id = trim(id) // 'cylwav-TODO:'
      call random_number(rnd)
      write(tmp, '(en17.8)') rnd
      id = trim(id) // trim(tmp)
    case('apesmate')
      id = trim(id) // 'apesmate-TODO:'
      call random_number(rnd)
      write(tmp, '(en17.8)') rnd
      id = trim(id) // trim(tmp)
    case('precice')
      id = trim(id) // 'precice-TODO:'
      call random_number(rnd)
      write(tmp, '(en17.8)') rnd
      id = trim(id) // trim(tmp)
    case default
      id = trim(id) // 'UNKNOWN:'
      call random_number(rnd)
      write(tmp, '(en17.8)') rnd
      id = trim(id) // trim(tmp)
    end select

  end function tem_spacetime_hash_id