## 5.7. KINDEF, Constant Variable Definitions

Module kindef includes a number of commonly used constants (for example, PI) that can be used in user subroutines. The variable descriptions are self-explanatory.

          MODULE kindef
          USE precision

          SAVE

          INTEGER, PARAMETER :: INT1  = SELECTED_INT_KIND (2)
          INTEGER, PARAMETER :: INT2  = SELECTED_INT_KIND (4)
          INTEGER, PARAMETER :: REAL4 = SELECTED_REAL_KIND (6,30)
          INTEGER, PARAMETER :: REAL8H= SELECTED_REAL_KIND (12,300)

          INTEGER (INT4), PARAMETER :: LARGE  = 999999
          INTEGER (INT4), PARAMETER :: IUNDEF = 11111
          INTEGER (INT4), PARAMETER :: MAXINT = 30000
          INTEGER (INT4), PARAMETER :: MAXEXP = 20

          REAL (REAL8), PARAMETER :: EPSLN1  = 1.0E-1_real8
          REAL (REAL8), PARAMETER :: EPSLN2  = 1.0E-2_real8
          REAL (REAL8), PARAMETER :: EPSLN3  = 1.0E-3_real8
          REAL (REAL8), PARAMETER :: EPSLN4  = 1.0E-4_real8
          REAL (REAL8), PARAMETER :: EPSLN5  = 1.0E-5_real8
          REAL (REAL8), PARAMETER :: EPSLN6  = 1.0E-6_real8
          REAL (REAL8), PARAMETER :: EPSLN7  = 1.0E-7_real8
          REAL (REAL8), PARAMETER :: EPSLN8  = 1.0E-8_real8
          REAL (REAL8), PARAMETER :: EPSLN9  = 1.0E-9_real8
          REAL (REAL8), PARAMETER :: EPSLN10 = 1.0E-10_real8
          REAL (REAL8), PARAMETER :: EPSLN11 = 1.0E-11_real8
          REAL (REAL8), PARAMETER :: EPSLN12 = 1.0E-12_real8
          REAL (REAL8), PARAMETER :: EPSLN13 = 1.0E-13_real8
          REAL (REAL8), PARAMETER :: EPSLN14 = 1.0E-14_real8
          REAL (REAL8), PARAMETER :: EPSLN15 = 1.0E-15_real8
          REAL (REAL8), PARAMETER :: EPSLN16 = 1.0E-16_real8
          REAL (REAL8), PARAMETER :: EPSLN17 = 1.0E-17_real8
          REAL (REAL8), PARAMETER :: EPSLN18 = 1.0E-18_real8
          REAL (REAL8), PARAMETER :: EPSLN19 = 1.0E-19_real8
          REAL (REAL8), PARAMETER :: EPSLN20 = 1.0E-20_real8

          REAL (REAL8), PARAMETER :: ZERO     = 0.0_real8
          REAL (REAL8), PARAMETER :: ONE      = 1.0_real8
          REAL (REAL8), PARAMETER :: TWO      = 2.0_real8
          REAL (REAL8), PARAMETER :: THREE    = 3.0_real8
          REAL (REAL8), PARAMETER :: FOUR     = 4.0_real8
          REAL (REAL8), PARAMETER :: FIVE     = 5.0_real8
          REAL (REAL8), PARAMETER :: SIX      = 6.0_real8
          REAL (REAL8), PARAMETER :: SEVEN    = 7.0_real8
          REAL (REAL8), PARAMETER :: EIGHT    = 8.0_real8
          REAL (REAL8), PARAMETER :: NINE     = 9.0_real8
          REAL (REAL8), PARAMETER :: TEN      = 10.0_real8
          REAL (REAL8), PARAMETER :: TWELVE   = 12.0_real8
          REAL (REAL8), PARAMETER :: SIXTEEN  = 16.0_real8
          REAL (REAL8), PARAMETER :: NINETY   = NINE * TEN
          REAL (REAL8), PARAMETER :: HUNDRED  = TEN * TEN
          REAL (REAL8), PARAMETER :: ONE80    = TWO * NINE * TEN
          REAL (REAL8), PARAMETER :: TWO70    = THREE * NINE * TEN
          REAL (REAL8), PARAMETER :: THREE60  = TWO * ONE80
          REAL (REAL8), PARAMETER :: THRHUN   = THREE * HUNDRED
          REAL (REAL8), PARAMETER :: THOUSAND = HUNDRED * TEN
          REAL (REAL8), PARAMETER :: TENTHOUS = HUNDRED * HUNDRED

          REAL (REAL8), PARAMETER :: PI     = 3.14159265358979_real8
          REAL (REAL8), PARAMETER :: SMALL  = 1.0E-20_real8
          REAL (REAL8), PARAMETER :: BIG    = 1.01E20_real8
          REAL (REAL8), PARAMETER :: BIG2   = TWO*BIG
          REAL (REAL8), PARAMETER :: UNDEF  = 1.01E11_real8
          REAL (REAL8), PARAMETER :: UNDEFP = TWO*UNDEF
          REAL (REAL8), PARAMETER :: CUTOFF = 1.0E-10_real8

          REAL (REAL8), PARAMETER :: COMP_MAX = 3.0_real8
          REAL (REAL8), PARAMETER :: K_VOID=1.E-5_real8

          REAL (REAL8), PARAMETER :: HALF   = ONE/TWO
          REAL (REAL8), PARAMETER :: THIRD  = ONE/THREE
          REAL (REAL8), PARAMETER :: TWTHRD = TWO/THREE
          REAL (REAL8), PARAMETER :: QUART  = ONE/FOUR
          REAL (REAL8), PARAMETER :: FIFTH  = ONE/FIVE
          REAL (REAL8), PARAMETER :: FRTHRD = FOUR/THREE
          REAL (REAL8), PARAMETER :: SIXTH  = ONE/SIX
          REAL (REAL8), PARAMETER :: OVER7  = ONE/SEVEN
          REAL (REAL8), PARAMETER :: OVER8  = ONE/EIGHT
          REAL (REAL8), PARAMETER :: OVER9  = ONE/NINE
          REAL (REAL8), PARAMETER :: TENTH  = ONE/TEN
          REAL (REAL8), PARAMETER :: ONEME  = ONE - SMALL
          REAL (REAL8), PARAMETER :: EPSCNV = EPSPP2

          END MODULE kindef

Release 18.2 - © ANSYS, Inc. All rights reserved.