Skip to content

adam_flume_diagnostics_object ​

ADAM, FLUME diagnostics class definition: conservation and div(B) histories.

Writes one row per save step to <output_basename>-conservation_history.dat: iteration, time and the volume integral of every conservative variable. MHD runs also write, on the same cadence, <output_basename>-divb_history.dat: iteration, time, max|div B|, sum |div B| dV and the maximum over the seam-local cells (issue #41, D-10, section 9). Rows are written as they come, nothing is accumulated in memory. The values are computed (and MPI-reduced) by the backends; only rank 0 writes.

Source: src/app/flume/common/adam_flume_diagnostics_object.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
INI_SECTION_NAMEcharacter(len=11)parameterINI (config) file section name.

Derived Types ​

flume_diagnostics_object ​

FLUME diagnostics class definition: conservation history.

Components ​

NameTypeAttributesDescription
conservation_history_saveinteger(kind=I4P)Conservation history save cadence (<= 0: disabled).
conservation_unitinteger(kind=I4P)Conservation history file unit.
divb_unitinteger(kind=I4P)div(B) history file unit (MHD only).

Type-Bound Procedures ​

NameAttributesDescription
close_filepass(self)Close the history file.
descriptionpass(self)Return pretty-printed object description.
initializepass(self)Initialize diagnostics.
load_from_filepass(self)Load config from file.
open_filepass(self)Open the history file and write its header.
save_conservation_rowpass(self)Write one conservation history row.
save_divb_rowpass(self)Write one div(B) history row.

Subroutines ​

close_file ​

Close the history files.

fortran
subroutine close_file(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_diagnostics_object)inoutDiagnostics.

Call graph

initialize ​

Initialize diagnostics.

fortran
subroutine initialize(self, file_parameters)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_diagnostics_object)inoutDiagnostics.
file_parameterstype(file_ini)inSimulation parameters ini file handler.

Call graph

load_from_file ​

Load config from file; every key is required.

fortran
subroutine load_from_file(self, file_parameters)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_diagnostics_object)inoutDiagnostics.
file_parameterstype(file_ini)inSimulation parameters ini file handler.

Call graph

open_file ​

Open the history files and write their headers (append, without header, on restart).

fortran
subroutine open_file(self, output_basename, q_name, is_restart, with_divb)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_diagnostics_object)inoutDiagnostics.
output_basenamecharacter(len=*)inOutput files base name.
q_nametype(string)inConservative variables names.
is_restartlogicalinRestarted run flag.
with_divblogicalinOpen the div(B) history too (MHD).

Call graph

save_conservation_row ​

Write one conservation history row (rank 0 only; integrals already MPI-reduced).

fortran
subroutine save_conservation_row(self, it, time, integrals)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_diagnostics_object)inDiagnostics.
itinteger(kind=I4P)inTime iteration.
timereal(kind=R8P)inTime.
integralsreal(kind=R8P)inVolume integrals of the conservative variables.

Call graph

save_divb_row ​

Write one div(B) history row (rank 0 only; norms already MPI-reduced).

fortran
subroutine save_divb_row(self, it, time, norms)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_diagnostics_object)inDiagnostics.
itinteger(kind=I4P)inTime iteration.
timereal(kind=R8P)inTime.
normsreal(kind=R8P)inmax|div B|, sum |div B| dV, seam-local max|div B|.

Call graph

Functions ​

description ​

Return a pretty-formatted object description.

Returns: character(len=:)

fortran
function description(self) result(desc)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_diagnostics_object)inDiagnostics.

Call graph