Unified Input/Output handling across the code.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | iof_mmpol | = | 6 | ||
integer, | public, | parameter | :: | iof_mmpinp | = | 100 | |
integer(kind=ip), | protected | :: | verbose | = | OMMP_VERBOSE_DEFAULT |
verbosity flag, allowed range 0 (no printing at all) -- 3 (debug printing) |
Interface for matrix printing function
Output a 1D-matrix of real in a well formatted way
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | trans |
It the matrix is transposed or not |
||
character(len=*), | intent(in) | :: | label |
Label to be printed before the matrix |
||
real(kind=rp), | intent(in), | dimension(:) | :: | matrix |
Matrix to be printed |
|
integer(kind=ip), | intent(in), | optional | :: | ofunit |
Unit where the matrix should be printed, if not present iof_mmpol is used. |
Output a 2D-matrix of real in a well formatted way
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | trans |
It the matrix is transposed or not |
||
character(len=*), | intent(in) | :: | label |
Label to be printed before the matrix |
||
real(kind=rp), | intent(in), | dimension(:, :) | :: | matrix |
Matrix to be printed |
|
integer(kind=ip), | intent(in), | optional | :: | ofunit |
Unit where the matrix should be printed, if not present iof_mmpol is used. |
This subroutine changes the output file for mmpol to a file defined by filename. A file has already been set, close it before proceed.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | filename |
File name for the new output stream |
This subroutine changes the output file for mmpol to a file defined by filename. A file has already been set, close it before proceed.
Set the verbosity level for the output, this is a library-level function, that changes the behaviour of several I/O functions. It also enforces min/max verbosity levels (currently no output is 0, while debug output is 3).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ip), | intent(in) | :: | v |
Requested level of verbosity |
Output a message according to the verbosity level.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | s |
Message to be printed |
||
integer(kind=ip), | intent(in) | :: | level |
Requested verbosity level |
||
character(len=*), | intent(in), | optional | :: | logpre |
String that explains the type of message, if missing a default type is assigned based on requested verbosity level |
|
integer(kind=ip), | intent(in), | optional | :: | u |
Output unit for the message, if missing, iof_mmpol is used. |
Prints a message and exit from the program. This function should be used in all the conditions where the program cannot proceed.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | message |
Message to print before the program termination |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ip), | intent(in) | :: | v |
Output a 1D-matrix of real in a well formatted way
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | trans |
It the matrix is transposed or not |
||
character(len=*), | intent(in) | :: | label |
Label to be printed before the matrix |
||
real(kind=rp), | intent(in), | dimension(:) | :: | matrix |
Matrix to be printed |
|
integer(kind=ip), | intent(in), | optional | :: | ofunit |
Unit where the matrix should be printed, if not present iof_mmpol is used. |
Output a 2D-matrix of real in a well formatted way
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | trans |
It the matrix is transposed or not |
||
character(len=*), | intent(in) | :: | label |
Label to be printed before the matrix |
||
real(kind=rp), | intent(in), | dimension(:, :) | :: | matrix |
Matrix to be printed |
|
integer(kind=ip), | intent(in), | optional | :: | ofunit |
Unit where the matrix should be printed, if not present iof_mmpol is used. |
Print an array of integers in a well formatted way.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | label |
Label to print before the array |
||
integer(kind=ip), | intent(in), | dimension(:) | :: | vec |
Integer vector to be printed |
|
integer(kind=ip), | intent(in), | optional | :: | ofunit |
If present specify the unit where the array should be printed, otherwise iof_mmpol is used. |
|
integer(kind=ip), | intent(in), | optional | :: | ibeg |
Index of the first element to be printed, if 0 or absent the first element is used |
|
integer(kind=ip), | intent(in), | optional | :: | iend |
Index of the last element to be printed, if 0 or absent the last |
This function attempt some magic to speed up the read of a large text file in order to transfer it to memory.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | fname |
File to be read |
||
character(len=OMMP_STR_CHAR_MAX), | intent(out), | allocatable | :: | outstr(:) |
Data structure to be filled with the data from file |