module CLostProblemsVariables use CProblemDifinition implicit none public ! Input vars type::LostProblemsType type(CProblem) :: LostCirculation real(8) :: FlowRate end type LostProblemsType type(LostProblemsType)::LostProblems ! procedure (ActionInteger), pointer :: LostCirculationPtr contains subroutine ProcessLostProblemsDueTime(time) implicit none integer :: time if(LostProblems%LostCirculation%ProblemType == Time_ProblemType) call ProcessDueTime(LostProblems%LostCirculation, ChangeLostCirculation, time) end subroutine subroutine ProcessLostProblemsDuePumpStrokes(strokes) implicit none integer :: strokes if(LostProblems%LostCirculation%ProblemType == PumpStrokes_ProblemType) call ProcessDuePumpStrokes(LostProblems%LostCirculation, ChangeLostCirculation, strokes) end subroutine subroutine ProcessLostProblemsDueVolumePumped(volume) implicit none real(8) :: volume if(LostProblems%LostCirculation%ProblemType == VolumePumped_ProblemType) call ProcessDueVolumePumped(LostProblems%LostCirculation, ChangeLostCirculation, volume) end subroutine subroutine ProcessLostProblemsDueDistanceDrilled(distance) implicit none real(8) :: distance if(LostProblems%LostCirculation%ProblemType == DistanceDrilled_ProblemType) call ProcessDueDistanceDrilled(LostProblems%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