DISPATCH
math_mod.f90
1 !===============================================================================
2 !> Fundamental constants in CGS and SI units
3 !===============================================================================
4 MODULE math_mod
5  implicit none
6  private
7  !---------------------------------------------------------------------
8  ! Data type holding fundamental constants of nature
9  !---------------------------------------------------------------------
10  type, public:: math_t
11  character(len=16):: name='not set'
12  real(kind=8):: pi = acos(-1.0_8)
13  real(kind=8):: pi2 = 2.0_8 * acos(-1.0_8)
14  real(kind=8):: pi4 = 4.0_8 * acos(-1.0_8)
15  real(kind=8):: e = exp(1d0)
16  real(kind=8):: ln10 = log(10d0)
17  contains
18  procedure:: init
19  end type
20  type(math_t), public:: math
21 CONTAINS
22 
23 SUBROUTINE init (self)
24  class(math_t):: self
25  self%name = 'math'
26 END SUBROUTINE init
27 
28 END MODULE math_mod
Fundamental constants in CGS and SI units.
Definition: math_mod.f90:4