leapMonitor Module

A module that writes data computed on-the-fly to the stdout and/or ascii files.



Uses

  • module~~leapmonitor~~UsesGraph module~leapmonitor leapMonitor module~leapkinds leapKinds module~leapmonitor->module~leapkinds module~leapparallel leapParallel module~leapmonitor->module~leapparallel module~leaputils leapUtils module~leapmonitor->module~leaputils iso_fortran_env iso_fortran_env module~leapkinds->iso_fortran_env module~leapparallel->module~leapkinds module~leapparser leapParser module~leapparallel->module~leapparser mpi_f08 mpi_f08 module~leapparallel->mpi_f08 module~leaputils->module~leapkinds module~leaputils->mpi_f08 module~leapparser->module~leapkinds module~leapcli leapCli module~leapparser->module~leapcli module~leapcli->module~leapkinds

Used by

  • module~~leapmonitor~~UsedByGraph module~leapmonitor leapMonitor module~cdifs cdifs module~cdifs->module~leapmonitor module~particles_resolved particles_resolved module~cdifs->module~particles_resolved module~immersed_boundaries immersed_boundaries module~cdifs->module~immersed_boundaries module~grans grans module~grans->module~leapmonitor module~grans->module~particles_resolved module~grans_cases grans_cases module~grans->module~grans_cases module~grans->module~immersed_boundaries module~immersed_boundaries_markers immersed_boundaries_markers module~immersed_boundaries_markers->module~leapmonitor module~particles_resolved->module~leapmonitor module~particles_resolved->module~immersed_boundaries module~cdifs_advancesolution_smod cdifs_AdvanceSolution_smod module~cdifs_advancesolution_smod->module~cdifs module~cdifs_monitor_smod cdifs_Monitor_smod module~cdifs_monitor_smod->module~cdifs module~cdifs_preparesolver_smod cdifs_PrepareSolver_smod module~cdifs_preparesolver_smod->module~cdifs module~cdifs_writeoutputdata_smod cdifs_WriteOutputData_smod module~cdifs_writeoutputdata_smod->module~cdifs module~cdifs_writerestartdata_smod cdifs_WriteRestartData_smod module~cdifs_writerestartdata_smod->module~cdifs module~grans_advancesolution_smod grans_AdvanceSolution_smod module~grans_advancesolution_smod->module~grans module~grans_cases->module~particles_resolved module~grans_cases->module~immersed_boundaries module~grans_module_smod grans_module_smod module~grans_module_smod->module~grans module~grans_preparesolver_smod grans_PrepareSolver_smod module~grans_preparesolver_smod->module~grans module~grans_writeoutputdata_smod grans_WriteOutputData_smod module~grans_writeoutputdata_smod->module~grans module~grans_writerestartdata_smod grans_WriteRestartData_smod module~grans_writerestartdata_smod->module~grans module~immersed_boundaries->module~immersed_boundaries_markers module~immersed_boundaries_solids immersed_boundaries_solids module~immersed_boundaries->module~immersed_boundaries_solids module~immersed_boundaries_solids->module~immersed_boundaries_markers proc~add_markers add_markers proc~add_markers->module~particles_resolved proc~add_markers->module~immersed_boundaries proc~add_markers~2 add_markers proc~add_markers~2->module~particles_resolved proc~add_markers~2->module~immersed_boundaries proc~cdifs_rebound_respart cdifs_rebound_ResPart proc~cdifs_rebound_respart->module~particles_resolved proc~cdifs_settling_sphere_respart cdifs_settling_sphere_ResPart proc~cdifs_settling_sphere_respart->module~particles_resolved program~main main program~main->module~cdifs program~main->module~grans module~headon_collision_smod headon_collision_smod module~headon_collision_smod->module~grans_cases module~homogeneous_cooling_smod homogeneous_cooling_smod module~homogeneous_cooling_smod->module~grans_cases module~rotating_drum_smod rotating_drum_smod module~rotating_drum_smod->module~grans_cases proc~cdifs_cylinder_ib cdifs_cylinder_IB proc~cdifs_cylinder_ib->module~immersed_boundaries proc~cdifs_rebound_ib cdifs_rebound_IB proc~cdifs_rebound_ib->module~immersed_boundaries proc~cdifs_settling_sphere_ib cdifs_settling_sphere_IB proc~cdifs_settling_sphere_ib->module~immersed_boundaries

Variables

Type Visibility Attributes Name Initial
integer, private, parameter :: MONITOR_SET_HTBL_SIZE = 20
character(len=*), private, parameter :: baseDirName = "./monitors"

base directory name

character(len=*), private, parameter :: baseFileName = ""

base file name

integer, private, parameter :: colSize = 16

Size of each column

integer, private, parameter :: monSize = 64

Size of the monitor name


Derived Types

type, public ::  monitor_set

Components

Type Visibility Attributes Name Initial
class(monitor_obj), public, allocatable :: m(:)

Array of monitors

type(parallel_obj), public, pointer :: parallel => null()

Associated parallel structure

type(hashtbl_obj), private :: tbl

Hash table

Type-Bound Procedures

procedure, public :: Create => monitor_set_Create ../../

Create a new monitor

procedure, public :: Expand => monitor_set_Expand ../../

