|
12345678910111213141516171819202122232425262728293031323334353637 |
- module CFormation
- use CFormationVariables
- implicit none
- public
- contains
- integer function SetFormations(count, array)
- !DEC$ ATTRIBUTES DLLEXPORT::SetFormations
- !DEC$ ATTRIBUTES ALIAS: 'SetFormations' :: SetFormations
- implicit none
- integer, intent(in) :: count
- integer :: i
- type(CFormationItem), intent(inout), target :: array(count)
- type(CFormationItem), pointer :: item
- FormationCount = count
- if(size(Formations) > 0) then
- deallocate(Formations)
- end if
- if(count > 0) then
- allocate(Formations(count))
- do i = 1, count
- item => array(i)
- Formations(i)%Top = item%Top
- Formations(i)%Thickness = item%Thickness
- Formations(i)%Drillablity = item%Drillablity
- Formations(i)%Abrasiveness = item%Abrasiveness
- Formations(i)%ThresholdWeight = item%ThresholdWeight
- Formations(i)%PorePressureGradient = item%PorePressureGradient
- !print*, "==========================="
- !print*, "Formations(", i, ")%Top=", Formations(i)%Top
- !print*, "Formations(",i,")%Thickness", Formations(i)%Thickness
- !print*, "Formations(",i,")%Drillablity", Formations(i)%Drillablity
- end do
- end if
-
- SetFormations = 0
- end function SetFormations
- end module CFormation
|