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

Numerical utilities related to giving output. More...

Functions/Subroutines

subroutine, public init_output ()
 Initialize the variables for the module. More...
 
subroutine, public print_hello ()
 Prints first message. More...
 
subroutine, public print_goodbye ()
 Prints last messag. More...
 
subroutine, public init_time ()
 Intialize the time passed to 0. More...
 
subroutine, public start_time ()
 Start a timer. More...
 
subroutine, public stop_time ()
 Stop a timer. More...
 
subroutine, public passed_time ()
 Display the time that has passed between t1 and t2. More...
 
character(len=8) function get_clock ()
 Returns the time. More...
 
subroutine, public print_err_msg (err_msg, routine_name)
 Prints an error message that is either user-provided, or the name of the calling routine. More...
 
subroutine, public lvl_ud (inc)
 Increases/decreases lvl of output. More...
 
subroutine, public writo (input_str, persistent, error, warning, alert)
 Write output to file identified by output_i. More...
 
subroutine, public print_ar_2 (arr)
 Print an array of dimension 2 on the screen. More...
 
subroutine, public print_ar_1 (arr)
 Print an array of dimension 1 on the screen. More...
 
integer function, public get_mem_usage ()
 Returns the memory usage in kilobytes. More...
 

Variables

integer, public lvl
 determines the indenting. higher lvl = more indenting More...
 
character(len=2), public lvl_sep = ''
 characters that separate different levels of output More...
 
character(len=10), public time_sep = ''
 defines the length of time part of output More...
 
logical, public temp_output_active
 true if temporary output is to be written in temp_output More...
 
character(len=max_str_ln), dimension(:), allocatable, public temp_output
 temporary output, before output file is opened More...
 

Detailed Description

Numerical utilities related to giving output.

Function/Subroutine Documentation

◆ get_clock()

character(len=8) function messages::get_clock

Returns the time.

from http://infohost.nmt.edu/tcc/help/lang/fortran/date.html

Definition at line 218 of file messages.f90.

+ Here is the caller graph for this function:

◆ get_mem_usage()

integer function, public messages::get_mem_usage

Returns the memory usage in kilobytes.

Based on http://stackoverflow.com/questions/22028571/track-memory-usage-in-fortran-90

Note
Only works under linux.
Debug version only

Definition at line 554 of file messages.f90.

+ Here is the caller graph for this function:

◆ init_output()

subroutine, public messages::init_output

Initialize the variables for the module.

Definition at line 32 of file messages.f90.

+ Here is the caller graph for this function:

◆ init_time()

subroutine, public messages::init_time

Intialize the time passed to 0.

Definition at line 113 of file messages.f90.

+ Here is the caller graph for this function:

◆ lvl_ud()

subroutine, public messages::lvl_ud ( integer  inc)

Increases/decreases lvl of output.

Name stands for level up or down.

Parameters
incincrement of level

Definition at line 254 of file messages.f90.

+ Here is the call graph for this function:

◆ passed_time()

subroutine, public messages::passed_time

Display the time that has passed between t1 and t2.

Automatically stops time and resets everything to zero.

Definition at line 152 of file messages.f90.

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

◆ print_ar_1()

subroutine, public messages::print_ar_1 ( real(dp), dimension(:), intent(in)  arr)

Print an array of dimension 1 on the screen.

Parameters
[in]arrarray to be printed

Definition at line 487 of file messages.f90.

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

◆ print_ar_2()

subroutine, public messages::print_ar_2 ( real(dp), dimension(:,:), intent(in)  arr)

Print an array of dimension 2 on the screen.

Parameters
[in]arrarray to be printed

Definition at line 475 of file messages.f90.

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

◆ print_err_msg()

subroutine, public messages::print_err_msg ( character(len=*), intent(in)  err_msg,
character(len=*), intent(in)  routine_name 
)

Prints an error message that is either user-provided, or the name of the calling routine.

Note
This should be used with the macro CHCKERR.
Parameters
[in]err_msgerror message to be printed
[in]routine_namename of the routine

Definition at line 234 of file messages.f90.

+ Here is the call graph for this function:

◆ print_goodbye()

subroutine, public messages::print_goodbye

Prints last messag.

Definition at line 99 of file messages.f90.

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

◆ print_hello()

subroutine, public messages::print_hello

Prints first message.

Definition at line 61 of file messages.f90.

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

◆ start_time()

subroutine, public messages::start_time

Start a timer.

Definition at line 121 of file messages.f90.

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

◆ stop_time()

subroutine, public messages::stop_time

Stop a timer.

Definition at line 132 of file messages.f90.

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

◆ writo()

subroutine, public messages::writo ( character(len=*), intent(in)  input_str,
logical, intent(in), optional  persistent,
logical, intent(in), optional  error,
logical, intent(in), optional  warning,
logical, intent(in), optional  alert 
)

Write output to file identified by output_i.

This is done using the correct indentation for the level (lvl_loc) of the output.

By default, only the master outputs, but this can be changed using persistent.

Optionally, special formatting for error, warning or alert can be chosen.

Parameters
[in]input_strthe name that is searched for
[in]persistentoutput even if not group master
[in]errorerror message
[in]warningwarning message
[in]alertalert message

Definition at line 275 of file messages.f90.

+ Here is the call graph for this function:

Variable Documentation

◆ lvl

integer, public messages::lvl

determines the indenting. higher lvl = more indenting

Definition at line 20 of file messages.f90.

◆ lvl_sep

character(len=2), public messages::lvl_sep = ''

characters that separate different levels of output

Definition at line 21 of file messages.f90.

◆ temp_output

character(len=max_str_ln), dimension(:), allocatable, public messages::temp_output

temporary output, before output file is opened

Definition at line 27 of file messages.f90.

◆ temp_output_active

logical, public messages::temp_output_active

true if temporary output is to be written in temp_output

Definition at line 26 of file messages.f90.

◆ time_sep

character(len=10), public messages::time_sep = ''

defines the length of time part of output

Definition at line 22 of file messages.f90.