Here globally used variables /functions are defined
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | wp | = | selected_real_kind(15, 307) |
double precision |
| character(len=20), | public | :: | fmt_sep | = | '(132("="))' |
formatting of separator line: WRITE(*,fmt_sep) |
|
| real(kind=wp), | public, | parameter | :: | PI | = | ACOS(-1.0_wp) |
pi parameter |
| real(kind=wp), | public, | parameter | :: | TWOPI | = | 2.0_wp*PI |
2*pi parameter |
| integer, | public | :: | n_warnings_occured | = | 0 |
for final line in screen output: 0 no warnings occured |
|
| logical, | public | :: | testdbg | = | .FALSE. |
for debugging the tests, set true for implementing tests, false to run |
|
| integer, | public | :: | testlevel | = | -1 |
flag for testing routines in code: -1: off |
|
| integer, | public | :: | ntestCalled | = | 0 |
counter for called tests |
|
| integer, | public | :: | nfailedMsg | = | 0 |
counter for messages on failed tests |
|
| integer, | public | :: | testUnit |
unit for out.test file |
|||
| logical, | public | :: | MPIRoot | = | .TRUE. |
flag whether process is MPI root process |
|
| integer, | public | :: | myRank | = | 0 |
rank of the MPI task |
|
| integer, | public | :: | nRanks | = | 1 |
total number of MPI tasks |
|
| character(len=20), | public | :: | active_region(5) | = | (/"", "", "", "", ""/) |
for abort messages, to identify which (sub-)region was currently |
|
| integer, | public | :: | iregion | = | 0 |
which active_region to fill |
|
| integer, | public | :: | ProgressBar_oldpercent |
for progressBar |
|||
| real(kind=wp), | public | :: | ProgressBar_starttime |
for progressBar |
|||
| integer, | public, | parameter | :: | UNIT_stdIn | = | input_unit |
Terminal input |
| integer, | public, | parameter | :: | UNIT_stdOut | = | output_unit |
Terminal output |
| integer, | public, | parameter | :: | UNIT_errOut | = | error_unit |
For error output |
| logical, | public | :: | print_backtrace | = | .TRUE. |
print backtrace on abort if compiled with GNU compiler |
|
| integer, | public, | parameter | :: | MAXLEN | = | 4096 |
max length of strings, needed for string handling when compiled with NVHPC |
| procedure(RaiseException), | public, | POINTER | :: | RaiseExceptionPtr | => | NULL() |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | ErrorMessage |
Calculates current time (serial / OpenMP /MPI)
Calculates current time locally on a MPIrank (no MPI Barrier)
Get unused file unit number
File unit number
evalute monomial polynomial c_1+c_2x+c_3x^2 ...
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nCoefs |
number of coefficients |
||
| real(kind=wp), | intent(in) | :: | Coefs(nCoefs) |
coefficients |
||
| real(kind=wp), | intent(in) | :: | x |
evaluation position |
evalute first derivative monomial polynomial (c_1+c_2x+c_3x^2) -> (c_2+2c_3x+3c_4x^2 ...
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nCoefs |
number of coefficients |
||
| real(kind=wp), | intent(in) | :: | Coefs(nCoefs) |
coefficients |
||
| real(kind=wp), | intent(in) | :: | x |
evaluation position |
normalizes a nDim vector with respect to the eucledian norm
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | v1(nVal) |
vector |
||
| integer, | intent(in) | :: | nVal |
vector size |
result, normalized vector
computes the cross product of to 3 dimensional vectors: cross=v1 x v2
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | v1(3) |
first input vector |
||
| real(kind=wp), | intent(in) | :: | v2(3) |
second input vector |
result v1 x v2
compute determinant of 3x3 matrix
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | Mat(3,3) |
input matrix |
determinant of the input matrix
compute inverse of 3x3 matrix, needs sDet=1/det(Mat)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | Mat(3,3) |
input matrix |
||
| real(kind=wp), | intent(in), | optional | :: | Det_in |
determinant of input matrix (otherwise computed here) |
inverse matrix
reset global variables for the subregion output to default
add the current subregion to the active_regions (maximum depth is 5) This information is collected uniquely for the abort error message
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | subregion_name |
remove the current subregion from the active subregions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | subregion_name |
Terminate program correctly if an error has occurred (important in MPI mode!). Uses a MPI_ABORT which terminates FLUXO if a single proc calls this routine.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*) | :: | SourceFile |
Source file where error has occurred |
|||
| integer | :: | SourceLine |
Line in source file |
|||
| character(len=*) | :: | CompDate |
Compilation date |
|||
| character(len=*) | :: | CompTime |
Compilation time |
|||
| character(len=*) | :: | ErrorMessage |
Error message |
|||
| integer, | optional | :: | IntInfo |
additional integer value for error message |
||
| real(kind=wp), | optional | :: | RealInfo |
additional real value for error message |
||
| integer, | optional | :: | ErrorCode |
used for MPI |
||
| character(len=*), | optional | :: | TypeInfo |
Error type, default is "RuntimeError". Or e.g. "MissingParameterError","InvalidParameterError","FileNotFoundError","InitializationError" |
Print a progress bar to screen, call either with init=T or init=F
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | iter |
iter ranges from 1...n_iter |
||
| integer, | intent(in) | :: | n_iter |
iter ranges from 1...n_iter |