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.

CFormation.f90 1.4 KiB

1 year ago
12345678910111213141516171819202122232425262728293031323334353637
  1. module CFormation
  2. use CFormationVariables
  3. implicit none
  4. public
  5. contains
  6. integer function SetFormations(count, array)
  7. !DEC$ ATTRIBUTES DLLEXPORT::SetFormations
  8. !DEC$ ATTRIBUTES ALIAS: 'SetFormations' :: SetFormations
  9. implicit none
  10. integer, intent(in) :: count
  11. integer :: i
  12. type(CFormationItem), intent(inout), target :: array(count)
  13. type(CFormationItem), pointer :: item
  14. FormationCount = count
  15. if(size(Formations) > 0) then
  16. deallocate(Formations)
  17. end if
  18. if(count > 0) then
  19. allocate(Formations(count))
  20. do i = 1, count
  21. item => array(i)
  22. Formations(i)%Top = item%Top
  23. Formations(i)%Thickness = item%Thickness
  24. Formations(i)%Drillablity = item%Drillablity
  25. Formations(i)%Abrasiveness = item%Abrasiveness
  26. Formations(i)%ThresholdWeight = item%ThresholdWeight
  27. Formations(i)%PorePressureGradient = item%PorePressureGradient
  28. !print*, "==========================="
  29. !print*, "Formations(", i, ")%Top=", Formations(i)%Top
  30. !print*, "Formations(",i,")%Thickness", Formations(i)%Thickness
  31. !print*, "Formations(",i,")%Drillablity", Formations(i)%Drillablity
  32. end do
  33. end if
  34. SetFormations = 0
  35. end function SetFormations
  36. end module CFormation