FMUTIL  0.1
Fortran Miscellaneous UTILities
fmutil_base.F90
Go to the documentation of this file.
1 !############################################################################################
2 ! ________ _____ ______________
3 ! / ____/ |/ / / / /_ __/ _/ /
4 ! / /_ / /|_/ / / / / / / / // /
5 ! / __/ / / / / /_/ / / / _/ // /___
6 ! /_/ /_/ /_/\____/ /_/ /___/_____/
7 !
8 ! Copyright 2020 Bharat Mahajan
9 !
10 ! Licensed under the Apache License, Version 2.0 (the "License");
11 ! you may not use this file except in compliance with the License.
12 ! You may obtain a copy of the License at
13 !
14 ! http://www.apache.org/licenses/LICENSE-2.0
15 !
16 ! Unless required by applicable law or agreed to in writing, software
17 ! distributed under the License is distributed on an "AS IS" BASIS,
18 ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 ! See the License for the specific language governing permissions and
20 ! limitations under the License.
21 !
27 !
28 !############################################################################################
29 
30 
31 module fmutilbase
32 
34  use, intrinsic :: iso_fortran_env, only: real64, real128
35 
36  implicit none
37 
39  integer, parameter, public :: dp = real64
40  integer, parameter, public :: qp = real128
41  integer, parameter, public :: wp = dp
42 
44  real(wp), parameter, public :: eps = epsilon(1.0_wp)
45 
47  real(wp), parameter, public :: inf = huge(1.0_wp)
48 
50  integer, private :: ind
51  logical, dimension(*), parameter :: nzind3 = [ (ind == (3*(ind/3)+(ind/3+1)), ind=1,8), .true.]
52  real(wp), dimension(*,*), parameter, public :: i3 = &
53  reshape([merge([(1.0_wp, ind=1,9)], [(0.0_wp, ind=1,9)], nzind3)],[3,3])
54 
55 
57  logical, dimension(*), parameter :: nzind6 = [ (ind == (6*(ind/6)+(ind/6+1)), ind=1,6**2-1), .true.]
58  real(wp), dimension(*,*), parameter, public :: i6 = &
59  reshape([merge([(1.0_wp, ind=1,6**2)], [(0.0_wp, ind=1,6**2)], nzind6)],[6,6])
60 
61 
62 
63 
64 
65  contains
66 
67 
68 
69 end module fmutilbase
fmutilbase::ind
integer, private ind
Identity matrix - 3x3.
Definition: fmutil_base.F90:50
fmutilbase::nzind6
logical, dimension(*), parameter nzind6
Identity matrix - 6x6.
Definition: fmutil_base.F90:57
fmutilbase::nzind3
logical, dimension(*), parameter nzind3
Definition: fmutil_base.F90:51
fmutilbase::wp
integer, parameter, public wp
Definition: fmutil_base.F90:41
fmutilbase::i6
real(wp), dimension(*, *), parameter, public i6
Definition: fmutil_base.F90:58
fmutilbase::i3
real(wp), dimension(*, *), parameter, public i3
Definition: fmutil_base.F90:52
fmutilbase::qp
integer, parameter, public qp
Definition: fmutil_base.F90:40
fmutilbase::dp
integer, parameter, public dp
import the fortran environment module for precision-related constants
Definition: fmutil_base.F90:39
fmutilbase::inf
real(wp), parameter, public inf
Infinity definition.
Definition: fmutil_base.F90:47
fmutilbase
FMUTIL Base Module.
Definition: fmutil_base.F90:31
fmutilbase::eps
real(wp), parameter, public eps
Smallest positive real satisfying 1.0_WP + eps > 1.0_WP.
Definition: fmutil_base.F90:44