Octopus
opt_control_oct_m Module Reference

This module contains the main procedure ("opt_control_run") that is used when optimal control runs are requested. More...

Detailed Description

This module contains the main procedure ("opt_control_run") that is used when optimal control runs are requested.

Functions/Subroutines

subroutine, public opt_control_run (system)
 
subroutine opt_control_run_legacy (sys)
 This is the main procedure for all types of optimal control runs. It is called from the "run" procedure in the "run_m" module. More...
 
subroutine f_zbr98 (sys, td, qcpsi, prop_psi, prop_chi, par)
 
subroutine f_wg05 (sys, td, qcpsi, par, prop_psi, prop_chi, j1)
 
subroutine f_striter (sys, td, par, j1)
 
subroutine f_iter (sys, td, qcpsi, par, prop_psi, prop_chi, j1)
 
subroutine opt_control_nlopt_func (val, n, x, grad, need_gradient, f_data)
 
subroutine, public opt_control_function_forward (x, f)
 
subroutine, public opt_control_cg_calc (n, x, f, getgrad, df)
 
subroutine, public opt_control_cg_write_info (iter, n, val, maxdx, maxdf, x)
 interface is required by its being passed as dummy routine to minimize_multidim More...
 
subroutine, public opt_control_direct_calc (n, x, f)
 No intents here is unfortunately required because this will be passed to newuoa routines as a dummy function, whose interface has no intents. More...
 
subroutine, public opt_control_direct_message_info (iter, n, val, maxdx, x)
 
subroutine check_faulty_runmodes (sys, tr)
 
subroutine oct_finalcheck (sys, td)
 

Variables

type(filter_t), save filter
 Module variables. More...
 
type(oct_t), save oct
 
type(oct_iterator_t), save iterator
 
type(target_t), save oct_target
 
type(opt_control_state_t), save initial_st
 
type(controlfunction_t), save par_
 For the direct, nlopt, and cg schemes: More...
 
type(electrons_t), pointer sys_
 
type(hamiltonian_elec_t), pointer hm_
 
type(td_t), pointer td_
 
real(real64), dimension(:), allocatable x_
 
integer index_
 

Function/Subroutine Documentation

◆ opt_control_run()

subroutine, public opt_control_oct_m::opt_control_run ( class(*), intent(inout)  system)

Definition at line 186 of file opt_control.F90.

◆ opt_control_run_legacy()

subroutine opt_control_oct_m::opt_control_run_legacy ( type(electrons_t), intent(inout), target  sys)
private

This is the main procedure for all types of optimal control runs. It is called from the "run" procedure in the "run_m" module.

Definition at line 204 of file opt_control.F90.

◆ f_zbr98()

subroutine opt_control_oct_m::f_zbr98 ( type(electrons_t), intent(inout)  sys,
type(td_t), intent(inout)  td,
type(opt_control_state_t), intent(inout)  qcpsi,
type(oct_prop_t), intent(inout)  prop_psi,
type(oct_prop_t), intent(inout)  prop_chi,
type(controlfunction_t), intent(inout)  par 
)
private

Definition at line 689 of file opt_control.F90.

◆ f_wg05()

subroutine opt_control_oct_m::f_wg05 ( type(electrons_t), intent(inout)  sys,
type(td_t), intent(inout)  td,
type(opt_control_state_t), intent(inout)  qcpsi,
type(controlfunction_t), intent(inout)  par,
type(oct_prop_t), intent(inout)  prop_psi,
type(oct_prop_t), intent(inout)  prop_chi,
real(real64), intent(out)  j1 
)
private

Definition at line 719 of file opt_control.F90.

◆ f_striter()

subroutine opt_control_oct_m::f_striter ( type(electrons_t), intent(inout)  sys,
type(td_t), intent(inout)  td,
type(controlfunction_t), intent(inout)  par,
real(real64), intent(out)  j1 
)
private

Definition at line 774 of file opt_control.F90.

◆ f_iter()

subroutine opt_control_oct_m::f_iter ( type(electrons_t), intent(inout)  sys,
type(td_t), intent(inout)  td,
type(opt_control_state_t), intent(inout)  qcpsi,
type(controlfunction_t), intent(inout)  par,
type(oct_prop_t), intent(inout)  prop_psi,
type(oct_prop_t), intent(inout)  prop_chi,
real(real64), intent(out)  j1 
)
private

