Defines a v3fit_context_class object to contain all the memory for running v3fit. Contains methods to write memory to disk.
More...
Defines a v3fit_context_class object to contain all the memory for running v3fit. Contains methods to write memory to disk.
◆ v3fit_context_close_files()
subroutine v3fit_context::v3fit_context_close_files |
( |
class (v3fit_context_class), intent(inout) |
this | ) |
|
Close output files.
Closes output files that reconstructed results are written to.
- Parameters
-
◆ v3fit_context_construct()
type (v3fit_context_class) function, pointer v3fit_context::v3fit_context_construct |
( |
type (commandline_parser_class), pointer |
cl_parser | ) |
|
Construct a v3fit_context_class object.
Allocates memory and initializes a v3fit_context_class object with an instance of a commandline_parser object. This opens files for the recout, runlog, and result files. Over allocates space for the number of signals.
- Parameters
-
[in] | cl_parser | An instance of a commandline parser object. |
- Returns
- A pointer to a constructed v3fit_context_class object.
◆ v3fit_context_create_files()
subroutine v3fit_context::v3fit_context_create_files |
( |
class (v3fit_context_class), intent(inout) |
this | ) |
|
Create output files.
Creates output files that reconstructed results are written to.
- Parameters
-
◆ v3fit_context_destruct()
subroutine v3fit_context::v3fit_context_destruct |
( |
type (v3fit_context_class), intent(inout) |
this | ) |
|
◆ v3fit_context_get_eq_comm()
integer function v3fit_context::v3fit_context_get_eq_comm |
( |
class (v3fit_context_class), intent(inout) |
this | ) |
|
Get the mpi comm for the equilibrium.
- Parameters
-
- Returns
- The equilibrium comm.
◆ v3fit_context_get_eq_rank()
integer function v3fit_context::v3fit_context_get_eq_rank |
( |
class (v3fit_context_class), intent(inout) |
this | ) |
|
Get the mpi rank for the equilibrium.
- Parameters
-
- Returns
- The rank of the equilibrium comm.
◆ v3fit_context_get_recon_comm()
integer function v3fit_context::v3fit_context_get_recon_comm |
( |
class (v3fit_context_class), intent(inout) |
this | ) |
|
Get the mpi comm for the reconstruction.
- Parameters
-
- Returns
- The equilibrium comm.
◆ v3fit_context_get_recon_rank()
integer function v3fit_context::v3fit_context_get_recon_rank |
( |
class (v3fit_context_class), intent(inout) |
this | ) |
|
Get the mpi rank for the reconstruction.
- Parameters
-
- Returns
- The rank of the equilibrium comm.
◆ v3fit_context_init_data()
subroutine v3fit_context::v3fit_context_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.
- Parameters
-
[in,out] | this | A v3fit_context_class instance. |
[in] | eq_steps | Number of steps taken by the equilibrium. |
◆ v3fit_context_resize()
subroutine v3fit_context::v3fit_context_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.
- Parameters
-
◆ v3fit_context_restart()
integer function v3fit_context::v3fit_context_restart |
( |
class (v3fit_context_class), intent(inout) |
this, |
|
|
integer, intent(inout) |
current_step |
|
) |
| |
Restart the reconstruction.
Reloads a reconstruction from the result file.
- Parameters
-
[in,out] | this | A v3fit_context_class instance. |
[in,out] | current_step | Reconstruction step left off from. |
- Returns
- The current step.
◆ v3fit_context_write()
subroutine v3fit_context::v3fit_context_write |
( |
class (v3fit_context_class), intent(inout) |
this | ) |
|
◆ v3fit_context_write_param_header()
subroutine v3fit_context::v3fit_context_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.
- Parameters
-
[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. |
- Note
- The 'this' parameter is intent(inout) because signal::signal_write calls signal::signal_get_g2 which needs to be intent(inout). @node The 'prefix' parameter must be an exact length string with all white space predefined.
◆ v3fit_context_write_step_data()
subroutine v3fit_context::v3fit_context_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.
- Parameters
-
[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. |
- Note
- The only caller of this subrotine that should set first_step to true should be v3fit_context_init_data. All others should callers should set first_step to false.