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.

CBitProblemsVariables.f90 3.2 KiB

пре 1 година
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. module CBitProblemsVariables
  2. use CProblemDifinition
  3. use CLog3
  4. implicit none
  5. public
  6. ! Input vars
  7. type(CProblem) :: PlugJets
  8. type(CProblem) :: JetWashout
  9. integer :: PlugJetsCount
  10. integer :: JetWashoutCount
  11. procedure (ActionInteger), pointer :: PlugJetsPtr
  12. procedure (ActionInteger), pointer :: JetWashoutPtr
  13. contains
  14. subroutine ProcessBitProblemsDueTime(time)
  15. implicit none
  16. integer :: time
  17. if(PlugJets%ProblemType == Time_ProblemType) call ProcessDueTime(PlugJets, ChangePlugJets, time)
  18. if(JetWashout%ProblemType == Time_ProblemType) call ProcessDueTime(JetWashout, ChangeJetWashout, time)
  19. end subroutine
  20. subroutine ProcessBitProblemsDuePumpStrokes(strokes)
  21. implicit none
  22. integer :: strokes
  23. if(PlugJets%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(PlugJets, ChangePlugJets, strokes)
  24. if(JetWashout%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(JetWashout, ChangeJetWashout, strokes)
  25. end subroutine
  26. subroutine ProcessBitProblemsDueVolumePumped(volume)
  27. implicit none
  28. real(8) :: volume
  29. if(PlugJets%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(PlugJets, ChangePlugJets, volume)
  30. if(JetWashout%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(JetWashout, ChangeJetWashout, volume)
  31. end subroutine
  32. subroutine ProcessBitProblemsDueDistanceDrilled(distance)
  33. implicit none
  34. real(8) :: distance
  35. if(PlugJets%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(PlugJets, ChangePlugJets, distance)
  36. if(JetWashout%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(JetWashout, ChangeJetWashout, distance)
  37. end subroutine
  38. subroutine ChangePlugJets(status)
  39. USE FricPressDropVars
  40. implicit none
  41. integer, intent (in) :: status
  42. if(associated(PlugJetsPtr)) call PlugJetsPtr(status)
  43. if(status == Clear_StatusType) BitJetsPlugged = 0
  44. if(status == Executed_StatusType) BitJetsPlugged = 1
  45. endsubroutine
  46. subroutine ChangeJetWashout(status)
  47. USE FricPressDropVars
  48. implicit none
  49. integer, intent (in) :: status
  50. if(associated(JetWashoutPtr)) call JetWashoutPtr(status)
  51. if(status == Clear_StatusType) BitJetsWashedOut = 0
  52. if(status == Executed_StatusType) BitJetsWashedOut = 1
  53. endsubroutine
  54. subroutine SubscribePlugJets(v)
  55. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribePlugJets
  56. !DEC$ ATTRIBUTES ALIAS: 'SubscribePlugJets' :: SubscribePlugJets
  57. implicit none
  58. procedure (ActionInteger) :: v
  59. PlugJetsPtr => v
  60. end subroutine
  61. subroutine SubscribeJetWashout(v)
  62. !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeJetWashout
  63. !DEC$ ATTRIBUTES ALIAS: 'SubscribeJetWashout' :: SubscribeJetWashout
  64. implicit none
  65. procedure (ActionInteger) :: v
  66. JetWashoutPtr => v
  67. end subroutine
  68. end module CBitProblemsVariables