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.
 
 
 
 
 
 

33 lines
1.2 KiB

  1. module CFormation
  2. use CFormationVariables
  3. use SimulationVariables
  4. use json_module
  5. implicit none
  6. contains
  7. subroutine FormationToJson(parent)
  8. type(json_value),pointer :: parent
  9. type(json_core) :: json
  10. type(json_value),pointer :: p,pform
  11. integer :: i
  12. ! 1. create new node
  13. call json%create_array(p,'Formations')
  14. do i=1,data%Configuration%Formation%Count
  15. call json%create_object(pform,'')
  16. call json%add(pform,"Abrasiveness",data%Configuration%Formation%Formations(i)%Abrasiveness)
  17. call json%add(pform,"Drillablity",data%Configuration%Formation%Formations(i)%Drillablity)
  18. call json%add(pform,"PorePressureGradient",data%Configuration%Formation%Formations(i)%PorePressureGradient)
  19. call json%add(pform,"Thickness",data%Configuration%Formation%Formations(i)%Thickness)
  20. call json%add(pform,"ThresholdWeight",data%Configuration%Formation%Formations(i)%ThresholdWeight)
  21. call json%add(pform,"Top",data%Configuration%Formation%Formations(i)%Top)
  22. call json%add(p,pform)
  23. end do
  24. call json%add(parent,p)
  25. end subroutine
  26. end module CFormation