Octopus
controlfunction.F90 File Reference

Go to the source code of this file.

Modules

module  controlfunction_oct_m
 This module contains the definition of the data type that holds a "control function" used for OCT runs.
 

Data Types

type  controlfunction_oct_m::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_oct_m::controlfunction_t
 This is the data type used to hold a control function. More...
 

Functions/Subroutines

subroutine, public controlfunction_oct_m::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_oct_m::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_oct_m::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_oct_m::controlfunction_representation ()
 Returns the representation type for the control functions used in the OCT run. More...
 
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. More...
 
subroutine, public controlfunction_oct_m::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_oct_m::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_oct_m::controlfunction_to_basis (par)
 
subroutine, public controlfunction_oct_m::controlfunction_to_realtime (par)
 
real(real64) function, public controlfunction_oct_m::controlfunction_diff (pp, qq)
 
subroutine, public controlfunction_oct_m::controlfunction_apply_envelope (cp)
 
subroutine, public controlfunction_oct_m::controlfunction_to_h (cp, ext_partners)
 
subroutine, public controlfunction_oct_m::controlfunction_to_h_val (cp, ext_partners, val)
 
subroutine, public controlfunction_oct_m::controlfunction_end (cp)
 
subroutine, public controlfunction_oct_m::controlfunction_write (filename, cp, namespace)
 
real(real64) function, public controlfunction_oct_m::controlfunction_fluence (par)
 
real(real64) function, public controlfunction_oct_m::controlfunction_j2 (par)
 
subroutine, public controlfunction_oct_m::controlfunction_set_fluence (par)
 
subroutine, public controlfunction_oct_m::controlfunction_set_alpha (par, alpha)
 
subroutine, public controlfunction_oct_m::controlfunction_copy (cp_out, cp_in)
 
subroutine, public controlfunction_oct_m::controlfunction_randomize (par)
 
subroutine, public controlfunction_oct_m::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_oct_m::controlfunction_alpha (par, ipar)
 
real(real64) pure function, public controlfunction_oct_m::controlfunction_targetfluence ()
 
integer pure function, public controlfunction_oct_m::controlfunction_number (par)
 
subroutine, public controlfunction_oct_m::controlfunction_bounds (par, lower_bounds, upper_bounds)
 
integer pure function, public controlfunction_oct_m::controlfunction_dof (par)
 
real(real64) pure function, public controlfunction_oct_m::controlfunction_w0 (par)
 
subroutine, public controlfunction_oct_m::controlfunction_filter (par, filter)
 
subroutine, public controlfunction_oct_m::controlfunction_mod_close ()
 
subroutine controlfunction_oct_m::controlfunction_deltaedeltau (par, dedu)
 
subroutine controlfunction_oct_m::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_oct_m::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_oct_m::controlfunction_basis_to_theta (par)
 
subroutine controlfunction_oct_m::controlfunction_theta_to_basis (par)
 
subroutine, public controlfunction_oct_m::controlfunction_get_theta (par, theta)
 
subroutine, public controlfunction_oct_m::controlfunction_set_theta (par, theta)
 
subroutine controlfunction_oct_m::controlfunction_trans_matrix (par)
 

Variables

integer, parameter, public controlfunction_oct_m::ctr_internal = 1
 
integer, parameter, public controlfunction_oct_m::ctr_fourier_series_h = 3
 
integer, parameter, public controlfunction_oct_m::ctr_zero_fourier_series_h = 4
 
integer, parameter, public controlfunction_oct_m::ctr_fourier_series = 5
 
integer, parameter, public controlfunction_oct_m::ctr_zero_fourier_series = 6
 
integer, parameter, public controlfunction_oct_m::ctr_rt = 7
 
integer, parameter, public controlfunction_oct_m::controlfunction_mode_none = 0
 
integer, parameter, public controlfunction_oct_m::controlfunction_mode_epsilon = 1
 
integer, parameter, public controlfunction_oct_m::controlfunction_mode_f = 2
 
logical controlfunction_oct_m::cf_common_initialized = .false.
 
type(controlfunction_common_t) controlfunction_oct_m::cf_common