This function create unique id to create anonymous variable in tem_variable_loadMapping
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_spacetime_fun_type), | intent(in) | :: | me | |||
type(flu_State), | intent(in) | :: | conf |
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