TABLE OF CONTENTS


ABINIT/defs_basis [ Modules ]

[ Top ] [ Modules ]

NAME

 defs_basis

FUNCTION

 This module contains definitions for a number of named constants and
 physical constants, as well as associated datatypes and methods.

COPYRIGHT

 Copyright (C) 2000-2018 ABINIT group (HM, XG,XW, EB)
 This file is distributed under the terms of the
 GNU General Public License, see ~abinit/COPYING
 or http://www.gnu.org/copyleft/gpl.txt .

NOTES

 Of the named constants,
 by far the most important are those that define the 'kind' types of
 virtually all the variables used in a (well-written) FORTRAN 90 code
 the content of this file is derived from 'Numerical Recipes in Fortran 90'
 W.H. Press et al., volume 2 of 'Fortran Numerical Recipes', Cambridge
 University Press, Second Edition (1996), p. 937 and 1361

SOURCE

 26 #if defined HAVE_CONFIG_H
 27 #include "config.h"
 28 #endif
 29 
 30 module defs_basis
 31 
 32 !#ifdef HAVE_FC_ISO_FORTRAN_2008
 33 ! use ISO_FORTRAN_ENV, only : input_unit, output_unit, error_unit
 34 !#endif
 35 
 36  implicit none
 37 
 38 !Keyword 'integer' stands for default integer type
 39 !and may be used whenever integer are presumed to be small
 40 
 41 !nb of bytes related to an integer subtype n such as -10^(argument) < n < 10^(argument) (this is standard F90)
 42  integer, parameter :: i1b=selected_int_kind(2)
 43  integer, parameter :: i2b=selected_int_kind(4)
 44  integer, parameter :: i4b=selected_int_kind(9)
 45  integer, parameter :: i8b=selected_int_kind(18)
 46 
 47 !nb of bytes related to default simple-precision real/complex subtypes
 48 !(= 4 for many machine architectures, = 8 for e.g. Cray)
 49  integer, parameter :: sp=kind(1.0)          ! Single precision should not be used
 50  integer, parameter :: spc=kind((1.0,1.0))
 51 
 52 !nb of bytes related to default double-precision real/complex subtypes
 53 !(= 8 for many machine architectures)
 54  integer, parameter :: dp=kind(1.0d0)
 55  integer, parameter :: dpc=kind((1.0_dp,1.0_dp))  ! Complex should not be used presently
 56                                                   ! except for use of libraries
 57 
 58 !nb of bytes related to GW arrays, that can be tuned from sp to dp independently
 59 !of other variables in ABINIT. Presently single-precision is the default (see config/specs/options.conf)..
 60 #if defined HAVE_GW_DPC
 61  integer, parameter :: gwp=kind(1.0d0)
 62  integer, parameter :: gwpc=kind((1.0_dp,1.0_dp))
 63 
 64 #else
 65  integer, parameter :: gwp=kind(1.0)
 66  integer, parameter :: gwpc=kind((1.0,1.0))
 67 #endif
 68 
 69 !Example:
 70 ! integer, parameter :: urp=selected_real_kind((p=)12,(r=)50)
 71 ! real((kind=)urp) :: d
 72 ! d=5.04876_urp   ! for a real d with 12 significative digits
 73 ! and such as 10^-50 < |d| < 10^50
 74 
 75 !To modify sp/spc and / or dp/dpc, insert instructions such as 'dp='
 76 ! but do not modify the other declarations in this module
 77 
 78 !The default lengths
 79  integer, parameter :: fnlen=264      ! maximum length of file name variables
 80  integer, parameter :: strlen=2000000 ! maximum length of input string
 81 
 82  integer, parameter :: md5_slen = 32 ! lenght of strings storing the pseudos' md5 checksum.
 83  character(len=md5_slen),parameter :: md5_none = "None"
 84 
 85 !Some constants:
 86 
 87 ! UNIX unit numbers: standard input, standard output, ab_out, and a number for temporary access to a file.
 88 ! Please, use these named constants instead of write(*,*),
 89 ! it makes the code more readable and easier to change.
 90 
 91 !Default values
 92  !integer, parameter :: std_in = input_unit
 93  !integer, parameter :: ab_in = input_unit
 94  !integer, parameter :: std_out_default = output_unit
 95  !integer, parameter :: ab_out_default=7
 96  !integer, parameter :: std_err = error_unit
 97  integer, parameter :: std_in=5
 98  integer, parameter :: ab_in=5
 99  integer, parameter :: std_out_default=6
