Skip to content

adam_prism_io_object ​

ADAM, Maxwell IO handler class definition, CPU backend.

Source: src/app/prism/common/adam_prism_io_object.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
INI_SECTION_NAMEcharacter(len=2)parameterINI (config) file section name containing IO configs.

Derived Types ​

prism_io_object ​

PRISM IO handler class definition, CPU backend.

Components ​

NameTypeAttributesDescription
file_parameterstype(file_ini)Prism input file handler.
it_saveinteger(kind=I4P)Main output iteration save frequency.
output_basenamecharacter(len=:)allocatableBasename of output files.
restartlogicalEnable restart from old output data.
restart_basenamecharacter(len=:)allocatableBasename of restart files.
restart_saveinteger(kind=I4P)Restart output iteration save frequency.
save_memory_statuslogicalEnable save of memory status during allocations.
residuals_saveinteger(kind=I4P)Residuals (norm) output iteration save frequency.
residuals_unitinteger(kind=I4P)Residuals file unit.
energy_error_saveinteger(kind=I4P)Energy error output iteration save frequency.
energy_error_unitinteger(kind=I4P)Energy error hystory file unit.
energy_history_saveinteger(kind=I4P)Energy history output iteration save frequency.
energy_history_unitinteger(kind=I4P)Energy history file unit.
divergence_history_saveinteger(kind=I4P)Divergence history output iteration save frequency.
divergence_history_unitinteger(kind=I4P)Divergence history file unit.
charge_conservation_history_unitinteger(kind=I4P)
save_residual_fieldslogicalFlag to activate residual fields saving.
save_curl_fieldslogicalFlag to activate curl fields saving.
save_divergence_fieldslogicalFlag to activate divergence fields saving.
save_gradient_fieldslogicalFlag to activate gradient fields saving.
save_laplacian_fieldslogicalFlag to activate gradient fields saving.

Type-Bound Procedures ​

NameAttributesDescription
descriptionpass(self)Return pretty-printed object description.
initializepass(self)Initialize time handler.
load_from_filepass(self)Load config from file.
save_energy_errorpass(self)Save energy error history.
save_energy_historypass(self)Save energy history.
save_divergence_historypass(self)Save divergence history.
save_charge_conservation_historypass(self)
close_file_residualspass(self)Close file for saving residuals history.
open_file_residualspass(self)Open file for saving residuals history.
save_residualspass(self)Save residuals history.

Subroutines ​

initialize ​

Initialize IO handler.

fortran
subroutine initialize(self, filename)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_io_object)inoutIO handler.
filenamecharacter(len=*)inFile name of parameters file.

Call graph

load_from_file ​

Load config from file.

fortran
subroutine load_from_file(self, file_parameters, go_on_fail)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_io_object)inoutIO handler.
file_parameterstype(file_ini)inSimulation parameters ini file handler.
go_on_faillogicalinoptionalGo 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

NameTypeIntentAttributesDescription
selfclass(prism_io_object)inoutIO handler.
itinteger(kind=I4P)inCurrent iteration.
timereal(kind=R8P)inCurrent time.
blocks_numberinteger(kind=I4P)inCurrent number of blocks.
energy_Dreal(kind=R8P)inEnergy history of D.
energy_Breal(kind=R8P)inEnergy history of B.
rms_energy_error_Dreal(kind=R8P)inRMS of energy history of D.
rms_energy_error_Breal(kind=R8P)inRMS of energy history of B.
is_to_openlogicalinoptionalFlag to open file before first saving.
is_to_closelogicalinoptionalFlag 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

