Millepede-II V04-17-03
minresqlpDataModule.f90
Go to the documentation of this file.
1
3
4!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5! File minresqlpDataModule.f90
6!
9!
10!
11! Authors:
12! Sou-Cheng Choi <sctchoi@uchicago.edu>
13! Computation Institute (CI)
14! University of Chicago
15! Chicago, IL 60637, USA
16!
17! Michael Saunders <saunders@stanford.edu>
18! Systems Optimization Laboratory (SOL)
19! Stanford University
20! Stanford, CA 94305-4026, USA
21!
22! History:
23! 14 Oct 2007: First version implemented after realizing -r8 is not
24! a standard compiler option.
25! 15 Oct 2007: Temporarily used real(8) everywhere.
26! 16 Oct 2007: Found that we need
27! use minresqlpDataModule
28! at the beginning of modules AND inside interfaces.
29! 20 Aug 2012: (1) Added single real kind 'sp' and integer kind 'ip'.
30! (2) Added smallest and largest real positive 'realmin'
31! and 'realmax'.
32! (3) Added single precision kind 'sp'.
33!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
34
36 use mpdef, only: mpi, mps, mpd
37
38 implicit none
39
40 !obsolete intrinsic :: selected_real_kind, selected_int_kind, tiny, huge
41
42 ! The following reals are provided for portability. Do not use 'DOUBLE PRECISION'.
43 integer, parameter, public :: dp = mpd !selected_real_kind(15,307) ! 64-bit real, default
44 integer, parameter, public :: sp = mps !selected_real_kind(6,37) ! 32-bit real
45 !integer, parameter, public :: qp = selected_real_kind(33,4931) !128-bit real
46
47 integer, parameter, public :: ip = mpi !selected_int_kind(9) ! R: (-10^R, 10^R)
48
49 real(dp), parameter, public :: zero = 0.0_dp, one = 1.0_dp, eps = epsilon(zero)
50 real(dp), parameter, public :: realmin = tiny(one), realmax = huge(one)
51
52 integer, parameter, public :: prcsn = precision(zero) ! first argument of selected_real_kind
53
54 ! WARN: turning on debug could significantly slow down the program due to file output
55 logical, public :: debug = .false.
56 logical, public :: testsymortho = .true., testmtx = .true.
57end module minresqlpdatamodule
Defines precision and range in real(kind=dp) and integer(kind=ip) for portability and a few constants...
real(dp), parameter, public eps
real(dp), parameter, public one
integer, parameter, public prcsn
real(dp), parameter, public zero
integer, parameter, public sp
integer, parameter, public ip
logical, public testsymortho
integer, parameter, public dp
real(dp), parameter, public realmin
real(dp), parameter, public realmax
Definition of constants.
Definition: mpdef.f90:24
integer, parameter mpd
double precision
Definition: mpdef.f90:38
integer, parameter mps
single precision
Definition: mpdef.f90:37
integer, parameter mpi
integer
Definition: mpdef.f90:35