module kinds_mod
Variables:
integer, public :: fd4_wrnk
character (len=11), public :: FD4_LINEHD
integer, public, parameter :: fd4_out = 6
integer (kind=i_k), public, parameter, dimension (2) :: fd4_incdec = (/ -1, 1 /)
integer (kind=i_k), public, parameter :: FD4_X = 1
integer (kind=i_k), public, parameter :: FD4_Y = 2
integer (kind=i_k), public, parameter :: FD4_Z = 4
integer (kind=i_k), public, parameter :: FD4_XY = IOR (FD4_X, FD4_Y)
integer (kind=i_k), public, parameter :: FD4_XZ = IOR (FD4_X, FD4_Z)
integer (kind=i_k), public, parameter :: FD4_YZ = IOR (FD4_Y, FD4_Z)
integer (kind=i_k), public, parameter :: FD4_XYZ = IOR (FD4_XY, FD4_Z)
integer (kind=i_k), public, parameter, dimension (1:3) :: FD4_DIM = (/ FD4_X, FD4_Y, FD4_Z /)
Subroutines and functions:
public subroutine fd4_print_kinds ()
public logical function fd4_lerr (line, file, err, msg)
public subroutine fd4_perr (line, file, msg)
public function i2s (inum, zero) result (str)
public function l2s (inum) result (str)
public function p2s (p) result (str)
public function iii2s (inum1, inum2, inum3) result (str)
Proprocessor options:
L1 = output of basic and cheap error checks (default) L2 = L1 + some basic information L3 = L2 + expensive error checks (will hurt performance) L4 = L3 + verbose mode (tons of output)
L1 error checks will be always carried through (due to semantics of subroutines), but output of these error messages will only be enabled if FD4_VERBOSE_LEVEL >= 1. L3 error checks are only arried through if L3 is enabled.
The default verbose level is L1. Set the level with
-DFD4_VERBOSE_LEVEL=[1|2|3|4]when compiling the source file(s).
The error handling interface in fd.h defines the following preprocessor macros:
FD4_L1_ASSERT(C,MSG) FD4_L1_ERROR(MSG) FD4_L1_WARN(MSG) FD4_L3_ASSERT(C,MSG) FD4_L4_INFO(MSG)C is a logical expression, which should be true when an error condition occured. MSG is a character describing the error/warning/info.
Author: Matthias Lieber
public subroutine fd4_print_kinds () end subroutine fd4_print_kindsPrint the kind values defined in kinds_mod.
See also: module kinds_mod
public logical function fd4_lerr (line, file, err, msg)
integer, intent(in) :: line
character (len=*), intent(in) :: file
logical, intent(in) :: err
character (len=*), intent(in) :: msg
end function fd4_lerr
Parameters:| line | source code line of the error |
| file | source code file of the error |
| err | error condition |
| msg | error message to print, if err == .true. |
If err == .true. print error message and return true, else return false.
public subroutine fd4_perr (line, file, msg)
integer, intent(in) :: line
character (len=*), intent(in) :: file
character (len=*), intent(in) :: msg
end subroutine fd4_perr
Parameters:| line | source code line of the error |
| file | source code file of the error |
| msg | error message to print |
public function i2s (inum, zero) result (str)
integer (kind=i_k), intent(in) :: inum
logical, optional, intent(in) :: zero
character (len=6) :: str
end function i2s
Parameters:| inum | number to be converted to a character |
| zero | fill with leading zeros (to avoid blanks) |
public function l2s (inum) result (str)
integer (kind=i8k), intent(in) :: inum
character (len=12) :: str
end function l2s
Parameters:| inum | number to be converted to a character |
public function p2s (p) result (str)
integer (kind=i_k), intent(in), dimension (3) :: p
character (len=20) :: str
end function p2s
Parameters:| p | position to be converted to a character |
public function iii2s (inum1, inum2, inum3) result (str)
integer (kind=i_k), intent(in) :: inum1
integer (kind=i_k), intent(in) :: inum2
integer (kind=i_k), intent(in) :: inum3
character (len=18) :: str
end function iii2s
Parameters:| inum1 | integer to be converted to a character |
| inum2 | integer to be converted to a character |
| inum3 | integer to be converted to a character |