shorten_eos_name Function

public function shorten_eos_name(eos_long) result(eos_str)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: eos_long

Return Value character(len=4)


Called by

proc~~shorten_eos_name~~CalledByGraph proc~shorten_eos_name shorten_eos_name proc~read_bns_properties read_bns_properties proc~read_bns_properties->proc~shorten_eos_name proc~read_bns_properties~2 read_bns_properties proc~read_bns_properties~2->proc~shorten_eos_name proc~read_diffstar_properties read_diffstar_properties proc~read_diffstar_properties->proc~shorten_eos_name interface~read_bns_properties read_bns_properties interface~read_bns_properties->proc~read_bns_properties interface~read_bns_properties~2 read_bns_properties interface~read_bns_properties~2->proc~read_bns_properties~2 interface~read_diffstar_properties read_diffstar_properties interface~read_diffstar_properties->proc~read_diffstar_properties proc~construct_bnsfuka construct_bnsfuka proc~construct_bnsfuka->interface~read_bns_properties~2 proc~construct_bnslorene construct_bnslorene proc~construct_bnslorene->interface~read_bns_properties proc~construct_diffstarlorene construct_diffstarlorene proc~construct_diffstarlorene->interface~read_diffstar_properties interface~construct_bnsfuka construct_bnsfuka interface~construct_bnsfuka->proc~construct_bnsfuka interface~construct_bnslorene construct_bnslorene interface~construct_bnslorene->proc~construct_bnslorene interface~construct_diffstarlorene construct_diffstarlorene interface~construct_diffstarlorene->proc~construct_diffstarlorene

Contents

Source Code


Source Code

  FUNCTION shorten_eos_name( eos_long ) RESULT( eos_str )

    !*********************************************
    !                                            *
    ! Converts the longer names from LORENE      *
    ! to the 4-character strings needed by       *
    ! select_EOS_parameters                      *
    !                                            *
    ! FT 11.08.2021                              *
    !                                            *
    ! Last update FT 28.03.2023                  *
    !                                            *
    !*********************************************

    IMPLICIT NONE

    CHARACTER(4):: eos_str
    CHARACTER(LEN=*), INTENT(IN):: eos_long

    IF( INDEX(eos_long, 'SLy ') /= 0 .OR. INDEX(eos_long, 'sly ') /= 0 )THEN

      eos_str= 'SLy '

    ELSEIF( INDEX(eos_long, 'ALF2') /= 0 .OR. INDEX(eos_long, 'alf2') /= 0 )THEN

      eos_str= 'ALF2'

    ELSEIF( INDEX(eos_long, 'ALF4') /= 0 .OR. INDEX(eos_long, 'alf4') /= 0 )THEN

      eos_str= 'ALF4'

    ELSEIF( INDEX(eos_long, 'ENG ') /= 0 .OR. INDEX(eos_long, 'eng ') /= 0 )THEN

      eos_str= 'ENG '

    ELSEIF( INDEX(eos_long, 'H4  ') /= 0 .OR. INDEX(eos_long, 'h4  ') /= 0 )THEN

      eos_str= 'H4  '

    ELSEIF( INDEX(eos_long, 'MPA1') /= 0 .OR. INDEX(eos_long, 'mpa1') /= 0 )THEN

      eos_str= 'MPA1'

    ELSEIF( INDEX(eos_long, 'MS1 ') /= 0 .OR. INDEX(eos_long, 'ms1 ') /= 0 )THEN

      eos_str= 'MS1 '

    ELSEIF( INDEX(eos_long, 'MS1b') /= 0 .OR. INDEX(eos_long, 'ms1b') /= 0 )THEN

      eos_str= 'MS1b'

    ELSEIF( INDEX(eos_long, 'APR3') /= 0 .OR. INDEX(eos_long, 'apr3') /= 0 )THEN

      eos_str= 'AP3'

    ELSEIF( INDEX(eos_long, 'AP3 ') /= 0 .OR. INDEX(eos_long, 'ap3 ') /= 0 )THEN

      eos_str= 'AP3 '

    ELSEIF( INDEX(eos_long, 'APR4') /= 0 .OR. INDEX(eos_long, 'apr4') /= 0 )THEN

      eos_str= 'APR4'

    ELSEIF( INDEX(eos_long, 'AP4 ') /= 0 .OR. INDEX(eos_long, 'ap4 ') /= 0 )THEN

      eos_str= 'APR4'

    ELSEIF( INDEX(eos_long, 'WFF1') /= 0 .OR. INDEX(eos_long, 'wff1') /= 0 )THEN

      eos_str= 'WFF1'

    ELSEIF( INDEX(eos_long, 'WFF2') /= 0 .OR. INDEX(eos_long, 'wff2') /= 0 )THEN

      eos_str= 'WFF2'

    ELSEIF( INDEX(eos_long, 'HASO') /= 0 .OR. INDEX(eos_long, 'haso') /= 0 )THEN

      eos_str= 'haso'

    ELSEIF( eos_long == 'Polytropic EOS' .OR. INDEX(eos_long, 'gam') /= 0 )THEN

      eos_str= 'POLY'

    ELSE

      PRINT *, "** ERROR! Unknown EOS name: ", TRIM(eos_long)
      PRINT *, " * Please add the name to SUBROUTINE shorten_eos_name. "
      PRINT *, " * Stopping..."
      PRINT *
      STOP

    ENDIF

  END FUNCTION shorten_eos_name