Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

77 lines
2.3 KiB

  1. subroutine Bit_Specification
  2. use sROP_Other_Variables
  3. use sROP_Variables
  4. use CStringConfigurationVariables
  5. use ConfigurationVariables
  6. implicit none
  7. INTEGER :: io
  8. integer :: i , BitClass_name
  9. real(8) :: rd
  10. !ROP_Spec%H1=1.9
  11. !ROP_Spec%H2=7.
  12. !ROP_Spec%H3=1.
  13. !ROP_Spec%wdmax=7.
  14. ROP_Spec%BitClass = (Configuration%StringConfiguration%BitDefinition%BitCodeHundreds*100)+(Configuration%StringConfiguration%BitDefinition%BitCodeTens*10)+Configuration%StringConfiguration%BitDefinition%BitCodeOnes
  15. rd = SNGL(ROP_Spec%BitClass)/10.d0
  16. ROP_Spec%BrCoef = ( (SNGL(ROP_Spec%BitClass)/10.d0)-(DINT(rd)) )*10.d0
  17. BitClass_name = (ROP_Spec%BitClass)/10
  18. if ( (any(BitClass_name==(/11,12,13,14,21,22,23,24,31,32,33,34,41/))) ) then
  19. open(unit=233,file="Bit_Database.TXT")
  20. READ (233,*)
  21. DO i=1,13!(14-1(/=10))
  22. READ (233,*) ROP_Spec%name, ROP_Spec%H1, ROP_Spec%H2, ROP_Spec%H3, ROP_Spec%wdmax
  23. if ( ROP_Spec%name==BitClass_name ) then
  24. exit
  25. end if
  26. END DO
  27. close (233)
  28. else
  29. ROP_Spec%H1=1.50d0
  30. ROP_Spec%H2=1.0d0
  31. ROP_Spec%H3=.020d0
  32. ROP_Spec%wdmax=10.0d0
  33. end if
  34. !print*, 'ROP_Spec%H1=' , ROP_Spec%H1
  35. !print*, 'ROP_Spec%H2=' , ROP_Spec%H2
  36. !print*, 'ROP_Spec%H3=' , ROP_Spec%H3
  37. !print*, 'ROP_Spec%wdmax=' , ROP_Spec%wdmax
  38. !print*, 'ROP_Spec%name=' , ROP_Spec%name
  39. ! filename = 'Bit_Database.TXT'
  40. !open (UNIT=3, FILE=filename )
  41. !!print*, 'ROP_Spec%wdmax1=' , ROP_Spec%wdmax
  42. ! !print*, 'ROP_Spec%name1=' , ROP_Spec%name
  43. !!openif: if ( ROP_Spec%status == 0 ) then
  44. ! read (3,*,IOSTAT=ROP_Spec%status) ! Get next value
  45. ! readloop: do i=1,14
  46. ! read (3,*,IOSTAT=ROP_Spec%status) ROP_Spec%name, ROP_Spec%H1, ROP_Spec%H2, ROP_Spec%H3, ROP_Spec%wdmax ! Get next value
  47. ! !print*, 'ROP_Spec%wdmax=' , ROP_Spec%wdmax
  48. ! !print*, 'ROP_Spec%name=' , ROP_Spec%name
  49. ! if ( ROP_Spec%status /= 0 ) exit ! EXIT if not valid.
  50. ! if ( ROP_Spec%name == ROP_Spec%BitClass/10) exit
  51. ! end do readloop
  52. !!endif openif
  53. end subroutine