Definition at line 827 of file opt_control.F90.

◆ opt_control_nlopt_func()

subroutine opt_control_oct_m::opt_control_nlopt_func ( real(c_double), intent(out)  val,
integer(c_int), intent(in)  n,
real(c_double), dimension(*), intent(in)  x,
real(c_double), dimension(*), intent(out)  grad,
integer(c_int), intent(in)  need_gradient,
type(c_ptr), intent(in)  f_data 
)
private

Definition at line 886 of file opt_control.F90.

◆ opt_control_function_forward()

subroutine, public opt_control_oct_m::opt_control_function_forward ( real(real64), intent(in)  x,
real(real64), intent(inout)  f 
)

The following routines are to be called by C routines, which in turn are called by the main procedure of this module, opt_control_run, which

is below.

Definition at line 910 of file opt_control.F90.

◆ opt_control_cg_calc()

subroutine, public opt_control_oct_m::opt_control_cg_calc ( integer, intent(in)  n,
real(real64), dimension(n), intent(in)  x,
real(real64), intent(inout)  f,
integer, intent(in)  getgrad,
real(real64), dimension(n), intent(inout)  df 
)

Definition at line 940 of file opt_control.F90.

◆ opt_control_cg_write_info()

subroutine, public opt_control_oct_m::opt_control_cg_write_info ( integer, intent(in)  iter,
integer, intent(in)  n,
real(real64), intent(in)  val,
real(real64), intent(in)  maxdx,
real(real64), intent(in)  maxdf,
real(real64), dimension(n), intent(in)  x 
)

interface is required by its being passed as dummy routine to minimize_multidim

Definition at line 1026 of file opt_control.F90.

◆ opt_control_direct_calc()

subroutine, public opt_control_oct_m::opt_control_direct_calc ( integer  n,
real(real64), dimension(n)  x,
real(real64)  f 
)

No intents here is unfortunately required because this will be passed to newuoa routines as a dummy function, whose interface has no intents.

Definition at line 1061 of file opt_control.F90.

◆ opt_control_direct_message_info()

subroutine, public opt_control_oct_m::opt_control_direct_message_info ( integer, intent(in)  iter,
integer, intent(in)  n,
real(real64), intent(in)  val,
real(real64), intent(in)  maxdx,
real(real64), dimension(n), intent(in)  x 
)

Definition at line 1101 of file opt_control.F90.

◆ check_faulty_runmodes()

subroutine opt_control_oct_m::check_faulty_runmodes ( type(electrons_t), intent(in)  sys,
type(propagator_base_t), intent(in)  tr 
)
private

Definition at line 1166 of file opt_control.F90.

◆ oct_finalcheck()

subroutine opt_control_oct_m::oct_finalcheck ( type(electrons_t), intent(inout)  sys,
type(td_t), intent(inout)  td 
)
private

Definition at line 1428 of file opt_control.F90.

Variable Documentation

◆ filter

type(filter_t), save opt_control_oct_m::filter
private

Module variables.

Definition at line 168 of file opt_control.F90.

◆ oct

type(oct_t), save opt_control_oct_m::oct
private

Definition at line 169 of file opt_control.F90.

◆ iterator

type(oct_iterator_t), save opt_control_oct_m::iterator
private

Definition at line 170 of file opt_control.F90.

◆ oct_target

type(target_t), save opt_control_oct_m::oct_target
private

Definition at line 171 of file opt_control.F90.

◆ initial_st

type(opt_control_state_t), save opt_control_oct_m::initial_st
private

Definition at line 172 of file opt_control.F90.

◆ par_

type(controlfunction_t), save opt_control_oct_m::par_
private

For the direct, nlopt, and cg schemes:

Definition at line 176 of file opt_control.F90.

◆ sys_

type(electrons_t), pointer opt_control_oct_m::sys_
private

Definition at line 177 of file opt_control.F90.

◆ hm_

type(hamiltonian_elec_t), pointer opt_control_oct_m::hm_
private

Definition at line 178 of file opt_control.F90.

◆ td_

type(td_t), pointer opt_control_oct_m::td_
private

Definition at line 179 of file opt_control.F90.

◆ x_

real(real64), dimension(:), allocatable opt_control_oct_m::x_
private

Definition at line 180 of file opt_control.F90.

◆ index_

integer opt_control_oct_m::index_
private

Definition at line 181 of file opt_control.F90.