Appearance
adam_io_object
ADAM, IO class definition.
Source: src/lib/common/adam_io_object.F90
Dependencies
Contents
- io_object
- initialize
- load_from_file
- save_energy_error
- save_energy_history
- save_divergence_history
- close_file_residuals
- open_file_residuals
- save_residuals
- save_xh5f_field_4D_R8P
- save_xh5f_field_5D_R8P
- save_xh5f_field_4D_R4P
- save_xh5f_field_5D_R4P
- save_xh5f_field_4D_I8P
- save_xh5f_field_5D_I8P
- save_xh5f_field_4D_I4P
- save_xh5f_field_5D_I4P
- save_xh5f_field_4D_I2P
- save_xh5f_field_5D_I2P
- save_xh5f_field_4D_I1P
- save_xh5f_field_5D_I1P
- description
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
INI_SECTION_NAME | character(len=2) | parameter | INI (config) file section name containing IO configs. |
Derived Types
io_object
ADAM class definition.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
file_parameters | type(file_ini) | Input file handler. | |
it_save | integer(kind=I4P) | Main output iteration save frequency. | |
output_basename | character(len=:) | allocatable | Basename of output files. |
restart | logical | Enable restart from old output data. | |
restart_basename | character(len=:) | allocatable | Basename of restart files. |
restart_save | integer(kind=I4P) | Restart output iteration save frequency. | |
save_memory_status | logical | Enable save of memory status during allocations. | |
residuals_save | integer(kind=I4P) | Residuals (norm) output iteration save frequency. | |
residuals_unit | integer(kind=I4P) | Residuals file unit. | |
energy_error_save | integer(kind=I4P) | Energy error output iteration save frequency. | |
energy_error_unit | integer(kind=I4P) | Energy error hystory file unit. | |
energy_history_save | integer(kind=I4P) | Energy history output iteration save frequency. | |
energy_history_unit | integer(kind=I4P) | Energy history file unit. | |
divergence_history_save | integer(kind=I4P) | Divergence history output iteration save frequency. | |
divergence_history_unit | integer(kind=I4P) | Divergence history file unit. | |
is_initialized | logical | Initialization status. | |
save_residual_fields | logical | Flag to activate residual fields saving. | |
save_curl_fields | logical | Flag to activate curl fields saving. | |
save_divergence_fields | logical | Flag to activate divergence fields saving. | |
save_gradient_fields | logical | Flag to activate gradient fields saving. | |
save_laplacian_fields | logical | Flag to activate gradient fields saving. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
description | pass(self) | Return pretty-printed object description. |
initialize | pass(self) | Initialize class. |
load_from_file | pass(self) | Load config from file. |
save_energy_error | pass(self) | Save energy error history. |
save_energy_history | pass(self) | Save energy history. |
save_divergence_history | pass(self) | Save divergence history. |
close_file_residuals | pass(self) | Close file for saving residuals history. |
open_file_residuals | pass(self) | Open file for saving residuals history. |
save_residuals | pass(self) | Save residuals history. |
save_field | Save fields by XH5F (XDMF/HDF5) file handler. | |
save_xh5f_field_4D_R8P | pass(self) | Save fields by XH5F file handler, rank 4D, kind R8P. |
save_xh5f_field_4D_R4P | pass(self) | Save fields by XH5F file handler, rank 4D, kind R4P. |
save_xh5f_field_4D_I8P | pass(self) | Save fields by XH5F file handler, rank 4D, kind I8P. |
save_xh5f_field_4D_I4P | pass(self) | Save fields by XH5F file handler, rank 4D, kind I4P. |
save_xh5f_field_4D_I2P | pass(self) | Save fields by XH5F file handler, rank 4D, kind I2P. |
save_xh5f_field_4D_I1P | pass(self) | Save fields by XH5F file handler, rank 4D, kind I1P. |
save_xh5f_field_5D_R8P | pass(self) | Save fields by XH5F file handler, rank 5D, kind R8P. |
save_xh5f_field_5D_R4P | pass(self) | Save fields by XH5F file handler, rank 5D, kind R4P. |
save_xh5f_field_5D_I8P | pass(self) | Save fields by XH5F file handler, rank 5D, kind I8P. |
save_xh5f_field_5D_I4P | pass(self) | Save fields by XH5F file handler, rank 5D, kind I4P. |
save_xh5f_field_5D_I2P | pass(self) | Save fields by XH5F file handler, rank 5D, kind I2P. |
save_xh5f_field_5D_I1P | pass(self) | Save fields by XH5F file handler, rank 5D, kind I1P. |
Subroutines
initialize
Initialize class.
fortran
subroutine initialize(self, filename, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
filename | character(len=*) | in | File name of parameters file. | |
verbose | logical | in | optional | Trigger verbose output. |
Call graph
load_from_file
Load config from file.
fortran
subroutine load_from_file(self, file_parameters, go_on_fail)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
file_parameters | type(file_ini) | in | Simulation parameters ini file handler. | |
go_on_fail | logical | in | optional | Go on if load fails. |
Call graph
save_energy_error
Save energy error history.
fortran
subroutine save_energy_error(self, it, time, blocks_number, energy_D, energy_B, rms_energy_error_D, rms_energy_error_B, is_to_open, is_to_close)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
it | integer(kind=I4P) | in | Current iteration. | |
time | real(kind=R8P) | in | Current time. | |
blocks_number | integer(kind=I4P) | in | Current number of blocks. | |
energy_D | real(kind=R8P) | in | Energy history of D. | |
energy_B | real(kind=R8P) | in | Energy history of B. | |
rms_energy_error_D | real(kind=R8P) | in | RMS of energy history of D. | |
rms_energy_error_B | real(kind=R8P) | in | RMS of energy history of B. | |
is_to_open | logical | in | optional | Flag to open file before first saving. |
is_to_close | logical | in | optional | Flag to close file after last saving. |
Call graph
save_energy_history
Save energy history.
fortran
subroutine save_energy_history(self, it, time, blocks_number, energy_D, energy_B, coil_power, Poynting_flux, is_to_open, is_to_close)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
it | integer(kind=I4P) | in | Current iteration. | |
time | real(kind=R8P) | in | Current time. | |
blocks_number | integer(kind=I4P) | in | Current number of blocks. | |
energy_D | real(kind=R8P) | in | Energy history of D. | |
energy_B | real(kind=R8P) | in | Energy history of B. | |
coil_power | real(kind=R8P) | in | Coil power history. | |
Poynting_flux | real(kind=R8P) | in | Poynting flux history. | |
is_to_open | logical | in | optional | Flag to open file before first saving. |
is_to_close | logical | in | optional | Flag to close file after last saving. |
Call graph
save_divergence_history
Save energy history.
fortran
subroutine save_divergence_history(self, it, time, blocks_number, div_D, div_B, div_J, is_to_open, is_to_close)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
it | integer(kind=I4P) | in | Current iteration. | |
time | real(kind=R8P) | in | Current time. | |
blocks_number | integer(kind=I4P) | in | Current number of blocks. | |
div_D | real(kind=R8P) | in | Energy history of B. | |
div_B | real(kind=R8P) | in | Coil power history. | |
div_J | real(kind=R8P) | in | Poynting flux history. | |
is_to_open | logical | in | optional | Flag to open file before first saving. |
is_to_close | logical | in | optional | Flag to close file after last saving. |
Call graph
close_file_residuals
Close file for saving residuals history.
fortran
subroutine close_file_residuals(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | in | IO handler. |
Call graph
open_file_residuals
Open file for saving residuals history.
fortran
subroutine open_file_residuals(self, nv)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
nv | integer(kind=I4P) | in | Number of residuals variables. |
Call graph
save_residuals
Save residuals history.
fortran
subroutine save_residuals(self, it, time, blocks_number, residuals)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | in | IO handler. | |
it | integer(kind=I4P) | in | Current iteration. | |
time | real(kind=R8P) | in | Current time. | |
blocks_number | integer(kind=I4P) | in | Current number of blocks. | |
residuals | real(kind=R8P) | in | Residuals (norm) [1:nv]. |
Call graph
save_xh5f_field_4D_R8P
Save q-vector/s-scalar fields by XH5F file handler, rank 4, kind R8P.
fortran
subroutine save_xh5f_field_4D_R8P(self, xh5f, block_name, ijk, nijk, q, q_name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
xh5f | type(xh5f_file_object) | inout | XH5F file handler. | |
block_name | character(len=*) | in | Block name. | |
ijk | integer(kind=I4P) | in | Blocks extents. | |
nijk | integer(kind=I8P) | in | Blocks dimensions. | |
q | real(kind=R8P) | in | Scalar field [ni,nj,nk]. | |
q_name | type(string) | in | Scalar field name. |
Call graph
save_xh5f_field_5D_R8P
Save q-vector/s-scalar fields by XH5F file handler, rank 5, kind R8P.
fortran
subroutine save_xh5f_field_5D_R8P(self, xh5f, block_name, ijk, nijk, q, q_name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
xh5f | type(xh5f_file_object) | inout | XH5F file handler. | |
block_name | character(len=*) | in | Block name. | |
ijk | integer(kind=I4P) | in | Blocks extents. | |
nijk | integer(kind=I8P) | in | Blocks dimensions. | |
q | real(kind=R8P) | in | Vector fields [nv,ni,nj,nk]. | |
q_name | type(string) | in | Vector fields names [nv]. |
Call graph
save_xh5f_field_4D_R4P
Save q-vector/s-scalar fields by XH5F file handler, rank 4, kind R4P.
fortran
subroutine save_xh5f_field_4D_R4P(self, xh5f, block_name, ijk, nijk, q, q_name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
xh5f | type(xh5f_file_object) | inout | XH5F file handler. | |
block_name | character(len=*) | in | Block name. | |
ijk | integer(kind=I4P) | in | Blocks extents. | |
nijk | integer(kind=I8P) | in | Blocks dimensions. | |
q | real(kind=R4P) | in | Scalar field [ni,nj,nk]. | |
q_name | type(string) | in | Scalar field name. |
Call graph
save_xh5f_field_5D_R4P
Save q-vector/s-scalar fields by XH5F file handler, rank 5, kind R4P.
fortran
subroutine save_xh5f_field_5D_R4P(self, xh5f, block_name, ijk, nijk, q, q_name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
xh5f | type(xh5f_file_object) | inout | XH5F file handler. | |
block_name | character(len=*) | in | Block name. | |
ijk | integer(kind=I4P) | in | Blocks extents. | |
nijk | integer(kind=I8P) | in | Blocks dimensions. | |
q | real(kind=R4P) | in | Vector fields [nv,ni,nj,nk]. | |
q_name | type(string) | in | Vector fields names [nv]. |
Call graph
save_xh5f_field_4D_I8P
Save q-vector/s-scalar fields by XH5F file handler, rank 4, kind I8P.
fortran
subroutine save_xh5f_field_4D_I8P(self, xh5f, block_name, ijk, nijk, q, q_name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
xh5f | type(xh5f_file_object) | inout | XH5F file handler. | |
block_name | character(len=*) | in | Block name. | |
ijk | integer(kind=I4P) | in | Blocks extents. | |
nijk | integer(kind=I8P) | in | Blocks dimensions. | |
q | integer(kind=I8P) | in | Scalar field [ni,nj,nk]. | |
q_name | type(string) | in | Scalar field name. |
Call graph
save_xh5f_field_5D_I8P
Save q-vector/s-scalar fields by XH5F file handler, rank 5, kind I8P.
fortran
subroutine save_xh5f_field_5D_I8P(self, xh5f, block_name, ijk, nijk, q, q_name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
xh5f | type(xh5f_file_object) | inout | XH5F file handler. | |
block_name | character(len=*) | in | Block name. | |
ijk | integer(kind=I4P) | in | Blocks extents. | |
nijk | integer(kind=I8P) | in | Blocks dimensions. | |
q | integer(kind=I8P) | in | Vector fields [nv,ni,nj,nk]. | |
q_name | type(string) | in | Vector fields names [nv]. |
Call graph
save_xh5f_field_4D_I4P
Save q-vector/s-scalar fields by XH5F file handler, rank 4, kind I4P.
fortran
subroutine save_xh5f_field_4D_I4P(self, xh5f, block_name, ijk, nijk, q, q_name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
xh5f | type(xh5f_file_object) | inout | XH5F file handler. | |
block_name | character(len=*) | in | Block name. | |
ijk | integer(kind=I4P) | in | Blocks extents. | |
nijk | integer(kind=I8P) | in | Blocks dimensions. | |
q | integer(kind=I4P) | in | Scalar field [ni,nj,nk]. | |
q_name | type(string) | in | Scalar field name. |
Call graph
save_xh5f_field_5D_I4P
Save q-vector/s-scalar fields by XH5F file handler, rank 5, kind I4P.
fortran
subroutine save_xh5f_field_5D_I4P(self, xh5f, block_name, ijk, nijk, q, q_name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
xh5f | type(xh5f_file_object) | inout | XH5F file handler. | |
block_name | character(len=*) | in | Block name. | |
ijk | integer(kind=I4P) | in | Blocks extents. | |
nijk | integer(kind=I8P) | in | Blocks dimensions. | |
q | integer(kind=I4P) | in | Vector fields [nv,ni,nj,nk]. | |
q_name | type(string) | in | Vector fields names [nv]. |
Call graph
save_xh5f_field_4D_I2P
Save q-vector/s-scalar fields by XH5F file handler, rank 4, kind I2P.
fortran
subroutine save_xh5f_field_4D_I2P(self, xh5f, block_name, ijk, nijk, q, q_name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
xh5f | type(xh5f_file_object) | inout | XH5F file handler. | |
block_name | character(len=*) | in | Block name. | |
ijk | integer(kind=I4P) | in | Blocks extents. | |
nijk | integer(kind=I8P) | in | Blocks dimensions. | |
q | integer(kind=I2P) | in | Scalar field [ni,nj,nk]. | |
q_name | type(string) | in | Scalar field name. |
Call graph
save_xh5f_field_5D_I2P
Save q-vector/s-scalar fields by XH5F file handler, rank 5, kind I2P.
fortran
subroutine save_xh5f_field_5D_I2P(self, xh5f, block_name, ijk, nijk, q, q_name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
xh5f | type(xh5f_file_object) | inout | XH5F file handler. | |
block_name | character(len=*) | in | Block name. | |
ijk | integer(kind=I4P) | in | Blocks extents. | |
nijk | integer(kind=I8P) | in | Blocks dimensions. | |
q | integer(kind=I2P) | in | Vector fields [nv,ni,nj,nk]. | |
q_name | type(string) | in | Vector fields names [nv]. |
Call graph
save_xh5f_field_4D_I1P
Save q-vector/s-scalar fields by XH5F file handler, rank 4, kind I1P.
fortran
subroutine save_xh5f_field_4D_I1P(self, xh5f, block_name, ijk, nijk, q, q_name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
xh5f | type(xh5f_file_object) | inout | XH5F file handler. | |
block_name | character(len=*) | in | Block name. | |
ijk | integer(kind=I4P) | in | Blocks extents. | |
nijk | integer(kind=I8P) | in | Blocks dimensions. | |
q | integer(kind=I1P) | in | Scalar field [ni,nj,nk]. | |
q_name | type(string) | in | Scalar field name. |
Call graph
save_xh5f_field_5D_I1P
Save q-vector/s-scalar fields by XH5F file handler, rank 5, kind I1P.
fortran
subroutine save_xh5f_field_5D_I1P(self, xh5f, block_name, ijk, nijk, q, q_name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | inout | IO handler. | |
xh5f | type(xh5f_file_object) | inout | XH5F file handler. | |
block_name | character(len=*) | in | Block name. | |
ijk | integer(kind=I4P) | in | Blocks extents. | |
nijk | integer(kind=I8P) | in | Blocks dimensions. | |
q | integer(kind=I1P) | in | Vector fields [nv,ni,nj,nk]. | |
q_name | type(string) | in | Vector fields names [nv]. |
Call graph
Functions
description
Return a pretty-formatted object description.
Attributes: pure
Returns: character(len=:)
fortran
function description(self) result(desc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(io_object) | in | IO handler. |
Call graph