Appearance
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
- flume_diagnostics_object
- close_file
- initialize
- load_from_file
- open_file
- save_conservation_row
- save_divb_row
- description
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
INI_SECTION_NAME | character(len=11) | parameter | INI (config) file section name. |
Derived Types
flume_diagnostics_object
FLUME diagnostics class definition: conservation history.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
conservation_history_save | integer(kind=I4P) | Conservation history save cadence (<= 0: disabled). | |
conservation_unit | integer(kind=I4P) | Conservation history file unit. | |
divb_unit | integer(kind=I4P) | div(B) history file unit (MHD only). |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
close_file | pass(self) | Close the history file. |
description | pass(self) | Return pretty-printed object description. |
initialize | pass(self) | Initialize diagnostics. |
load_from_file | pass(self) | Load config from file. |
open_file | pass(self) | Open the history file and write its header. |
save_conservation_row | pass(self) | Write one conservation history row. |
save_divb_row | pass(self) | Write one div(B) history row. |
Subroutines
close_file
Close the history files.
fortran
subroutine close_file(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_diagnostics_object) | inout | Diagnostics. |
Call graph
initialize
Initialize diagnostics.
fortran
subroutine initialize(self, file_parameters)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_diagnostics_object) | inout | Diagnostics. | |
file_parameters | type(file_ini) | in | Simulation 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_diagnostics_object) | inout | Diagnostics. | |
file_parameters | type(file_ini) | in | Simulation 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_diagnostics_object) | inout | Diagnostics. | |
output_basename | character(len=*) | in | Output files base name. | |
q_name | type(string) | in | Conservative variables names. | |
is_restart | logical | in | Restarted run flag. | |
with_divb | logical | in | Open 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_diagnostics_object) | in | Diagnostics. | |
it | integer(kind=I4P) | in | Time iteration. | |
time | real(kind=R8P) | in | Time. | |
integrals | real(kind=R8P) | in | Volume 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_diagnostics_object) | in | Diagnostics. | |
it | integer(kind=I4P) | in | Time iteration. | |
time | real(kind=R8P) | in | Time. | |
norms | real(kind=R8P) | in | max|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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_diagnostics_object) | in | Diagnostics. |
Call graph