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.

CLostProblems.i90 2.8 KiB

1 vuosi sitten
1 vuosi sitten
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/Problems/CLostProblems.f90"
  2. module CLostProblems
  3. use SimulationVariables
  4. implicit none
  5. public
  6. contains
  7. subroutine LostProblemsFromJson(parent)
  8. type(json_value),pointer :: parent
  9. type(json_core) :: json
  10. type(json_value),pointer :: p,pval
  11. call json%get(parent,'LostProblems',p)
  12. call ProblemFromJson(p,"LostCirculation",data%problems%LostProblems%LostCirculation)
  13. call json%get(p,'FlowRate',pval)
  14. call json%get(pval,data%problems%LostProblems%FlowRate)
  15. end subroutine
  16. subroutine LostProblemsToJson(parent)
  17. type(json_value),pointer :: parent
  18. type(json_core) :: json
  19. type(json_value),pointer :: p
  20. ! 1. create new node
  21. call json%create_object(p,'LostProblems')
  22. ! 2. add member of data type to new node
  23. call ProblemToJson(p,"LostCirculation",data%problems%LostProblems%LostCirculation)
  24. call json%add(p,"FlowRate",data%problems%LostProblems%FlowRate)
  25. ! 3. add new node to parent
  26. call json%add(parent,p)
  27. end subroutine
  28. subroutine ProcessLostProblemsDueTime(time)
  29. implicit none
  30. integer :: time
  31. if(data%problems%LostProblems%LostCirculation%ProblemType == Time_ProblemType) call ProcessDueTime(data%problems%LostProblems%LostCirculation, ChangeLostCirculation, time)
  32. end subroutine
  33. subroutine ProcessLostProblemsDuePumpStrokes(strokes)
  34. implicit none
  35. integer :: strokes
  36. if(data%problems%LostProblems%LostCirculation%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(data%problems%LostProblems%LostCirculation, ChangeLostCirculation, strokes)
  37. end subroutine
  38. subroutine ProcessLostProblemsDueVolumePumped(volume)
  39. implicit none
  40. real(8) :: volume
  41. if(data%problems%LostProblems%LostCirculation%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(data%problems%LostProblems%LostCirculation, ChangeLostCirculation, volume)
  42. end subroutine
  43. subroutine ProcessLostProblemsDueDistanceDrilled(distance)
  44. implicit none
  45. real(8) :: distance
  46. if(data%problems%LostProblems%LostCirculation%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(data%problems%LostProblems%LostCirculation, ChangeLostCirculation, distance)
  47. end subroutine
  48. subroutine ChangeLostCirculation(status)
  49. implicit none
  50. integer, intent (in) :: status
  51. ! if(associated(LostCirculationPtr)) call LostCirculationPtr(status)
  52. !if(status == Clear_StatusType) if(print_log) print*,'On_LostCirculation_Clear'
  53. !if(status == Executed_StatusType) if(print_log) print*,'On_LostCirculation_Execute'
  54. endsubroutine
  55. end module CLostProblems