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.
 
 
 
 
 
 

34 lines
1.3 KiB

  1. module CWellSurveyData
  2. use CWellSurveyDataVariables
  3. implicit none
  4. public
  5. contains
  6. integer function SetSurveyData(count, array)
  7. !DEC$ ATTRIBUTES DLLEXPORT::SetSurveyData
  8. !DEC$ ATTRIBUTES ALIAS: 'SetSurveyData' :: SetSurveyData
  9. implicit none
  10. integer, intent(in) :: count
  11. integer :: i
  12. type(CSurveyDataItem), intent(inout), target :: array(count)
  13. type(CSurveyDataItem), pointer :: item
  14. SurveyDataCount = count
  15. if(size(WellSurveyData) > 0) then
  16. deallocate(WellSurveyData)
  17. end if
  18. if(count > 0) then
  19. allocate(WellSurveyData(count))
  20. do i = 1, count
  21. item => array(i)
  22. WellSurveyData(i)%MeasuredDepth = item%MeasuredDepth
  23. WellSurveyData(i)%Inclination = item%Inclination
  24. WellSurveyData(i)%Azimoth = item%Azimoth
  25. WellSurveyData(i)%TotalVerticalDepth = item%TotalVerticalDepth
  26. WellSurveyData(i)%X = item%X
  27. WellSurveyData(i)%Y = item%Y
  28. WellSurveyData(i)%Z = item%Z
  29. end do
  30. end if
  31. SetSurveyData = 0
  32. end function SetSurveyData
  33. end module CWellSurveyData