allocate_geom Subroutine

private pure subroutine allocate_geom(geom)

Allocate the geom instance to the correct type

Arguments

Type IntentOptional Attributes Name
class(abstract_geo_type), intent(inout), allocatable :: geom

Contents

Source Code


Source Code

  pure subroutine allocate_geom(geom)
    use geq, only: geq_type
    use leq, only: leq_type
    use ceq, only: ceq_type
    use peq, only: peq_type, teq_type
    use eeq, only: eeq_type, gs2d_type
    use deq, only: deq_type
    use ideq, only: ideq_type
    use geo_utils, only: abstract_geo_type
    implicit none
    class(abstract_geo_type), allocatable, intent(in out) :: geom
    if (gen_eq) then
       allocate(geq_type :: geom)
    else if (chs_eq) then
       allocate(ceq_type :: geom)
    else if (gs2d_eq) then
       allocate(gs2d_type :: geom)
    else if (efit_eq) then
       allocate(eeq_type :: geom)
    else if (transp_eq) then
       allocate(teq_type :: geom)
    else if (ppl_eq) then
       allocate(peq_type :: geom)
    else if (dfit_eq) then
       allocate(deq_type :: geom)
    else if (idfit_eq) then
       allocate(ideq_type :: geom)
    else if (local_eq) then
       allocate(leq_type :: geom)
    end if
  end subroutine allocate_geom