PB3D [2.47]
Ideal linear high-n MHD stability in 3-D
Loading...
Searching...
No Matches
messages Module Reference

Numerical utilities related to giving output. More...

Functions/Subroutines

subroutine, public init_output ()
 Initialize the variables for the module.
subroutine, public print_hello ()
 Prints first message.
subroutine, public print_goodbye ()
 Prints last messag.
subroutine, public init_time ()
 Intialize the time passed to 0.
subroutine, public start_time ()
 Start a timer.
subroutine, public stop_time ()
 Stop a timer.
subroutine, public passed_time ()
 Display the time that has passed between t1 and t2.
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.
subroutine, public lvl_ud (inc)
 Increases/decreases lvl of output.
subroutine, public writo (input_str, persistent, error, warning, alert)
 Write output to file identified by output_i.
subroutine, public print_ar_2 (arr)
 Print an array of dimension 2 on the screen.
subroutine, public print_ar_1 (arr)
 Print an array of dimension 1 on the screen.
integer function, public get_mem_usage ()
 Returns the memory usage in kilobytes.

Variables

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

Detailed Description

Numerical utilities related to giving output.

Function/Subroutine Documentation

◆ 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 553 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 31 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 112 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 253 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 151 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 486 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 474 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 233 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 98 of file messages.f90.

Here is the caller graph for this function:

◆ print_hello()

subroutine, public messages::print_hello

Prints first message.

Definition at line 60 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 120 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 131 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 274 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.