PB3D  [2.45]
Ideal linear high-n MHD stability in 3-D
Functions/Subroutines
files_utilities Module Reference

Numerical utilities related to files. More...

Functions/Subroutines

integer function, public nextunit (unit)
 Search for available new unit. More...
 
integer function, public skip_comment (file_i, file_name)
 Skips comment when reading a file. More...
 
subroutine, public get_file_info (file_name, file_size, acc_time, mod_time)
 Gets file information. More...
 
character(len=max_str_ln) function, public get_full_pb3d_name (rich_lvl)
 Returns the name of the PB3D output file. More...
 
integer function, public delete_file (file_name)
 Removes a file. More...
 
integer function, public count_lines (file_i)
 Count non-comment lines in a file. More...
 

Detailed Description

Numerical utilities related to files.

Function/Subroutine Documentation

◆ count_lines()

integer function, public files_utilities::count_lines ( integer, intent(in)  file_i)

Count non-comment lines in a file.

Parameters
[in]file_ifile identifier

Definition at line 170 of file files_utilities.f90.

+ Here is the caller graph for this function:

◆ delete_file()

integer function, public files_utilities::delete_file ( character(len=*), intent(inout)  file_name)

Removes a file.

Returns
istat
Parameters
[in,out]file_namethe name that is deleted

Definition at line 144 of file files_utilities.f90.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_file_info()

subroutine, public files_utilities::get_file_info ( character(len=*), intent(in)  file_name,
integer, intent(inout), optional  file_size,
integer, intent(inout), optional  acc_time,
integer, intent(inout), optional  mod_time 
)

Gets file information.

The time informations can be converted to strings using the intrinsic function "ctime".

Parameters
[in]file_namename of file
[in,out]file_sizefile size
[in,out]acc_timefile access time
[in,out]mod_timefile modification time

Definition at line 86 of file files_utilities.f90.

+ Here is the call graph for this function:

◆ get_full_pb3d_name()

character(len=max_str_ln) function, public files_utilities::get_full_pb3d_name ( integer, intent(in), optional  rich_lvl)

Returns the name of the PB3D output file.

Optionally, the Richardson level can be appended as _R_[lvl].

If not positive, it is ignored.

Definition at line 119 of file files_utilities.f90.

+ Here is the call graph for this function:

◆ nextunit()

integer function, public files_utilities::nextunit ( integer, intent(out), optional  unit)

Search for available new unit.

lun_min and lun_max define the range of possible luns to check.

The unit value is returned by the function, and also by the optional argument. This allows the function to be used directly in an open statement, and optionally save the result in a local variable.

If no units are available, -1 is returned.

See also
Adapted from http://fortranwiki.org/fortran/show/newunit

Definition at line 27 of file files_utilities.f90.

+ Here is the caller graph for this function:

◆ skip_comment()

integer function, public files_utilities::skip_comment ( integer, intent(in)  file_i,
character(len=*), intent(in), optional  file_name 
)

Skips comment when reading a file.

By comment, a line is meant that starts with the character #.

Returns
ierr

Definition at line 55 of file files_utilities.f90.

+ Here is the caller graph for this function: