libsim  Versione6.3.0

◆ fnregister()

subroutine fnregister ( type(fndsv), intent(inout)  vfn,
type(fnds), intent(in), optional  fn,
integer, optional  order 
)

Register a function object in the vector function object.

If called without argoments allocate vectors to (0) if order is present force the order of added function

Parametri
[in,out]vfnvector function object to ampliate
[in]fnfunction object to add
orderorder to execute the new added function object

Definizione alla linea 415 del file alchimia.F03.

415 stat = .false.
416 if (.not. somefoundin) return
417 if (num == count(c_e(maybefn%fnds))) return
418 
419 !check if we have finish
420 allfoundout = .true.
421 do i=1, count(c_e(mybout))
422  foundout = .false.
423  do j =1, count(c_e(newbout))
424  if (newbout(j) == mybout(i)) foundout = .true.
425  end do
426  if (.not. foundout) allfoundout = .false.
427 end do
428 
429 
430 ! ok, all is done
431 if (allfoundout) then
432 
433 !!$ print *, "intermediate"
434 !!$ do i =1,size(maybefn)
435 !!$ if (c_e(maybefn(i))) print *,maybefn(i)
436 !!$ end do
437 
438  ! remove dry branch
439  newbout=cmiss
440  newbout(:size(mybout))=mybout
441  tmpbin=cmiss
442 
443  do i = count(c_e(maybefn%fnds)),1,-1
444  if (maybefn%fnds(i)%order /= order) then
445  CALL l4f_log(l4f_debug, "oracle: change order "//t2c(maybefn%fnds(i)%order))
446  order=maybefn%fnds(i)%order
447  iin=count(c_e(tmpbin))
448  iout=count(c_e(newbout))
449  newbout(iout+1:iout+iin)=tmpbin(:iin)

Generated with Doxygen.