![]() |
Octopus
|
This module contains the definition of the data type that holds a "control function" used for OCT runs. More...
This module contains the definition of the data type that holds a "control function" used for OCT runs.
In addition, the module also contains the necessary procedures to manipulate these objects.
Data Types | |
| type | controlfunction_common_t |
| This data type contains information that is filled when the module is initialized ("controlfunction_mod_init"), and stored while the module is in use (until "controlfunction_mod_close" is called). It is information more or less common to all control functions. More... | |
| type | controlfunction_t |
| This is the data type used to hold a control function. More... | |
Functions/Subroutines | |
| subroutine, public | controlfunction_mod_init (ext_partners, namespace, dt, max_iter, mode_fixed_fluence) |
| Initializes the module, should be the first subroutine to be called (the last one should be controlfunction_mod_close, when the module is no longer to be used). More... | |
| subroutine, public | controlfunction_init (cp, dt, ntiter) |
| Before using an controlfunction_t variable, it needs to be initialized, either by calling controlfunction_init, or by copying another initialized variable through controlfunction_copy. More... | |
| subroutine, public | controlfunction_set (cp, ext_partners) |
| The external fields defined in epot_t "ep" are transferred to the control functions described in "cp". This should have been initialized previously. More... | |
| integer pure function, public | controlfunction_representation () |
| Returns the representation type for the control functions used in the OCT run. More... | |
| integer pure function, public | controlfunction_mode () |
| Returns the "mode" of the control function, i.e. if it is the full pulse, the envelope, or the phase. More... | |
| subroutine, public | controlfunction_prepare_initial (par) |
| "Prepares" the initial guess control field: maybe it has to be normalized to a certain fluence, maybe it should be randomized, etc. More... | |
| subroutine, public | controlfunction_set_rep (par) |
| Transforms the control function to frequency space, if this is the space in which the functions are defined (and it is necessary to perform the transformation). And, transforms the control function to real-time space, if this is the space in which the functions are defined (and it is necessary to perform the transformation). More... | |
| subroutine, public | controlfunction_to_basis (par) |
| subroutine, public | controlfunction_to_realtime (par) |
| real(real64) function, public | controlfunction_diff (pp, qq) |
| subroutine, public | controlfunction_apply_envelope (cp) |
| subroutine, public | controlfunction_to_h (cp, ext_partners) |
| subroutine, public | controlfunction_to_h_val (cp, ext_partners, val) |
| subroutine, public | controlfunction_end (cp) |
| subroutine, public | controlfunction_write (filename, cp, namespace) |
| real(real64) function, public | controlfunction_fluence (par) |
| real(real64) function, public | controlfunction_j2 (par) |
| subroutine, public | controlfunction_set_fluence (par) |
| subroutine, public | controlfunction_set_alpha (par, alpha) |
| subroutine, public | controlfunction_copy (cp_out, cp_in) |
| subroutine, public | controlfunction_randomize (par) |
| subroutine, public | controlfunction_update (cp, cpp, dir, iter, mu, dd, dq) |
| Update the control function(s) given in "cp", according to the formula cp = (1 - mu) * cpp + mu * dd / (td_penalty - 2 * dq) More... | |
| real(real64) pure function, public | controlfunction_alpha (par, ipar) |
| real(real64) pure function, public | controlfunction_targetfluence () |
| integer pure function, public | controlfunction_number (par) |
| subroutine, public | controlfunction_bounds (par, lower_bounds, upper_bounds) |
| integer pure function, public | controlfunction_dof (par) |
| real(real64) pure function, public | controlfunction_w0 (par) |
| subroutine, public | controlfunction_filter (par, filter) |
| subroutine, public | controlfunction_mod_close () |
| subroutine | controlfunction_deltaedeltau (par, dedu) |
| subroutine | controlfunction_der (par, depsilon, i) |
| controlfunction_der computes the derivative of a controlfunction with respect to one of its degrees of freedom. More... | |
| subroutine, public | controlfunction_gradient (par, par_output, grad) |
| controlfunction_gradient computes the (minus the) gradient of the J functional with respect to the parameters. More... | |
| subroutine | controlfunction_basis_to_theta (par) |
| subroutine | controlfunction_theta_to_basis (par) |
| subroutine, public | controlfunction_get_theta (par, theta) |
| subroutine, public | controlfunction_set_theta (par, theta) |
| subroutine | controlfunction_trans_matrix (par) |
Variables | |
| integer, parameter, public | ctr_internal = 1 |
| integer, parameter, public | ctr_fourier_series_h = 3 |
| integer, parameter, public | ctr_zero_fourier_series_h = 4 |
| integer, parameter, public | ctr_fourier_series = 5 |
| integer, parameter, public | ctr_zero_fourier_series = 6 |
| integer, parameter, public | ctr_rt = 7 |
| integer, parameter, public | controlfunction_mode_none = 0 |
| integer, parameter, public | controlfunction_mode_epsilon = 1 |
| integer, parameter, public | controlfunction_mode_f = 2 |
| logical | cf_common_initialized = .false. |
| type(controlfunction_common_t) | cf_common |
| subroutine, public controlfunction_oct_m::controlfunction_mod_init | ( | type(partner_list_t), intent(in) | ext_partners, |
| type(namespace_t), intent(in) | namespace, | ||
| real(real64), intent(in) | dt, | ||
| integer, intent(in) | max_iter, | ||
| logical, intent(out) | mode_fixed_fluence | ||
| ) |
Initializes the module, should be the first subroutine to be called (the last one should be controlfunction_mod_close, when the module is no longer to be used).
It fills the module variable "cf_common", whose type is controlfunction_common_t, with information obtained from the inp file.
Output argument "mode_fixed_fluence" is also given a value, depending on whether the user requires a fixed-fluence run (.true.) or not (.false.).
Definition at line 245 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_init | ( | type(controlfunction_t), intent(inout) | cp, |
| real(real64), intent(in) | dt, | ||
| integer, intent(in) | ntiter | ||
| ) |
Before using an controlfunction_t variable, it needs to be initialized, either by calling controlfunction_init, or by copying another initialized variable through controlfunction_copy.
Definition at line 589 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_set | ( | type(controlfunction_t), intent(inout) | cp, |
| type(partner_list_t), intent(in) | ext_partners | ||
| ) |
The external fields defined in epot_t "ep" are transferred to the control functions described in "cp". This should have been initialized previously.
Definition at line 691 of file controlfunction.F90.
| integer pure function, public controlfunction_oct_m::controlfunction_representation |
Returns the representation type for the control functions used in the OCT run.
Definition at line 717 of file controlfunction.F90.
| integer pure function, public controlfunction_oct_m::controlfunction_mode |
Returns the "mode" of the control function, i.e. if it is the full pulse, the envelope, or the phase.
Definition at line 725 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_prepare_initial | ( | type(controlfunction_t), intent(inout) | par | ) |
"Prepares" the initial guess control field: maybe it has to be normalized to a certain fluence, maybe it should be randomized, etc.
Definition at line 733 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_set_rep | ( | type(controlfunction_t), intent(inout) | par | ) |
Transforms the control function to frequency space, if this is the space in which the functions are defined (and it is necessary to perform the transformation). And, transforms the control function to real-time space, if this is the space in which the functions are defined (and it is necessary to perform the transformation).
Definition at line 768 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_to_basis | ( | type(controlfunction_t), intent(inout) | par | ) |
Definition at line 787 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_to_realtime | ( | type(controlfunction_t), intent(inout) | par | ) |
Definition at line 832 of file controlfunction.F90.
| real(real64) function, public controlfunction_oct_m::controlfunction_diff | ( | type(controlfunction_t), intent(in) | pp, |
| type(controlfunction_t), intent(in) | |||
| ) |
Definition at line 874 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_apply_envelope | ( | type(controlfunction_t), intent(inout) | cp | ) |
Definition at line 894 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_to_h | ( | type(controlfunction_t), intent(in) | cp, |
| type(partner_list_t), intent(in) | ext_partners | ||
| ) |
Definition at line 917 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_to_h_val | ( | type(controlfunction_t), intent(in) | cp, |
| type(partner_list_t), intent(in) | ext_partners, | ||
| integer, intent(in) | val | ||
| ) |
Definition at line 948 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_end | ( | type(controlfunction_t), intent(inout) | cp | ) |
Definition at line 971 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_write | ( | character(len=*), intent(in) | filename, |
| type(controlfunction_t), intent(in) | cp, | ||
| type(namespace_t), intent(in) | namespace | ||
| ) |
Definition at line 995 of file controlfunction.F90.
| real(real64) function, public controlfunction_oct_m::controlfunction_fluence | ( | type(controlfunction_t), intent(in) | par | ) |
Definition at line 1149 of file controlfunction.F90.
| real(real64) function, public controlfunction_oct_m::controlfunction_j2 | ( | type(controlfunction_t), intent(in) | par | ) |
Definition at line 1186 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_set_fluence | ( | type(controlfunction_t), intent(inout) | par | ) |
Definition at line 1239 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_set_alpha | ( | type(controlfunction_t), intent(inout) | par, |
| real(real64), intent(in) | alpha | ||
| ) |
Definition at line 1259 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_copy | ( | type(controlfunction_t), intent(inout) | cp_out, |
| type(controlfunction_t), intent(in) | cp_in | ||
| ) |
Definition at line 1274 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_randomize | ( | type(controlfunction_t), intent(inout) | par | ) |
Definition at line 1309 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_update | ( | type(controlfunction_t), intent(inout) | cp, |
| type(controlfunction_t), intent(in) | cpp, | ||
| character(len=1), intent(in) | dir, | ||
| integer, intent(in) | iter, | ||
| real(real64), intent(in) | mu, | ||
| real(real64), dimension(:), intent(in), contiguous | dd, | ||
| complex(real64), dimension(:), intent(in), contiguous | dq | ||
| ) |
Update the control function(s) given in "cp", according to the formula cp = (1 - mu) * cpp + mu * dd / (td_penalty - 2 * dq)
Definition at line 1333 of file controlfunction.F90.
| real(real64) pure function, public controlfunction_oct_m::controlfunction_alpha | ( | type(controlfunction_t), intent(in) | par, |
| integer, intent(in) | ipar | ||
| ) |
Definition at line 1373 of file controlfunction.F90.
| real(real64) pure function, public controlfunction_oct_m::controlfunction_targetfluence |
Definition at line 1382 of file controlfunction.F90.
| integer pure function, public controlfunction_oct_m::controlfunction_number | ( | type(controlfunction_t), intent(in) | par | ) |
Definition at line 1389 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_bounds | ( | type(controlfunction_t), intent(in) | par, |
| real(real64), dimension(:), intent(out), contiguous | lower_bounds, | ||
| real(real64), dimension(:), intent(out), contiguous | upper_bounds | ||
| ) |
Definition at line 1397 of file controlfunction.F90.
| integer pure function, public controlfunction_oct_m::controlfunction_dof | ( | type(controlfunction_t), intent(in) | par | ) |
Definition at line 1420 of file controlfunction.F90.
| real(real64) pure function, public controlfunction_oct_m::controlfunction_w0 | ( | type(controlfunction_t), intent(in) | par | ) |
Definition at line 1428 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_filter | ( | type(controlfunction_t), intent(inout) | par, |
| type(filter_t), intent(inout) | filter | ||
| ) |
Definition at line 1436 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_mod_close |
Definition at line 1458 of file controlfunction.F90.
|
private |
| [in,out] | dedu | (1:dof, 1:dim) |
Definition at line 1483 of file controlfunction.F90.
|
private |
controlfunction_der computes the derivative of a controlfunction with respect to one of its degrees of freedom.
Definition at line 1544 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_gradient | ( | type(controlfunction_t), intent(in) | par, |
| type(controlfunction_t), intent(in) | par_output, | ||
| real(real64), dimension(:), intent(inout), contiguous | grad | ||
| ) |
controlfunction_gradient computes the (minus the) gradient of the J functional with respect to the parameters.
Definition at line 1566 of file controlfunction.F90.
|
private |
Definition at line 1625 of file controlfunction.F90.
|
private |
Definition at line 1712 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_get_theta | ( | type(controlfunction_t), intent(in) | par, |
| real(real64), dimension(:), intent(out), contiguous | theta | ||
| ) |
Definition at line 1802 of file controlfunction.F90.
| subroutine, public controlfunction_oct_m::controlfunction_set_theta | ( | type(controlfunction_t), intent(inout) | par, |
| real(real64), dimension(:), intent(in), contiguous | theta | ||
| ) |
Definition at line 1815 of file controlfunction.F90.
|
private |
Definition at line 1828 of file controlfunction.F90.
| integer, parameter, public controlfunction_oct_m::ctr_internal = 1 |
Definition at line 159 of file controlfunction.F90.
| integer, parameter, public controlfunction_oct_m::ctr_fourier_series_h = 3 |
Definition at line 159 of file controlfunction.F90.
| integer, parameter, public controlfunction_oct_m::ctr_zero_fourier_series_h = 4 |
Definition at line 159 of file controlfunction.F90.
| integer, parameter, public controlfunction_oct_m::ctr_fourier_series = 5 |
Definition at line 159 of file controlfunction.F90.
| integer, parameter, public controlfunction_oct_m::ctr_zero_fourier_series = 6 |
Definition at line 159 of file controlfunction.F90.
| integer, parameter, public controlfunction_oct_m::ctr_rt = 7 |
Definition at line 159 of file controlfunction.F90.
| integer, parameter, public controlfunction_oct_m::controlfunction_mode_none = 0 |
Definition at line 169 of file controlfunction.F90.
| integer, parameter, public controlfunction_oct_m::controlfunction_mode_epsilon = 1 |
Definition at line 169 of file controlfunction.F90.
| integer, parameter, public controlfunction_oct_m::controlfunction_mode_f = 2 |
Definition at line 169 of file controlfunction.F90.
|
private |
Definition at line 232 of file controlfunction.F90.
|
private |
Definition at line 233 of file controlfunction.F90.