(git:6a2e663)
grid_cpu_collocate.h
Go to the documentation of this file.
1 /*----------------------------------------------------------------------------*/
2 /* CP2K: A general program to perform molecular dynamics simulations */
3 /* Copyright 2000-2024 CP2K developers group <https://cp2k.org> */
4 /* */
5 /* SPDX-License-Identifier: BSD-3-Clause */
6 /*----------------------------------------------------------------------------*/
7 #ifndef GRID_CPU_COLLOCATE_H
8 #define GRID_CPU_COLLOCATE_H
9 
10 #include "../common/grid_constants.h"
11 #include <stdbool.h>
12 
13 /*******************************************************************************
14  * \brief Collocates a single task. A task consists of a pair of atoms each
15  * with a position, Gaussian exponent, and a range of angular momentum.
16  * This function then collocates all combinations of spherical harmonics.
17  *
18  * \param orthorhombic Whether simulation box is orthorhombic.
19  * \param border_mask Bit-pattern determining which border regions to exclude.
20  * Zero means no masking, ie. all regions are included.
21  * See also rs_find_node() in task_list_methods.F.
22  * \param func Function to be collocated, see grid_prepare_pab.h
23  * \param l{a,b}_max Max angular momentum to collocate for give atom.
24  * \param l{a,b}_min Lowest angular momentum to collocate for give atom.
25  * \param zet_{a,b} Gaussian's exponent of given atom.
26  * \param rscale Prefactor to take density matrix symmetry into account.
27  * \param dh Incremental grid matrix.
28  * Grid point i,j,k corresponds to real-space vector:
29  * r = i*dh[0,:] + j*dh[1,:] + k*dh[2,:]
30  * \param dh_inv Inverse incremental grid matrix.
31  * \param ra Position of atom a.
32  * \param rab Vector difference between position of atom a and atom b.
33  * \param npts_global Number of global grid points in each direction.
34  * \param npts_local Number of local grid points in each direction.
35  * \param shift_local Number of points local grid is shifted wrt global grid.
36  * \param border_width Width of halo region in grid points in each direction.
37  * \param lmax Global maximum angular moment.
38  * \param radius Radius where Gaussian becomes smaller than threshold eps
39  * \param o{1,2} Offsets. Subblock for collocation starts at pab[o2][o1].
40  * \param n{1,2} Dimensions of density matrix block pab.
41  * \param pab The atom-pair's density matrix block P_{ab}.
42  *
43  * \param grid The output grid array to collocate into.
44  *
45  * \author Ole Schuett
46  ******************************************************************************/
48  const bool orthorhombic, const int border_mask, const enum grid_func func,
49  const int la_max, const int la_min, const int lb_max, const int lb_min,
50  const double zeta, const double zetb, const double rscale,
51  const double dh[3][3], const double dh_inv[3][3], const double ra[3],
52  const double rab[3], const int npts_global[3], const int npts_local[3],
53  const int shift_local[3], const int border_width[3], const double radius,
54  const int o1, const int o2, const int n1, const int n2,
55  const double pab[n2][n1], double *grid);
56 
57 #endif
58 
59 // EOF
grid_func
static void const int const int const int const int const int const double const int const int const int int GRID_CONST_WHEN_COLLOCATE double GRID_CONST_WHEN_INTEGRATE double * grid
static void const int const int const int const int const int const double const int const int const int npts_local[3]
void grid_cpu_collocate_pgf_product(const bool orthorhombic, const int border_mask, const enum grid_func func, const int la_max, const int la_min, const int lb_max, const int lb_min, const double zeta, const double zetb, const double rscale, const double dh[3][3], const double dh_inv[3][3], const double ra[3], const double rab[3], const int npts_global[3], const int npts_local[3], const int shift_local[3], const int border_width[3], const double radius, const int o1, const int o2, const int n1, const int n2, const double pab[n2][n1], double *grid)
Collocates a single task. A task consists of a pair of atoms each with a position,...