Add a new monitor slot

procedure, public :: Finalize => monitor_set_Final ../../

Finalize the structure

procedure, public :: GetIndex => monitor_set_GetIndex ../../

Return the index of a monitor

procedure, public :: Info => monitor_set_Info ../../

Print a number of diagnostics information

procedure, public :: Initialize => monitor_set_Init ../../

Initialize the structure

procedure, public :: Print => monitor_set_Print ../../

Print the content of the monitors

procedure, public :: Set => monitor_set_Set ../../

Set the label or value of a monitor

type, private ::  column_obj

Column object

Components

Type Visibility Attributes Name Initial
character(len=colSize), public :: label

Column label

character(len=colSize), public :: value

Value

type, private ::  monitor_obj

Monitor object

Components

Type Visibility Attributes Name Initial
character(len=16), public :: FMT(4)

Format specifiers

type(column_obj), public, allocatable :: col(:)

Columns

integer, public :: fid

Monitor IO unit

character(len=monSize), public :: name

Name of the monitor file

character(len=1), public :: sep

Column seperator

logical, public :: stdout

Print to stdout

Type-Bound Procedures

procedure, public :: Finalize => monitor_obj_Final ../../

Finalize a monitor object

procedure, public :: Formats => monitor_obj_Formats ../../

Define the format specifiers

procedure, public :: Initialize => monitor_obj_Init ../../

Intialize a monitor object

procedure, public :: Print => monitor_obj_Print ../../

Print the content of this monitor

procedure, public :: SetVal => monitor_obj_SetVal ../../

Set the value


Functions

private function monitor_set_GetIndex(this, name) result(loc)

Returns the ID of a monitor identified by name

Arguments

Type IntentOptional Attributes Name
class(monitor_set), intent(inout) :: this

Set of monitor objects

character(len=*), intent(in) :: name

Name of the monitor

Return Value integer

Monitor ID


Subroutines

private subroutine monitor_obj_Final(this)

Finalize the monitor object

Arguments

Type IntentOptional Attributes Name
class(monitor_obj), intent(inout) :: this

A monitor object

private subroutine monitor_obj_Formats(this)

Define how to print numbers Format specifier for an integer Format specifier for a real Format specifier for a logical Format specifier for a full line

Arguments

Type IntentOptional Attributes Name
class(monitor_obj), intent(inout) :: this

A monitor object

private subroutine monitor_obj_Init(this, name, ncol, sep)

Intializes a single monitor

Arguments

Type IntentOptional Attributes Name
class(monitor_obj), intent(inout) :: this

A monitor object

character(len=*), intent(in) :: name

Name of the monitor

integer, intent(in) :: ncol

Number of columns

character(len=*), intent(in), optional :: sep

Number of columns

private subroutine monitor_obj_Print(this, print_labels)

Prints to file or stdout content of the monitor

Arguments

Type IntentOptional Attributes Name
class(monitor_obj), intent(inout) :: this

A monitor object

logical, intent(in) :: print_labels

True if we want to print the labels

private subroutine monitor_obj_SetVal(this, n, value)

Finalize the monitor object

Arguments

Type IntentOptional Attributes Name
class(monitor_obj), intent(inout) :: this

A monitor object

integer, intent(in) :: n

Column index

class(*), intent(in) :: value

Value

private subroutine monitor_set_Create(this, name, ncol, stdout, sep)

Creates a new monitor

Arguments

Type IntentOptional Attributes Name
class(monitor_set), intent(inout) :: this

Set of monitor objects

character(len=*), intent(in) :: name

Name of the monitor

integer, intent(in) :: ncol

Number of columns

logical, intent(in), optional :: stdout

Switch to write to the stdout

character(len=*), intent(in), optional :: sep

Number of columns

private subroutine monitor_set_Expand(this)

Changes the size of an array of monitors

Arguments

Type IntentOptional Attributes Name
class(monitor_set), intent(inout) :: this

Set of monitor objects

private subroutine monitor_set_Final(this)

Arguments

Type IntentOptional Attributes Name
class(monitor_set), intent(inout) :: this

A set of monitor objects

private subroutine monitor_set_Info(this)

Print a number of diagnostics information

Arguments

Type IntentOptional Attributes Name
class(monitor_set), intent(inout) :: this

Set of monitor objects

private subroutine monitor_set_Init(this, parallel)

Initialize a set of monitors

Arguments

Type IntentOptional Attributes Name
class(monitor_set), intent(inout) :: this

A set of monitor objects

type(parallel_obj), intent(in), target :: parallel

parallel structure from main program

private subroutine monitor_set_Print(this, print_labels)

Prints content of monitors

Arguments

Type IntentOptional Attributes Name
class(monitor_set), intent(inout) :: this

Set of monitor objects

logical, intent(in), optional :: print_labels

True if we want to print the labels

private subroutine monitor_set_Set(this, name, colID, value, label)

Set the label or value of a column of a certain monitor

Arguments

Type IntentOptional Attributes Name
class(monitor_set), intent(inout) :: this

Set of monitor objects

character(len=*), intent(in) :: name

Name of the monitor

integer, intent(in) :: colID

Number of columns

class(*), intent(in), optional :: value

Value

character(len=*), intent(in), optional :: label

Column label