![]() |
Octopus
|
This module defines functions over batches of mesh functions. More...
This module defines functions over batches of mesh functions.
Data Types | |
| type | batch_p_t |
Functions/Subroutines | |
| subroutine, public | mesh_batch_nrm2 (mesh, aa, nrm2, reduce) |
| Calculate the norms (norm2, not the square!) of a batch of mesh functions. More... | |
| subroutine, public | dmesh_batch_dotp_matrix (mesh, aa, bb, dot, reduce) |
| Calculate the overlap matrix of two batches. More... | |
| subroutine, public | dmesh_batch_dotp_self (mesh, aa, dot, reduce) |
| calculate the overlap matrix of a batch with itself More... | |
| subroutine, public | dmesh_batch_dotp_vector (mesh, aa, bb, dot, reduce, cproduct) |
| calculate the vector of dot-products of mesh functions between two batches More... | |
| subroutine, public | dmesh_batch_mf_dotp (mesh, aa, psi, dot, reduce, nst) |
| calculate the dot products between a batch and a vector of mesh functions More... | |
| subroutine, public | dmesh_batch_codensity (mesh, aa, psi, rho) |
| calculate the co-densities More... | |
| subroutine, public | dmesh_batch_exchange_points (mesh, aa, forward_map, backward_map) |
| This functions exchanges points of a mesh according to a certain map. Two possible maps can be given. Only one map argument must be present. More... | |
| subroutine | dpriv_mesh_batch_nrm2 (mesh, aa, nrm2) |
| This function should not be called directly, but through mesh_batch_nrm2. More... | |
| subroutine, public | dmesh_batch_orthogonalization (mesh, nst, psib, phib, normalize, overlap, norm, gs_scheme, full_batch) |
| Orthonormalizes states of phib to the orbitals of nst batches of psi. More... | |
| subroutine, public | dmesh_batch_normalize (mesh, psib, norm) |
| Normalize a batch. More... | |
| subroutine, public | zmesh_batch_dotp_matrix (mesh, aa, bb, dot, reduce) |
| Calculate the overlap matrix of two batches. More... | |
| subroutine, public | zmesh_batch_dotp_self (mesh, aa, dot, reduce) |
| calculate the overlap matrix of a batch with itself More... | |
| subroutine, public | zmesh_batch_dotp_vector (mesh, aa, bb, dot, reduce, cproduct) |
| calculate the vector of dot-products of mesh functions between two batches More... | |
| subroutine, public | zmesh_batch_mf_dotp (mesh, aa, psi, dot, reduce, nst) |
| calculate the dot products between a batch and a vector of mesh functions More... | |
| subroutine, public | zmesh_batch_codensity (mesh, aa, psi, rho) |
| calculate the co-densities More... | |
| subroutine, public | zmesh_batch_exchange_points (mesh, aa, forward_map, backward_map) |
| This functions exchanges points of a mesh according to a certain map. Two possible maps can be given. Only one map argument must be present. More... | |
| subroutine | zpriv_mesh_batch_nrm2 (mesh, aa, nrm2) |
| This function should not be called directly, but through mesh_batch_nrm2. More... | |
| subroutine, public | zmesh_batch_orthogonalization (mesh, nst, psib, phib, normalize, overlap, norm, gs_scheme, full_batch) |
| Orthonormalizes states of phib to the orbitals of nst batches of psi. More... | |
| subroutine, public | zmesh_batch_normalize (mesh, psib, norm) |
| Normalize a batch. More... | |
| subroutine, public mesh_batch_oct_m::mesh_batch_nrm2 | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(in) | aa, | ||
| real(real64), dimension(:), intent(out), contiguous | nrm2, | ||
| logical, intent(in), optional | reduce | ||
| ) |
Calculate the norms (norm2, not the square!) of a batch of mesh functions.
| [in] | mesh | underlying mesh |
| [in] | aa | batch of mesh functions |
| [out] | nrm2 | vector of norms |
| [in] | reduce | optional flag whether to perform reduction; default=.true. |
Definition at line 178 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::dmesh_batch_dotp_matrix | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(in) | aa, | ||
| class(batch_t), intent(in) | bb, | ||
| real(real64), dimension(:, :), intent(inout), contiguous | dot, | ||
| logical, intent(in), optional | reduce | ||
| ) |
Calculate the overlap matrix of two batches.
| [in] | mesh | underlying mesh |
| [in] | aa | batch aa |
| [in] | bb | batch bb |
| [in,out] | dot | result: dot_ij = < aa(i) | bb(j) >; dimension (states%st_start: states%st_end, states%st_start: states%st_end) |
| [in] | reduce | optional flag whether to perform reduction; default = .true. |
Definition at line 272 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::dmesh_batch_dotp_self | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(in) | aa, | ||
| real(real64), dimension(:, :), intent(inout), contiguous | dot, | ||
| logical, intent(in), optional | reduce | ||
| ) |
calculate the overlap matrix of a batch with itself
| [in] | mesh | underlying mesh |
| [in] | aa | batch aa |
| [in,out] | dot | result: dot_ij = < aa(i) | aa(j) >; dimension (1:aa%nst, 1:aa%nst) |
| [in] | reduce | optional flag whether to perform reduction; default = .true. |
Definition at line 534 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::dmesh_batch_dotp_vector | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(in) | aa, | ||
| class(batch_t), intent(in) | bb, | ||
| real(real64), dimension(:), intent(inout), contiguous | dot, | ||
| logical, intent(in), optional | reduce, | ||
| logical, intent(in), optional | cproduct | ||
| ) |
calculate the vector of dot-products of mesh functions between two batches
| [in] | mesh | underlying mesh |
| [in] | aa | batch aa |
| [in] | bb | batch bb |
| [in,out] | dot | result: dot_i = < aa(i) | bb(i) > |
| [in] | reduce | optional flag whether to perform reduction; default = .true. |
| [in] | cproduct | optional flag: if true, form the dot product of two complex vectors, |
Definition at line 648 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::dmesh_batch_mf_dotp | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(in) | aa, | ||
| real(real64), dimension(:,:), intent(in) | psi, | ||
| real(real64), dimension(:), intent(inout) | dot, | ||
| logical, intent(in), optional | reduce, | ||
| integer, intent(in), optional | nst | ||
| ) |
calculate the dot products between a batch and a vector of mesh functions
| [in] | mesh | underlying mesh |
| [in] | aa | batch aa |
| [in] | psi | mesh functions; min. dimension (1:np, 1:nst) |
| [in,out] | dot | result dot_i = < aa(i) | psi(i) > |
| [in] | reduce | optional flag whether to perform reduction; default = .true. |
| [in] | nst | optional number of states; default = aanst |
Definition at line 822 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::dmesh_batch_codensity | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(in) | aa, | ||
| real(real64), dimension(:,:), intent(in) | psi, | ||
| real(real64), dimension(:,:), intent(out) | rho | ||
| ) |
calculate the co-densities
Result \( \rho_i(x) = \psi(x) \phi_i(x) \) where the $\phi_i$ are given by the batch aa.
| [in] | mesh | The mesh descriptor. |
| [in] | aa | A batch which contains the mesh functions |
| [in] | psi | A mesh function; dimension (1:mesh%np, 1:aadim) |
| [out] | rho | An array containing the result of the co-density |
Definition at line 982 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::dmesh_batch_exchange_points | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(inout) | aa, | ||
| integer(int64), dimension(:), intent(in), optional | forward_map, | ||
| logical, intent(in), optional | backward_map | ||
| ) |
This functions exchanges points of a mesh according to a certain map. Two possible maps can be given. Only one map argument must be present.
| [in] | mesh | The mesh descriptor. |
| [in,out] | aa | A batch which contains the mesh functions whose points will be exchanged. |
| [in] | forward_map | A map which gives the destination of the value each point. |
| [in] | backward_map | A map which gives the source of the value of each point. |
Definition at line 1043 of file mesh_batch.F90.
|
private |
This function should not be called directly, but through mesh_batch_nrm2.
Definition at line 1263 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::dmesh_batch_orthogonalization | ( | class(mesh_t), intent(in) | mesh, |
| integer, intent(in) | nst, | ||
| class(batch_p_t), dimension(:), intent(in) | psib, | ||
| class(batch_t), intent(inout) | phib, | ||
| logical, intent(in), optional | normalize, | ||
| real(real64), dimension(:,:), intent(out), optional | overlap, | ||
| real(real64), dimension(:), intent(out), optional | norm, | ||
| integer, intent(in), optional | gs_scheme, | ||
| logical, intent(in), optional | full_batch | ||
| ) |
Orthonormalizes states of phib to the orbitals of nst batches of psi.
It also permits doing only the orthogonalization (no normalization).
| [in] | mesh | underlying mesh |
| [in] | nst | number of states |
| [in] | psib | psi(nst) (array of nst pointers to batches) |
| [in,out] | phib | phi |
| [in] | normalize | optional flag whether to normalize the result; default = .false. |
| [out] | overlap | optional result: (nst, phibnst) |
| [out] | norm | optional result: array of norms |
| [in] | gs_scheme | optional: Gram-Schmidt scheme to use |
| [in] | full_batch | optional: orthogonalize full batch |
Definition at line 1455 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::dmesh_batch_normalize | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(inout) | psib, | ||
| real(real64), dimension(:), intent(out), optional | norm | ||
| ) |
Normalize a batch.
| [in] | mesh | underlying mesh |
| [in,out] | psib | batch to normalize |
| [out] | norm | optional result: array of norms |
Definition at line 1578 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::zmesh_batch_dotp_matrix | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(in) | aa, | ||
| class(batch_t), intent(in) | bb, | ||
| complex(real64), dimension(:, :), intent(inout), contiguous | dot, | ||
| logical, intent(in), optional | reduce | ||
| ) |
Calculate the overlap matrix of two batches.
| [in] | mesh | underlying mesh |
| [in] | aa | batch aa |
| [in] | bb | batch bb |
| [in,out] | dot | result: dot_ij = < aa(i) | bb(j) >; dimension (states%st_start: states%st_end, states%st_start: states%st_end) |
| [in] | reduce | optional flag whether to perform reduction; default = .true. |
Definition at line 1677 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::zmesh_batch_dotp_self | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(in) | aa, | ||
| complex(real64), dimension(:, :), intent(inout), contiguous | dot, | ||
| logical, intent(in), optional | reduce | ||
| ) |
calculate the overlap matrix of a batch with itself
| [in] | mesh | underlying mesh |
| [in] | aa | batch aa |
| [in,out] | dot | result: dot_ij = < aa(i) | aa(j) >; dimension (1:aa%nst, 1:aa%nst) |
| [in] | reduce | optional flag whether to perform reduction; default = .true. |
Definition at line 1939 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::zmesh_batch_dotp_vector | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(in) | aa, | ||
| class(batch_t), intent(in) | bb, | ||
| complex(real64), dimension(:), intent(inout), contiguous | dot, | ||
| logical, intent(in), optional | reduce, | ||
| logical, intent(in), optional | cproduct | ||
| ) |
calculate the vector of dot-products of mesh functions between two batches
| [in] | mesh | underlying mesh |
| [in] | aa | batch aa |
| [in] | bb | batch bb |
| [in,out] | dot | result: dot_i = < aa(i) | bb(i) > |
| [in] | reduce | optional flag whether to perform reduction; default = .true. |
| [in] | cproduct | optional flag: if true, form the dot product of two complex vectors, |
Definition at line 2053 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::zmesh_batch_mf_dotp | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(in) | aa, | ||
| complex(real64), dimension(:,:), intent(in) | psi, | ||
| complex(real64), dimension(:), intent(inout) | dot, | ||
| logical, intent(in), optional | reduce, | ||
| integer, intent(in), optional | nst | ||
| ) |
calculate the dot products between a batch and a vector of mesh functions
| [in] | mesh | underlying mesh |
| [in] | aa | batch aa |
| [in] | psi | mesh functions; min. dimension (1:np, 1:nst) |
| [in,out] | dot | result dot_i = < aa(i) | psi(i) > |
| [in] | reduce | optional flag whether to perform reduction; default = .true. |
| [in] | nst | optional number of states; default = aanst |
Definition at line 2227 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::zmesh_batch_codensity | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(in) | aa, | ||
| complex(real64), dimension(:,:), intent(in) | psi, | ||
| complex(real64), dimension(:,:), intent(out) | rho | ||
| ) |
calculate the co-densities
Result \( \rho_i(x) = \psi(x) \phi_i(x) \) where the $\phi_i$ are given by the batch aa.
| [in] | mesh | The mesh descriptor. |
| [in] | aa | A batch which contains the mesh functions |
| [in] | psi | A mesh function; dimension (1:mesh%np, 1:aadim) |
| [out] | rho | An array containing the result of the co-density |
Definition at line 2387 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::zmesh_batch_exchange_points | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(inout) | aa, | ||
| integer(int64), dimension(:), intent(in), optional | forward_map, | ||
| logical, intent(in), optional | backward_map | ||
| ) |
This functions exchanges points of a mesh according to a certain map. Two possible maps can be given. Only one map argument must be present.
| [in] | mesh | The mesh descriptor. |
| [in,out] | aa | A batch which contains the mesh functions whose points will be exchanged. |
| [in] | forward_map | A map which gives the destination of the value each point. |
| [in] | backward_map | A map which gives the source of the value of each point. |
Definition at line 2448 of file mesh_batch.F90.
|
private |
This function should not be called directly, but through mesh_batch_nrm2.
Definition at line 2668 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::zmesh_batch_orthogonalization | ( | class(mesh_t), intent(in) | mesh, |
| integer, intent(in) | nst, | ||
| class(batch_p_t), dimension(:), intent(in) | psib, | ||
| class(batch_t), intent(inout) | phib, | ||
| logical, intent(in), optional | normalize, | ||
| complex(real64), dimension(:,:), intent(out), optional | overlap, | ||
| complex(real64), dimension(:), intent(out), optional | norm, | ||
| integer, intent(in), optional | gs_scheme, | ||
| logical, intent(in), optional | full_batch | ||
| ) |
Orthonormalizes states of phib to the orbitals of nst batches of psi.
It also permits doing only the orthogonalization (no normalization).
| [in] | mesh | underlying mesh |
| [in] | nst | number of states |
| [in] | psib | psi(nst) (array of nst pointers to batches) |
| [in,out] | phib | phi |
| [in] | normalize | optional flag whether to normalize the result; default = .false. |
| [out] | overlap | optional result: (nst, phibnst) |
| [out] | norm | optional result: array of norms |
| [in] | gs_scheme | optional: Gram-Schmidt scheme to use |
| [in] | full_batch | optional: orthogonalize full batch |
Definition at line 2884 of file mesh_batch.F90.
| subroutine, public mesh_batch_oct_m::zmesh_batch_normalize | ( | class(mesh_t), intent(in) | mesh, |
| class(batch_t), intent(inout) | psib, | ||
| real(real64), dimension(:), intent(out), optional | norm | ||
| ) |
Normalize a batch.
| [in] | mesh | underlying mesh |
| [in,out] | psib | batch to normalize |
| [out] | norm | optional result: array of norms |
Definition at line 3007 of file mesh_batch.F90.