Octopus
batch_ops_oct_m::batch_set_state Interface Reference

There are several ways how to call batch_set_state and batch_get_state: More...

Detailed Description

There are several ways how to call batch_set_state and batch_get_state:

  1. With a 1d array and a single index: batch_get_state(psib, ist, np, psi) In this case, ist is between 1 and nst_linear of the batch (i.e. it is the linear index in the batch) and this call will fetch the first np points of that part of the batch.
  2. With a 1d array and an index tuple: batch_get_state(psib, (/ist, idim/), np, psi) In this case, ist corresponds to the real state index in the system, i.e., it should be between states_elec_block_min(st, ib) and states_elec_block_max(st, ib) for the batch with index ib. idim gives the spin space index.
  3. With a 2d array and a single index: batch_get_state(psib, ist, np, psi(:, :)) In this case, ist is between 1 and nst of the batch (i.e. the state index of the batch) and this call will fetch the wavefunctions for all spin indices for that state index. This is more efficient than looping over spin space and getting the wavefunctions for different spin indices individually.

Definition at line 199 of file batch_ops.F90.

Private Member Functions

subroutine dbatch_set_state1 (this, ist, np, psi)
 Write a single state with np points into a batch at position ist. More...
 
subroutine zbatch_set_state1 (this, ist, np, psi)
 Write a single state with np points into a batch at position ist. More...
 
subroutine dbatch_set_state2 (this, index, np, psi)
 Write a single state with np points into a batch at position defined by index. More...
 
subroutine zbatch_set_state2 (this, index, np, psi)
 Write a single state with np points into a batch at position defined by index. More...
 
subroutine dbatch_set_state3 (this, ii, np, psi)
 Write a set of state with np points into a batch. More...
 
subroutine zbatch_set_state3 (this, ii, np, psi)
 Write a set of state with np points into a batch. More...
 

Member Function/Subroutine Documentation

◆ dbatch_set_state1()

subroutine batch_ops_oct_m::batch_set_state::dbatch_set_state1 ( class(batch_t), intent(inout)  this,
integer, intent(in)  ist,
integer, intent(in)  np,
real(real64), dimension(:), intent(in), contiguous  psi 
)
private

Write a single state with np points into a batch at position ist.

Parameters
[in,out]thisbatch to write the state to
[in]istposition where to write
[in]npnumber of points
[in]psithe state to write

Definition at line 1461 of file batch_ops.F90.

◆ zbatch_set_state1()

subroutine batch_ops_oct_m::batch_set_state::zbatch_set_state1 ( class(batch_t), intent(inout)  this,
integer, intent(in)  ist,
integer, intent(in)  np,
complex(real64), dimension(:), intent(in), contiguous  psi 
)
private

Write a single state with np points into a batch at position ist.

Parameters
[in,out]thisbatch to write the state to
[in]istposition where to write
[in]npnumber of points
[in]psithe state to write

Definition at line 2904 of file batch_ops.F90.

◆ dbatch_set_state2()

subroutine batch_ops_oct_m::batch_set_state::dbatch_set_state2 ( class(batch_t), intent(inout)  this,
integer, dimension(:), intent(in)  index,
integer, intent(in)  np,
real(real64), dimension(:), intent(in), contiguous  psi 
)
private

Write a single state with np points into a batch at position defined by index.

Parameters
[in,out]thisbatch to write the state into
[in]indexhow to access the state. For further information see batch_ops_oct_m::batch_set_state
[in]npnumber of points
[in]psistate to write to the batch

Definition at line 1570 of file batch_ops.F90.

◆ zbatch_set_state2()

subroutine batch_ops_oct_m::batch_set_state::zbatch_set_state2 ( class(batch_t), intent(inout)  this,
integer, dimension(:), intent(in)  index,
integer, intent(in)  np,
complex(real64), dimension(:), intent(in), contiguous  psi 
)
private

Write a single state with np points into a batch at position defined by index.

Parameters
[in,out]thisbatch to write the state into
[in]indexhow to access the state. For further information see batch_ops_oct_m::batch_set_state
[in]npnumber of points
[in]psistate to write to the batch

Definition at line 3000 of file batch_ops.F90.

◆ dbatch_set_state3()

subroutine batch_ops_oct_m::batch_set_state::dbatch_set_state3 ( class(batch_t), intent(inout)  this,
integer, intent(in)  ii,
integer, intent(in)  np,
real(real64), dimension(:, :), intent(in), contiguous  psi 
)
private

Write a set of state with np points into a batch.

Parameters
[in,out]thisbatch to write the states into
[in]iipotision
[in]npnumber of points
[in]psistates to write

Definition at line 1588 of file batch_ops.F90.

◆ zbatch_set_state3()

subroutine batch_ops_oct_m::batch_set_state::zbatch_set_state3 ( class(batch_t), intent(inout)  this,
integer, intent(in)  ii,
integer, intent(in)  np,
complex(real64), dimension(:, :), intent(in), contiguous  psi 
)
private

Write a set of state with np points into a batch.

Parameters
[in,out]thisbatch to write the states into
[in]iipotision
[in]npnumber of points
[in]psistates to write

Definition at line 3018 of file batch_ops.F90.


The documentation for this interface was generated from the following file: