Serial prototype for benchmarking and validating ISDF implementation.
|
subroutine | isdf_options_init (this, namespace, st) |
| Initialise isdf_inp_options_t instance. More...
|
|
subroutine, public | serial_interpolative_separable_density_fitting_vectors (namespace, mesh, st, int_indices, phi, isdf_vectors) |
| Compute a set of ISDF interpolation vectors in serial, for code validation. More...
|
|
subroutine | isdf_construct_interpolation_vectors_packed (namespace, mesh, phi, indices, isdf_vectors) |
| Compute a set of ISDF interpolation vectors, where intermediate quantities such as phi are constructed such that the first index runs over states, and the second runs over grid points. More...
|
|
subroutine | collate_batches_get_state (mesh, st, max_state, psi) |
| Loop over states per block, which makes applying the maximum state limit much simpler Use this to compare to the output of collate_batches Not distributed in states or domain. More...
|
|
subroutine | collate_batches (np, st, max_state, psi) |
| Put batches into a single 2D array. More...
|
|
subroutine | sample_phi_at_centroids (phi_r, indices, phi_mu) |
| Sample KS states at centroid points. More...
|
|
subroutine | construct_zct (zct) |
| Construct the product of Z and C matrices from the element-wise product of the quasi-density matrix. More...
|
|
subroutine | construct_cct (indices, zct, cct) |
| Construct the product \(CC^T\) from \(ZC^T\) by masking the first dimension of \(ZC^T\). More...
|
|
subroutine | construct_density_matrix_packed (phi, phi_mu, P_r_mu) |
| @ brief Construct the density matrix with shape (np, n_int). Denoted packed, because it expects phi in state-major format. More...
|
|
subroutine | construct_density_matrix_all_centroids_packed (phi_mu, P_mu_nu) |
| @ brief Construct the density matrix with shape (n_int, n_int). Denoted packed, because it expects phi in state-major format. More...
|
|
subroutine, public | quantify_error_and_visualise (namespace, st, space, mesh, ions, phi, indices, isdf_vectors, output_cubes) |
| Wrapper for quantifying the error in the expansion of the product basis. More...
|
|
subroutine | approximate_pair_products (psi_mu, zeta, product_basis) |
| Construct a set of approximate pair products using the ISDF interpolation vectors. More...
|
|
subroutine | error_in_product_basis (mesh, product_basis, approx_product_basis, error, mean_error) |
| Quantify the error in the product basis expansion. More...
|
|
subroutine | output_matrix (namespace, fname, matrix) |
| Helper routine to output a 2D matrix. More...
|
|
subroutine | generate_product_state_cubes (namespace, space, mesh, ions, file_prefix, data, limits) |
| Helper function to output a set of pair product states. More...
|
|
integer function | highest_occupied_index (st, ik_index) |
| Return the index of highest occupied Kohn-Sham state for k-point ik . More...
|
|
subroutine isdf_serial_oct_m::construct_zct |
( |
real(real64), dimension(:, :), intent(inout) |
zct | ) |
|
|
private |
Construct the product of Z and C matrices from the element-wise product of the quasi-density matrix.
In this instance, the routine only accepts one set of Kohn-sham states:
\[
(ZC^T)_{\mathbf{r}, \mathbf{r}_{\mu}} =
P^{\varphi}(\mathbf{r}, \mathbf{r}_{\mu}) \circ P^{\varphi}(\mathbf{r}, \mathbf{r}_{\mu})
\quad \text{for all elements} \; \mathbf{r} \; \text{and} \; \mathbf{r}_{\mu}
\]
- Parameters
-
[in,out] | zct | In: Quasi-density matrix |
Definition at line 493 of file isdf_serial.F90.
subroutine isdf_serial_oct_m::construct_density_matrix_packed |
( |
real(real64), dimension(:, :), intent(in) |
phi, |
|
|
real(real64), dimension(:, :), intent(in) |
phi_mu, |
|
|
real(real64), dimension(:, :), intent(out) |
P_r_mu |
|
) |
| |
|
private |
@ brief Construct the density matrix with shape (np, n_int). Denoted packed, because it expects phi
in state-major format.
Construct the density matrix:
\[
P^{\varphi}\left(\mathbf{r}, \mathbf{r}_{\mu}\right) =
\sum_{i=1}^m \varphi_i(\mathbf{r}) \varphi_i\left(\mathbf{r}_{\mu}\right).
\]
- Parameters
-
[in] | phi | A set of states defined on real-space grid |
[in] | phi_mu | KS states, only defined at interpolation points |
[out] | p_r_mu | Density matrix of shape (np, n_int) |
Definition at line 559 of file isdf_serial.F90.
subroutine isdf_serial_oct_m::construct_density_matrix_all_centroids_packed |
( |
real(real64), dimension(:, :), intent(in) |
phi_mu, |
|
|
real(real64), dimension(:, :), intent(out) |
P_mu_nu |
|
) |
| |
|
private |
@ brief Construct the density matrix with shape (n_int, n_int). Denoted packed, because it expects phi
in state-major format.
Construct the density matrix:
\[
P^{\varphi}\left(\mathbf{r}_\mu, \mathbf{r}_\nu}\right) =
\sum_{i=1}^m \varphi_i(\mathbf{r}_\mu) \varphi_i\left(\mathbf{r}_\nu\right).
\]
- Parameters
-
[in] | phi_mu | KS states, only defined at interpolation points |
[out] | p_mu_nu | Density matrix of shape (n_int, n_int) |
Definition at line 599 of file isdf_serial.F90.
subroutine isdf_serial_oct_m::approximate_pair_products |
( |
real(real64), dimension(:, :), intent(in) |
psi_mu, |
|
|
real(real64), dimension(:, :), intent(in) |
zeta, |
|
|
real(real64), dimension(:, :), intent(out) |
product_basis |
|
) |
| |
|
private |
Construct a set of approximate pair products using the ISDF interpolation vectors.
\[
\varphi_i(\mathbf{r}) \varphi_j(\mathbf{r}) \approx
\sum_{\mu =1} \varphi_i(\mathbf{r}_\mu) \varphi_j(\mathbf{r}_\mu) \zeta_\mu(\mathbf{r})
\]
which is formulated in terms of a Khatri-Rao product to form, \(\varphi_i(\mathbf{r}_\mu) \varphi_j(\mathbf{r}_\mu)\), followed by the matrix-matrix product, \( \left[ \varphi_{ij, \mu} \right] \left[\zeta_{\mathbf{r},\mu} \right]^T \) to contract over the interpolation index.
- Parameters
-
[in] | psi_mu | States sampled at interpolation points |
[in] | zeta | Interpolation vectors |
[out] | product_basis | Approx product basis |
Definition at line 725 of file isdf_serial.F90.