NameTypeIntentAttributesDescription
selfclass(prism_io_object)inoutIO handler.
itinteger(kind=I4P)inCurrent iteration.
timereal(kind=R8P)inCurrent time.
blocks_numberinteger(kind=I4P)inCurrent number of blocks.
energy_Dreal(kind=R8P)inEnergy history of D.
energy_Breal(kind=R8P)inEnergy history of B.
coil_powerreal(kind=R8P)inCoil power history.
Poynting_fluxreal(kind=R8P)inPoynting flux history.
is_to_openlogicalinoptionalFlag to open file before first saving.
is_to_closelogicalinoptionalFlag to close file after last saving.

Call graph

save_charge_conservation_history ​

Save PIC charge-conservation diagnostic history.

fortran
subroutine save_charge_conservation_history(self, time, Q_particles, Q_deposited, Q_deposition_error, R_cont_L1, R_cont_L2, R_cont_Linf, dQ_num_net, dQ_num_abs, Gauss_L1, Gauss_L2, Gauss_Linf, is_to_open, is_to_close, do_write)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_io_object)inoutIO handler.
timereal(kind=R8P)inPhysical time.
Q_particlesreal(kind=R8P)inTotal particle charge.
Q_depositedreal(kind=R8P)inTotal grid-deposited charge.
Q_deposition_errorreal(kind=R8P)inDeposited-particle charge mismatch.
R_cont_L1real(kind=R8P)inContinuity residual L1 mean.
R_cont_L2real(kind=R8P)inContinuity residual L2 RMS.
R_cont_Linfreal(kind=R8P)inContinuity residual Linf.
dQ_num_netreal(kind=R8P)inNet numerical charge equivalent.
dQ_num_absreal(kind=R8P)inAbsolute numerical charge equivalent.
Gauss_L1real(kind=R8P)inGauss-law residual L1 mean.
Gauss_L2real(kind=R8P)inGauss-law residual L2 RMS.
Gauss_Linfreal(kind=R8P)inGauss-law residual Linf.
is_to_openlogicalinoptionalFlag to open file before first saving.
is_to_closelogicalinoptionalFlag to close file after last saving.
do_writelogicalinoptionalFlag to write a data row.

Call graph

save_divergence_history ​

Save energy history.

fortran
subroutine save_divergence_history(self, it, time, blocks_number, div_D, div_B, div_J, div_D_name, div_J_name, current_solver_residual, is_to_open, is_to_close)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_io_object)inoutIO handler.
itinteger(kind=I4P)inCurrent iteration.
timereal(kind=R8P)inCurrent time.
blocks_numberinteger(kind=I4P)inCurrent number of blocks.
div_Dreal(kind=R8P)inEnergy history of B.
div_Breal(kind=R8P)inCoil power history.
div_Jreal(kind=R8P)inPoynting flux history.
div_D_namecharacter(len=*)inoptionalHeader label for div(D) monitor.
div_J_namecharacter(len=*)inoptionalHeader label for the third monitor.
current_solver_residualreal(kind=R8P)inoptionalCurrent linear-solve residual diagnostic.
is_to_openlogicalinoptionalFlag to open file before first saving.
is_to_closelogicalinoptionalFlag to close file after last saving.

Call graph

close_file_residuals ​

Close file for saving residuals history.

fortran
subroutine close_file_residuals(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_io_object)inIO handler.

Call graph

open_file_residuals ​

Open file for saving residuals history.

fortran
subroutine open_file_residuals(self, nv)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_io_object)inoutIO handler.
nvinteger(kind=I4P)inNumber of residuals variables.

Call graph

save_residuals ​

Save residuals history.

fortran
subroutine save_residuals(self, it, time, blocks_number, residuals)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_io_object)inIO handler.
itinteger(kind=I4P)inCurrent iteration.
timereal(kind=R8P)inCurrent time.
blocks_numberinteger(kind=I4P)inCurrent number of blocks.
residualsreal(kind=R8P)inResiduals (norm) [1:nv].

Call graph

Functions ​

description ​

Return a pretty-formatted object description.

Attributes: pure

Returns: character(len=:)

fortran
function description(self) result(desc)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_io_object)inIO handler.

Call graph