Loading [MathJax]/extensions/tex2jax.js
Globals Library 1.0
All Classes Namespaces Files Functions Variables Pages
00modGlobals.f90 File Reference

Data Types

type  globals::file
 

Modules

module  globals
 

Functions/Subroutines

logical function globals::ioerr (lun, errno, call_proc, add_msg, add_int)
 Handle and write alert I/O warnings and errors.
 
character(len=256) function errmsg (errno, addmsg, addint)
 Return message depending on input number.
 
character(len=len(strin)) function globals::to_upper (strin)
 Transform string to upper case.
 
character(len=len(strin)) function globals::to_lower (strin)
 Transform string to lowercase case.
 
character(len=len_trim(adjustl(strin))) function globals::etb (strin)
 Return string strin with no preceding and trailing spaces.
 
character(len=len_trim(adjustl(strin))) function globals::erase_comment (strin)
 Erase comments from a string.
 
real(kind=double) function, dimension(3) globals::avg_vec3 (avg_type, veca, vecb, vecc)
 Function that calculates vectors averages.
 
real(kind=double) function globals::avg_scal (avg_type, a, b, c)
 Function that calculates scalar averages.
 
real(kind=double) function, dimension(3) globals::cross (veca, vecb)
 Function that calculates cross-products.
 
subroutine globals::isort (narray, array)
 Simple sort algorithm to sort in increasing order an integer array. To be used only for small array. Use globals::global_heapsort for big arrays.
 
subroutine globals::unique_of_sorted (n_elements, elements, nunique)
 Given a sorted array, it is returned with the list of uniques elements in the first positions.
 
logical function globals::lexicographic_order (n, a, b)
 Check if the first array is in lexicographic order with respect to the second.
 
subroutine globals::global_heapsort (n, indx, i, j, isgn)
 global_heapsort
 
integer function globals::ifind (narray, array, tobefound)
 ifind
 
subroutine globals::double_col_permute (m, n, p, a)
 double_col_permute
 
subroutine globals::integer_col_permute (m, n, p, a)
 integer_col_permute
 
real(kind=double) function globals::p_norm (ndata, power, data, weight)
 Evaluates the weighted p-norm.
 
subroutine globals::ortogonalize (dim, nvectors, vectors, x)
 Procedure orthogonalizing a vector w.r.t. a a set of vectors.
 
subroutine globals::orthogonal_projection (ndim, vector, normal, res_proj)
 Procedure that computes the projection of a vector onto the plane orthogonal to another vector (normal)
 
subroutine globals::fn_print (this, lun)
 Info procedure for globals::file
 
character(len=len_trim(adjustl(str_file))) function globals::get_dirname (str_file)
 
subroutine globals::fn_init (this, lun_err, fn, lun, io_flag, mandatory_input, folder, verbose, info)
 Static constructor for globals::file
 
subroutine globals::fn_kill (this, lun_err)
 Static destructor for globals::file
 

Variables

integer, parameter globals::wrn_io = 1
 File or directory does not exist.
 
integer, parameter globals::wrn_val = 3
 Error in input/outour parameter.
 
integer, parameter globals::wrn_read = 11
 Error reading file.
 
integer, parameter globals::wrn_write = 21
 Error writing file.
 
integer, parameter globals::wrn_inp = 13
 Error in input parameter.
 
integer, parameter globals::wrn_out = 23
 Error in outour parameter.
 
integer, parameter globals::err_io = 101
 File or directory does not exist.
 
integer, parameter globals::err_inp = 111
 Error in input parameter.
 
integer, parameter globals::err_out = 121
 Error in outour parameter.
 
integer, parameter globals::err_alloc = 131
 Error allocation failed.
 
integer, parameter globals::err_dealloc = 141
 Error deallocation failed.
 
integer, parameter globals::err_vtk = 151
 Error VTK library.
 
integer, parameter globals::err_read = 161
 Error reading file.
 
integer, parameter globals::err_write = 171
 Error writing file.
 
integer, parameter globals::err_val = 201
 Error in parameter value.
 

Function/Subroutine Documentation

◆ errmsg()

character(len=256) function ioerr::errmsg ( integer, intent(in) errno,
character(len=*), intent(in) addmsg,
integer, intent(in) addint )
private

Return message depending on input number.


Parameters
[in]errnoerror number
[in]addmsgadditional message to be printed
[in]intto be included in msg if nonzero
Returns
msg: error message