module CLostProblemsVariables use CProblemDifinition implicit none public ! Input vars type(CProblem) :: LostCirculation real(8) :: FlowRate procedure (ActionInteger), pointer :: LostCirculationPtr contains subroutine ProcessLostProblemsDueTime(time) implicit none integer :: time if(LostCirculation%ProblemType == Time_ProblemType) call ProcessDueTime(LostCirculation, ChangeLostCirculation, time) end subroutine subroutine ProcessLostProblemsDuePumpStrokes(strokes) implicit none integer :: strokes if(LostCirculation%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(LostCirculation, ChangeLostCirculation, strokes) end subroutine subroutine ProcessLostProblemsDueVolumePumped(volume) implicit none real(8) :: volume if(LostCirculation%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(LostCirculation, ChangeLostCirculation, volume) end subroutine subroutine ProcessLostProblemsDueDistanceDrilled(distance) implicit none real(8) :: distance if(LostCirculation%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(LostCirculation, ChangeLostCirculation, distance) end subroutine subroutine ChangeLostCirculation(status) implicit none integer, intent (in) :: status if(associated(LostCirculationPtr)) call LostCirculationPtr(status) !if(status == Clear_StatusType) print*,'On_LostCirculation_Clear' !if(status == Executed_StatusType) print*,'On_LostCirculation_Execute' endsubroutine subroutine SubscribeLostCirculation(v) !DEC$ ATTRIBUTES DLLEXPORT :: SubscribeLostCirculation !DEC$ ATTRIBUTES ALIAS: 'SubscribeLostCirculation' :: SubscribeLostCirculation implicit none procedure (ActionInteger) :: v LostCirculationPtr => v end subroutine end module CLostProblemsVariables