100  integer, parameter :: ab_out_default=7    ! TODO: This should be initialized at run-time.
101  integer, parameter :: std_err=0
102 
103  integer, parameter :: dev_null=-1       ! Fake unit number used to skip the printing in wrtout.
104  integer, parameter :: ab_xml_out = 50   ! this unit is used to print output into an XML file
105  integer, parameter :: tmp_unit=9,tmp_unit2=10
106 
107 !These vars should be private and only modifiable via an appropriate method (see below)
108  integer, public, save :: ab_out = ab_out_default
109  integer, public, save :: std_out =  std_out_default
110 !It should be put to xmpi_world (but it is not possible for the moment - v6.9)
111  integer, public, save :: abinit_comm_output = -1 !This default value has to be changed at start !!!
112 
113 ! the maximum length of a record in a file connected for sequential access.
114  integer,public,parameter :: ABI_RECL=524288  ! 2**19
115 
116 !Real constants
117  real(dp), parameter :: zero=0._dp
118  real(dp), parameter :: one=1._dp
119  real(dp), parameter :: two=2._dp
120  real(dp), parameter :: three=3._dp
121  real(dp), parameter :: four=4._dp
122  real(dp), parameter :: five=5._dp
123  real(dp), parameter :: six=6._dp
124  real(dp), parameter :: seven=7._dp
125  real(dp), parameter :: eight=8._dp
126  real(dp), parameter :: nine=9._dp
127  real(dp), parameter :: ten=10._dp
128 
129 !Fractionary real constants
130  real(dp), parameter :: half=0.50_dp
131  real(dp), parameter :: onehalf=1.50_dp
132  real(dp), parameter :: third=one/three
133  real(dp), parameter :: quarter=0.25_dp
134  real(dp), parameter :: fifth=0.20_dp
135  real(dp), parameter :: sixth=one/six
136  real(dp), parameter :: seventh=one/seven
137  real(dp), parameter :: eighth=0.125_dp
138  real(dp), parameter :: ninth=one/nine
139  real(dp), parameter :: two_thirds=two*third
140  real(dp), parameter :: four_thirds=four*third
141  real(dp), parameter :: five_thirds=five*third
142  real(dp), parameter :: three_quarters=0.75_dp
143  real(dp), parameter :: three_fifth=three/five
144 
145 !Real constants related to the golden number
146  real(dp), parameter :: gold=1.618033988749894848204586834365638117720309179_dp
147  real(dp), parameter :: goldenratio=two-gold
148 
149 !Real constants derived from pi
150  real(dp), parameter :: pi=3.141592653589793238462643383279502884197_dp
151  real(dp), parameter :: two_pi=two*pi
152  real(dp), parameter :: four_pi=four*pi
153  real(dp), parameter :: piinv=one/pi
154 !The following are not used
155 !real(dp), parameter :: rad_to_deg=180._dp/pi
156 !real(dp), parameter :: deg_to_rad=one/rad_to_deg
157 !real(dp), parameter :: half_pi=pi*half
158 !real(dp), parameter :: third_pi=pi*third
159 !real(dp), parameter :: quarter_pi=pi*quarter
160 !real(dp), parameter :: two_thirds_pi=two_thirds*pi
161 
162 
163 !Real precision
164  real(dp), parameter :: greatest_real = huge(one)
165  real(dp), parameter :: smallest_real = -greatest_real
166  !real(dp), parameter :: tol1= 0.1_dp
167  !real(dp), parameter :: tol2= 0.01_dp
168  real(dp), parameter :: tol3= 0.001_dp
169  real(dp), parameter :: tol4= 0.0001_dp
170  real(dp), parameter :: tol5= 0.00001_dp
171  real(dp), parameter :: tol6= 0.000001_dp
172  real(dp), parameter :: tol7= 0.0000001_dp
173  real(dp), parameter :: tol8= 0.00000001_dp
174  real(dp), parameter :: tol9= 0.000000001_dp
175  real(dp), parameter :: tol10=0.0000000001_dp
176  real(dp), parameter :: tol11=0.00000000001_dp
177  real(dp), parameter :: tol12=0.000000000001_dp
178  real(dp), parameter :: tol13=0.0000000000001_dp
179  real(dp), parameter :: tol14=0.00000000000001_dp
180  real(dp), parameter :: tol15=0.000000000000001_dp
181  real(dp), parameter :: tol16=0.0000000000000001_dp
182  real(dp), parameter :: tol20=0.00000000000000000001_dp
183 
184 !real constants derived from sqrt(n.)
185  real(dp), parameter :: sqrt2=1.4142135623730950488016887242096939_dp
186  real(dp), parameter :: half_sqrt2=0.70710678118654752440084436210484697_dp
187  real(dp), parameter :: sqrt3=1.7320508075688772935274463415058739_dp
188  real(dp), parameter :: half_sqrt3=0.86602540378443864676372317075293693_dp
189  real(dp), parameter :: sqrthalf=0.70710678118654752440084436210484697_dp
190 
191 !Conversion factors of common use, not directly related to physical quantities.
192  real(dp), parameter :: b2Mb=one/1024.0_dp**2  ! conversion factor bytes --> Mbytes
193  real(dp), parameter :: b2Gb=b2Mb/1024.0_dp    ! conversion factor bytes --> Gbytes
194 
195 !Real physical constants
196 !Revised fundamental constants from http://physics.nist.gov/cuu/Constants/index.html
197 !(from 2006 least squares adjustment)
198  real(dp), parameter :: Bohr_Ang=0.52917720859_dp    ! 1 Bohr, in Angstrom
199  real(dp), parameter :: Bohr_meter=Bohr_Ang * 1.d-10 ! 1 Bohr in meter
200  real(dp), parameter :: Ha_cmm1=219474.6313705_dp  ! 1 Hartree, in cm^-1
201  real(dp), parameter :: Ha_eV=27.21138386_dp ! 1 Hartree, in eV
202  real(dp), parameter :: eV_Ha=one/Ha_eV      ! 1 eV in Hartree
203  real(dp), parameter :: Ha_meV=Ha_eV*1000_dp ! 1 Hartree, in meV
204  real(dp), parameter :: Ha_K=315774.65_dp ! 1Hartree, in Kelvin
205  real(dp), parameter :: Ha_THz=6579.683920722_dp ! 1 Hartree, in THz
206  real(dp), parameter :: Ha_J=4.35974394d-18    !1 Hartree, in J
207  real(dp), parameter :: e_Cb=1.602176487d-19 ! minus the electron charge, in Coulomb
208  real(dp), parameter :: kb_HaK=8.617343d-5/Ha_eV ! Boltzmann constant in Ha/K
209  real(dp), parameter :: kb_THzK=kb_HaK*Ha_THz ! Boltzmann constant in THz/K
210  real(dp), parameter :: amu_emass=1.660538782d-27/9.10938215d-31 ! 1 atomic mass unit, in electronic mass
211  real(dp), parameter :: HaBohr3_GPa=Ha_eV/Bohr_Ang**3*e_Cb*1.0d+21 ! 1 Ha/Bohr^3, in GPa
212  real(dp), parameter :: Avogadro=6.02214179d23 ! per mole
213  real(dp), parameter :: Ohmcm=two*pi*Ha_THz*ninth*ten ! 1 Ohm.cm in atomic units
214 !real(dp), parameter :: eps0=8.854187817d-12 ! permittivity of free space in F/m
215  real(dp), parameter :: eps0=one/(four_pi*0.0000001_dp*299792458.0_dp**2)
216  real(dp), parameter :: AmuBohr2_Cm2=e_Cb*1.0d20/(Bohr_Ang*Bohr_Ang)
217  real(dp), parameter :: InvFineStruct=137.035999679_dp  ! Inverse of fine structure constant
218  real(dp), parameter :: Sp_Lt_SI=2.99792458d8 ! speed of light in SI
219  real(dp), parameter :: Sp_Lt=Sp_lt_SI/2.1876912633d6 ! speed of light in atomic units
220  real(dp), parameter :: Time_Sec=2.418884326505D-17 !  Atomic unit of time, in seconds
221  real(dp), parameter :: BField_Tesla=4.254383d-6 ! Tesla in a.u.
222  real(dp), parameter :: dipole_moment_debye=0.393430307_dp ! Debye unit in a.u.
223 !EB suppress *0.5_dp  ! Atomic unit of induction field (in Tesla) * mu_B (in atomic units).
224 
225 !Complex constants
226  complex(dpc), parameter :: czero=(0._dp,0._dp)
227  complex(dpc), parameter :: cone =(1._dp,0._dp)
228  complex(dpc), parameter :: j_dpc=(0._dp,1.0_dp)
229 
230 !Pauli matrix
231  complex(dpc), parameter :: pauli_mat(2,2,0:3) = reshape([cone,czero,czero,cone, &
232 &                                                         czero,cone,cone,czero,&
233 &                                                         czero,j_dpc,-j_dpc,czero,&
234 &                                                         cone,czero,czero,-cone], [2,2,4])
235 
236 !Character constants
237  character(len=1), parameter :: ch10 = char(10)
238  character(len=fnlen),parameter :: ABI_NOFILE="__None__"
239 
240  ! File used to dump the error message in m_error.
241  ! Extremely useful when we run on many CPUs since logging, in this case, is automatically disabled
242  ! As a consequence, we get error messages in the main log only if the problem is encoutered by the master node!
243  ! Note that the file is removed in xmpi_init (if present).
244  character(len=fnlen),parameter :: ABI_MPIABORTFILE="__ABI_MPIABORTFILE__"
245 
246  ! Error codes used by the bindings.
247  integer, parameter, public :: AB7_NO_ERROR                 =  0
248  integer, parameter, public :: AB7_ERROR_OBJ                =  1
249  integer, parameter, public :: AB7_ERROR_ARG                =  2
250  integer, parameter, public :: AB7_ERROR_INVARS_ATT         =  3
251  integer, parameter, public :: AB7_ERROR_INVARS_ID          =  4
252  integer, parameter, public :: AB7_ERROR_INVARS_SIZE        =  5
253  integer, parameter, public :: AB7_ERROR_SYM_NOT_PRIMITIVE  =  6
254  integer, parameter, public :: AB7_ERROR_SYM_BRAVAIS_XRED   =  7
255  integer, parameter, public :: AB7_ERROR_MIXING_ARG         =  8
256  integer, parameter, public :: AB7_ERROR_MIXING_CONVERGENCE =  9
257  integer, parameter, public :: AB7_ERROR_MIXING_INTERNAL    = 10
258  integer, parameter, public :: AB7_ERROR_MIXING_INC_NNSLOOP = 11
259 
260 ! Values of optdriver corresponding to the different run-levels.
261  integer, parameter, public :: RUNL_GSTATE     = 0
262  integer, parameter, public :: RUNL_RESPFN     = 1
263  integer, parameter, public :: RUNL_SCREENING  = 3
264  integer, parameter, public :: RUNL_SIGMA      = 4
265  integer, parameter, public :: RUNL_NONLINEAR  = 5
266  integer, parameter, public :: RUNL_EPH        = 7
267  integer, parameter, public :: RUNL_WFK        = 8
268  integer, parameter, public :: RUNL_GWLS       = 66
269  integer, parameter, public :: RUNL_BSE        = 99 !9
270 
271  ! Integer flags defining the task to be performed in wfk_analyze
272  integer,public,parameter :: WFK_TASK_NONE      = 0
273  integer,public,parameter :: WFK_TASK_FULLBZ    = 1
274  integer,public,parameter :: WFK_TASK_CLASSIFY  = 2
275  integer,public,parameter :: WFK_TASK_PAW_AEPSI = 3
276  integer,public,parameter :: WFK_TASK_DDK       = 5
277 
278 ! Flags defining the method used for performing IO (input variable iomode)
279  integer, parameter, public :: IO_MODE_FORTRAN_MASTER = -1
280  integer, parameter, public :: IO_MODE_FORTRAN        =  0
281  integer, parameter, public :: IO_MODE_MPI            =  1
282  integer, parameter, public :: IO_MODE_NETCDF         =  2 ! Only for legacy code, should not be used for new implementations.
283  integer, parameter, public :: IO_MODE_ETSF           =  3
284 
285 ! FFT libraries (correspond to fftalga = ngfft(7)/100)
286  integer,parameter,public :: FFT_SG     = 1
287  integer,parameter,public :: FFT_FFTW3  = 3
288  integer,parameter,public :: FFT_SG2002 = 4
289  integer,parameter,public :: FFT_DFTI   = 5
290 
291 ! Parameters for non-local algorithm (were previously stored in nloalg(3) and nloalg(4)
292   integer,parameter,public :: NLO_MBLKPW = 199
293   integer,parameter,public :: NLO_MINCAT = 10
294 
295 !Parameters for LOG/STATUS files treatment
296 !This variables tell the code if some lines have to be written in a LOG/STATUS file
297  logical, public, save :: do_write_log   =.true.
298  logical, public, save :: do_write_status=.true.
299 ! Max. numbers of CPU core for the writing of LOG/STATUS file for each CPU
300 ! (if more than NPROC_NO_EXTRA_LOG cpu core are used, no *_LOG_Pxxx is written;
301 !  the same for the *_STATUS_Pxxx file)
302  integer, parameter, public :: NPROC_NO_EXTRA_LOG    = 2  !@WC
303  integer, parameter, public :: NPROC_NO_EXTRA_STATUS = 2  !@WC
304 !Name of the file that (if present in current directory)
305 !will avoid creation of LOG/STATUS files
306  character(len=fnlen),parameter :: ABI_NO_LOG_FILE="_NOLOG"
307 !Name of the file that (if present in current directory)
308 !will enforce creation of LOG/STATUS files
309  character(len=fnlen),parameter :: ABI_ENFORCE_LOG_FILE="_LOG"
310 !Name of the file that (if present in current directory)
311 !will enforce creation of LOG file only for master proc
312  character(len=fnlen),parameter :: ABI_MAIN_LOG_FILE="_MAINLOG"
313 
314 ! Arrays
315  integer,parameter :: identity_3d(3,3) = reshape([1,0,0,0,1,0,0,0,1], [3,3])
316  integer,parameter :: inversion_3d(3,3) = reshape([-1,0,0,0,-1,0,0,0,-1], [3,3])
317 
318 !A collection of small datatypes for ragged arrays
319 !A small datatype for ragged real 1D-arrays
320  type coeff1_type
321   real(dp), allocatable :: value(:)
322  end type coeff1_type
323 !A small datatype for ragged integer 1D-arrays
324  type coeffi1_type
325   !integer :: size
326   integer, allocatable :: value(:)
327  end type coeffi1_type
328 !A small datatype for ragged integer 2D-arrays
329  type coeffi2_type
330   integer :: size
331   integer, allocatable :: value(:,:)
332  end type coeffi2_type
333 !A small datatype for ragged real 2D-arrays
334  type coeff2_type
335   real(dp), allocatable :: value(:,:)
336  end type coeff2_type
337 !A small datatype for ragged complex 2D-arrays
338  type coeff2c_type
339   complex(dpc), allocatable :: value(:,:)
340  end type coeff2c_type
341 !A small datatype for ragged real 3D-arrays
342  type coeff3_type
343   real(dp), allocatable :: value(:,:,:)
344  end type coeff3_type
345 !A small datatype for ragged real 4D-arrays
346  type coeff4_type
347   real(dp), allocatable :: value(:,:,:,:)
348  end type coeff4_type
349 !A small datatype for ragged real 5D-arrays
350  type coeff5_type
351   real(dp), allocatable :: value(:,:,:,:,:)
352  end type coeff5_type
353 !A small datatype for ragged real 6D-arrays
354  type coeff6_type
355   real(dp), allocatable :: value(:,:,:,:,:,:)
356  end type coeff6_type
357 !A small datatype for ragged real 7D-arrays.
358  type coeff7_type
359   real(dp), allocatable :: value(:,:,:,:,:,:,:)
360  end type coeff7_type
361 
362 CONTAINS  !==============================================================================

defs_basis/abi_io_redirect [ Functions ]

[ Top ] [ defs_basis ] [ Functions ]

NAME

  abi_io_redirect

FUNCTION

  Redirect unit numbers (and|or) change the MPI communicator for the IO (output and log file).
  This routine can be used in client code (e.g. bigdft)
  that wants to call the abinit routines packed in an external library.

INPUTS

  new_ab_out=new value for output file unit
  new_std_out=new value for standard output unit
  new_io_comm=new value for IO MPI communicator

PARENTS

      abinit,aim,anaddb,band2eps,bsepostproc,conducti,cut3d,driver
      dummy_tests,fftprof,fold2Bloch,initmpi_world,ioprof,lapackprof
      m_io_redirect,macroave,memory_eval,mpi_setup,mrgddb,mrgdv,mrggkk,mrgscr
      multibinit,optic,ujdet,vdw_kernelgen

CHILDREN

SOURCE

434  subroutine abi_io_redirect(new_ab_out,new_std_out,new_io_comm)
435 
436 
437 !This section has been created automatically by the script Abilint (TD).
438 !Do not modify the following lines by hand.
439 #undef ABI_FUNC
440 #define ABI_FUNC 'abi_io_redirect'
441 !End of the abilint section
442 
443  implicit none
444 
445 !Arguments ------------------------------------
446 !scalars
447  integer,optional,intent(in) :: new_std_out,new_ab_out,new_io_comm
448 
449 !************************************************************************
450 
451  if (PRESENT(new_ab_out))  ab_out  = new_ab_out
452  if (PRESENT(new_std_out)) std_out = new_std_out
453  if (PRESENT(new_io_comm)) abinit_comm_output = new_io_comm
454 
455  end subroutine abi_io_redirect

defs_basis/abi_log_status_state [ Functions ]

[ Top ] [ defs_basis ] [ Functions ]

NAME

  abi_log_status_state

FUNCTION

  Change values of do_write_log and do_write_status flags.
  These flags tell the code to write (or not) a LOG/STATUS file.

INPUTS

  new_do_write_log=new value for do_write_log
  new_do_write_status=new value for do_write_status

PARENTS

      iofn1,m_argparse

CHILDREN

SOURCE

384  subroutine abi_log_status_state(new_do_write_log,new_do_write_status)
385 
386 
387 !This section has been created automatically by the script Abilint (TD).
388 !Do not modify the following lines by hand.
389 #undef ABI_FUNC
390 #define ABI_FUNC 'abi_log_status_state'
391 !End of the abilint section
392 
393  implicit none
394 
395 !Arguments ------------------------------------
396 !scalars
397  logical,optional,intent(in) :: new_do_write_log,new_do_write_status
398 !Local variables ------------------------------
399 
400 !************************************************************************
401 
402  if (PRESENT(new_do_write_log))    do_write_log   =new_do_write_log
403  if (PRESENT(new_do_write_status)) do_write_status=new_do_write_status
404 
405  end subroutine abi_log_status_state

defs_basis/print_kinds [ Functions ]

[ Top ] [ defs_basis ] [ Functions ]

NAME

 print_kinds

FUNCTION

 Prints info on the basic data types, e.g. kind, precision...

INPUTS

   unit = Unit number for output file.

OUTPUT

   Only printing.

PARENTS

      abinit,leave_new,m_argparse

CHILDREN

SOURCE

480  subroutine print_kinds(unit)
481 
482 !Arguments-------------------------------------
483 !scalars
484 
485 !This section has been created automatically by the script Abilint (TD).
486 !Do not modify the following lines by hand.
487 #undef ABI_FUNC
488 #define ABI_FUNC 'print_kinds'
489 !End of the abilint section
490 
491  integer,optional,intent(in) :: unit
492 
493 !Local variables-------------------------------
494 !scalars
495  integer :: my_unt
496 
497  ! *********************************************************************
498 
499    my_unt=std_out; if (PRESENT(unit)) my_unt = unit
500 
501    write(my_unt,'(a)')' DATA TYPE INFORMATION: '
502 
503    write(my_unt,'(a,/,2(a,i6,/),2(a,e15.8,/),a,e15.8)')&
504 &   ' REAL:      Data type name: REAL(DP) ',&
505 &   '            Kind value: ',KIND(0.0_dp),&
506 &   '            Precision:  ',PRECISION(0.0_dp),&
507 &   '            Smallest nonnegligible quantity relative to 1: ',EPSILON(0.0_dp),&
508 &   '            Smallest positive number:                      ',TINY(0.0_dp),&
509 &   '            Largest representable number:                  ',HUGE(0.0_dp)
510 
511    write(my_unt,'(a,/,2(a,i0,/),a,i0)')&
512    ' INTEGER:   Data type name: INTEGER(default) ', &
513 &   '            Kind value: ',KIND(0),              &
514 &   '            Bit size:   ',BIT_SIZE(0),          &
515    '            Largest representable number: ',HUGE(0)
516 
517    write(my_unt,'(a,/,a,i0)')&
518 &   ' LOGICAL:   Data type name: LOGICAL ',&
519 &   '            Kind value: ',KIND(.TRUE.)
520 
521    write(my_unt,'(2a,i0)')&
522 &   ' CHARACTER: Data type name: CHARACTER ',&
523 &   '            Kind value: ',KIND('C')
524 
525 end subroutine print_kinds

defs_basis/str2wfktask [ Functions ]

[ Top ] [ defs_basis ] [ Functions ]

NAME

  str2wfktask

FUNCTION

  Convert a string into one of the integer flags WFK_TASK_*
  Return WFK_TASK_NONE if string is invalid.

PARENTS

CHILDREN

SOURCE

542  integer pure function str2wfktask(str) result(wfk_task)
543 
544 
545 !This section has been created automatically by the script Abilint (TD).
546 !Do not modify the following lines by hand.
547 #undef ABI_FUNC
548 #define ABI_FUNC 'str2wfktask'
549 !End of the abilint section
550 
551  implicit none
552 
553 !Arguments ------------------------------------
554 !scalars
555  character(len=*),intent(in) :: str
556 
557 !************************************************************************
558 
559  select case (str)
560  case ("wfk_fullbz")
561    wfk_task = WFK_TASK_FULLBZ
562  case ("classify")
563    wfk_task = WFK_TASK_CLASSIFY
564  case ("paw_aepsi")
565    wfk_task = WFK_TASK_PAW_AEPSI
566  case ("wfk_ddk")
567    wfk_task = WFK_TASK_DDK
568  case default
569    wfk_task = WFK_TASK_NONE
570  end select
571 
572  end function str2wfktask