Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
perlin/module_globals.f90
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
41 lines (33 sloc)
1.39 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!********************************************************************************************************************************** | |
! | |
! Unit Name : module_globals | |
! Unit Type : module | |
! Project : CTEM | |
! Language : Fortran 2003 | |
! | |
! Description : Globally defined constants | |
! | |
! Notes : | |
! | |
!********************************************************************************************************************************** | |
module module_globals | |
implicit none | |
public | |
! Symbolic names for kind types of 4-, 2-, and 1-byte integers: | |
integer, parameter :: I8B = selected_int_kind(17) | |
integer, parameter :: I4B = selected_int_kind(9) | |
integer, parameter :: I2B = selected_int_kind(4) | |
integer, parameter :: I1B = selected_int_kind(2) | |
! Symbolic names for kind types of single- and double-precision reals: | |
integer, parameter :: SP = kind(1.0) | |
integer, parameter :: DP = kind(1.0d0) | |
! Frequently used mathematical constants | |
real(DP), parameter :: PI = ACOS(-1.0_DP) | |
real(DP), parameter :: SQRT2 = SQRT(2.0_DP) | |
real(DP), parameter :: LOGSQRT2 = LOG(SQRT2) | |
real(DP), parameter :: SQRT3 = SQRT(3.0_DP) | |
real(DP), parameter :: THIRD = 1.0_DP / 3.0_DP | |
real(DP), parameter :: SIXTH = 1.0_DP / 6.0_DP | |
real(DP), parameter :: DEG2RAD = PI / 180.0_DP | |
integer(I4B) :: NTHREADS = 1 ! Number of OpenMP threads (reset by OpenMP if a parallel environment is detected) | |
end module module_globals |