|
12345678910111213141516171819202122232425262728293031323334 |
- module CWellSurveyData
- use CWellSurveyDataVariables
- implicit none
- public
- contains
- integer function SetSurveyData(count, array)
- !DEC$ ATTRIBUTES DLLEXPORT::SetSurveyData
- !DEC$ ATTRIBUTES ALIAS: 'SetSurveyData' :: SetSurveyData
- implicit none
- integer, intent(in) :: count
- integer :: i
- type(CSurveyDataItem), intent(inout), target :: array(count)
- type(CSurveyDataItem), pointer :: item
- SurveyDataCount = count
- if(size(WellSurveyData) > 0) then
- deallocate(WellSurveyData)
- end if
- if(count > 0) then
- allocate(WellSurveyData(count))
- do i = 1, count
- item => array(i)
- WellSurveyData(i)%MeasuredDepth = item%MeasuredDepth
- WellSurveyData(i)%Inclination = item%Inclination
- WellSurveyData(i)%Azimoth = item%Azimoth
- WellSurveyData(i)%TotalVerticalDepth = item%TotalVerticalDepth
- WellSurveyData(i)%X = item%X
- WellSurveyData(i)%Y = item%Y
- WellSurveyData(i)%Z = item%Z
- end do
- end if
-
- SetSurveyData = 0
- end function SetSurveyData
- end module CWellSurveyData
|