![]() |
Stellarator-Tools
|
Base class representing a v3fit context. This contains all memory needed to operate v3fit. More...
Public Member Functions | |
FINAL | v3fit_context_destruct (this) |
Deconstruct a v3fit_context_class object. | |
procedure | resize (this) |
Resize the arrays. | |
procedure | create_files (this) |
Create output files. | |
procedure | close_files (this) |
Close output files. | |
procedure | write (this) |
Write the v3fit_context_class out to disk. | |
procedure | write_param_header (this, params, prefix, type_name) |
Write the param_class::correlation header out to disk. | |
procedure | init_data (this, eq_steps) |
Initialize the dimensions and variables of the result file. | |
procedure | write_step_data (this, first_step, eq_steps) |
Write step data to the defined variables. | |
procedure | restart (this, current_step) |
Restart the reconstruction. | |
procedure | get_eq_comm (this) |
Get the mpi comm for the equilibrium. | |
procedure | get_eq_rank (this) |
Get the mpi rank for the equilibrium. | |
procedure | get_recon_comm (this) |
Get the mpi comm for the reconstruction. | |
procedure | get_recon_rank (this) |
Get the mpi rank for the reconstruction. | |
Public Attributes | |
real(rprec) | recon_stop |
Stopping criteria for change in g^2. | |
integer | runlog_iou |
File input output unit for the runlog file. This file is a human readable output history of a v3fit run. | |
integer | recout_iou |
File input output unit for the recout file. This file is a human readable output of the final result. | |
class(commandline_parser_class), pointer | cl_parser => null() |
The parsed command line options. | |
class(model_class), pointer | model => null() |
The equilibrium model. | |
type(gaussp_class_pointer), dimension(:), pointer | gp => null() |
Guassian process models. | |
type(signal_pointer), dimension(:), pointer | signals => null() |
Array of signals. | |
type(param_pointer), dimension(:), pointer | derived_params => null() |
Array of derived parameters. | |
type(param_pointer), dimension(:), pointer | params => null() |
Arrays of reconstruction parameters. | |
type(param_pointer), dimension(:), pointer | locks => null() |
Array of locking parameters. | |
class(reconstruction_class), pointer | recon => null() |
The reconstruction algorithm object. | |
integer | magnetic_index = -1 |
Index of the first instance of a magnetic signal. The default -1 represents no magnetic signal created. | |
integer | sxrem_index = -1 |
Index of the first instance of a sxrem signal. The default -1 represents no sxrem signal created. | |
integer | intpol_index = -1 |
Index of the first instance of a intpol signal. The default -1 represents no intpol signal created. | |
integer | thomson_index = -1 |
Index of the first instance of a thomson signal. The default -1 represents no thomson signal created. | |
integer | extcurz_index = -1 |
Index of the first instance of a extcurz signal. The default -1 represents no extcurz signal created. | |
integer | mse_index = -1 |
Index of the first instance of a mse signal. The default -1 represents no mse signal created. | |
integer | ece_index = -1 |
Index of the first instance of a ece signal. The default -1 represents no ece signal created. | |
integer | limiter_index = -1 |
Index of the first instance of a limiter signal. The default -1 represents no limiter signal created. | |
integer | prior_gaussian_index = -1 |
Index of the first instance of a prior_gaussian signal. The default -1 represents no prior_gaussian signal created. | |
integer | sxrem_ratio_index = -1 |
Index of the first instance of a prior_gaussian signal. The default -1 represents no prior_gaussian signal created. | |
integer | combination_index = -1 |
Index of the first instance of a combination_class signal. The default -1 represents no combination_class signal created. | |
integer | result_ncid |
NetCDF result file to write out the results in machine readable form. | |
integer | global_comm = MPI_COMM_NULL |
MPI communicator reference for full domain. | |
integer | equilibrium_comm = MPI_COMM_NULL |
MPI communicator reference for the equilibrium domain. | |
integer | reconstruction_comm = MPI_COMM_NULL |
MPI communicator reference for the reconstruction domain. | |
Base class representing a v3fit context. This contains all memory needed to operate v3fit.
procedure v3fit_context::v3fit_context_class::close_files | ( | class (v3fit_context_class), intent(inout) | this | ) |
Close output files.
Closes output files that reconstructed results are written to.
[in,out] | this | A v3fit_context_class instance. |
procedure v3fit_context::v3fit_context_class::create_files | ( | class (v3fit_context_class), intent(inout) | this | ) |
Create output files.
Creates output files that reconstructed results are written to.
[in,out] | this | A v3fit_context_class instance. |
procedure v3fit_context::v3fit_context_class::get_eq_comm | ( | class (v3fit_context_class), intent(inout) | this | ) |
Get the mpi comm for the equilibrium.
[in,out] | this | A v3fit_context_class instance. |
procedure v3fit_context::v3fit_context_class::get_eq_rank | ( | class (v3fit_context_class), intent(inout) | this | ) |
Get the mpi rank for the equilibrium.
[in,out] | this | A v3fit_context_class instance. |
procedure v3fit_context::v3fit_context_class::get_recon_comm | ( | class (v3fit_context_class), intent(inout) | this | ) |
Get the mpi comm for the reconstruction.
[in,out] | this | A v3fit_context_class instance. |
procedure v3fit_context::v3fit_context_class::get_recon_rank | ( | class (v3fit_context_class), intent(inout) | this | ) |
Get the mpi rank for the reconstruction.
[in,out] | this | A v3fit_context_class instance. |
procedure v3fit_context::v3fit_context_class::init_data | ( | class (v3fit_context_class), intent(inout) | this, |
integer, intent(in) | eq_steps | ||
) |
Initialize the dimensions and variables of the result file.
Defines dimensions, variables and writes out the initial step of v3fit to result netcdf file. Multi dimensional arrays need to be transposed so arrays appear in the correct order in non fortran languages.
[in,out] | this | A v3fit_context_class instance. |
[in] | eq_steps | Number of steps taken by the equilibrium. |
procedure v3fit_context::v3fit_context_class::resize | ( | class (v3fit_context_class), intent(inout) | this | ) |
Resize the arrays.
Resizes the signal arrays to contain only the minimun necessary to hold all signals. If no signals were constructed, the signal array is not allocated.
[in,out] | this | A v3fit_context_class instance. |
procedure v3fit_context::v3fit_context_class::restart | ( | class (v3fit_context_class), intent(inout) | this, |
integer, intent(inout) | current_step | ||
) |
Restart the reconstruction.
Reloads a reconstruction from the result file.
[in,out] | this | A v3fit_context_class instance. |
[in,out] | current_step | Reconstruction step left off from. |
|
final |
Deconstruct a v3fit_context_class object.
Deallocates memory and uninitializes a v3fit_context_class object. This all the v3fit constructed objects are destroyed here.
[in,out] | this | A v3fit_context_class instance. |
procedure v3fit_context::v3fit_context_class::write | ( | class (v3fit_context_class), intent(inout) | this | ) |
Write the v3fit_context_class out to disk.
Writes out the results of v3fit to the recout file.
[in,out] | this | A v3fit_context_class instance. |
procedure v3fit_context::v3fit_context_class::write_param_header | ( | class (v3fit_context_class), intent(inout) | this, |
type (param_pointer), dimension(:) | params, | ||
character (len=*) | prefix, | ||
character (len=*) | type_name | ||
) |
Write the param_class::correlation header out to disk.
Writes out the results of header for a correlation matric. This header is formatted by a an inital col left blank followed by eack parameter name spaced 14 spaced apart from each other.
[in,out] | this | A v3fit_context_class instance. |
[in] | params | Array of parameter objects. |
[in] | prefix | Prefix string to format the header. |
[in] | type_name | Type name of the parameters. |
procedure v3fit_context::v3fit_context_class::write_step_data | ( | class (v3fit_context_class), intent(inout) | this, |
logical, intent(in) | first_step, | ||
integer, intent(in) | eq_steps | ||
) |
Write step data to the defined variables.
Writes out the data for a reconstruction step to the result file. If this is being called for the first time. Do not read the number of steps.
[in,out] | this | A v3fit_context_class instance. |
[in] | first_step | Flags to determine if this is the first instance this has been called. |
[in] | eq_steps | Number of steps the equilibrium took. |
type (param_pointer), dimension(:), pointer v3fit_context::v3fit_context_class::derived_params => null() |
Array of derived parameters.
type (param_pointer), dimension(:), pointer v3fit_context::v3fit_context_class::params => null() |
Arrays of reconstruction parameters.
type (signal_pointer), dimension(:), pointer v3fit_context::v3fit_context_class::signals => null() |
Array of signals.