(git:ccc2433)
grid_ref_collint.h File Reference
#include <assert.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../common/grid_common.h"
#include "../common/grid_library.h"

Go to the source code of this file.

Macros

#define GRID_CONST_WHEN_COLLOCATE
 
#define GRID_CONST_WHEN_INTEGRATE   const
 

Functions

static void ortho_cx_to_grid (const int lp, const int k1, const int k2, const int j1, const int j2, const int cmax, const double pol[3][lp+1][2 *cmax+1], const int map[3][2 *cmax+1], const double dh[3][3], const double dh_inv[3][3], const double kremain, const int npts_local[3], GRID_CONST_WHEN_COLLOCATE double *cx, GRID_CONST_WHEN_INTEGRATE double *grid)
 Collocates coefficients C_x onto the grid for orthorhombic case. More...
 
static void ortho_cxy_to_cx (const int lp, const int j1, const int j2, const int cmax, const double pol[3][lp+1][2 *cmax+1], GRID_CONST_WHEN_COLLOCATE double *cxy, GRID_CONST_WHEN_INTEGRATE double *cx)
 Transforms coefficients C_xy into C_x by fixing grid index j. More...
 
static void ortho_cxy_to_grid (const int lp, const int k1, const int k2, const int cmax, const double pol[3][lp+1][2 *cmax+1], const int map[3][2 *cmax+1], const double dh[3][3], const double dh_inv[3][3], const double disr_radius, const int npts_local[3], GRID_CONST_WHEN_COLLOCATE double *cxy, GRID_CONST_WHEN_INTEGRATE double *grid)
 Collocates coefficients C_xy onto the grid for orthorhombic case. More...
 
static void ortho_cxyz_to_cxy (const int lp, const int k1, const int k2, const int cmax, const double pol[3][lp+1][2 *cmax+1], GRID_CONST_WHEN_COLLOCATE double *cxyz, GRID_CONST_WHEN_INTEGRATE double *cxy)
 Transforms coefficients C_xyz into C_xz by fixing grid index k. More...
 
static void ortho_cxyz_to_grid (const int lp, const double zetp, const double dh[3][3], const double dh_inv[3][3], const double rp[3], const int npts_global[3], const int npts_local[3], const int shift_local[3], const double radius, GRID_CONST_WHEN_COLLOCATE double *cxyz, GRID_CONST_WHEN_INTEGRATE double *grid)
 Collocates coefficients C_xyz onto the grid for orthorhombic case. More...
 
static void general_ci_to_grid (const int lp, const int jg, const int kg, const int ismin, const int ismax, const int npts_local[3], const int index_min[3], const int index_max[3], const int map_i[], const double gp[3], const int k, const int j, const double exp_ij[], const double exp_jk[], const double exp_ki[], GRID_CONST_WHEN_COLLOCATE double *ci, GRID_CONST_WHEN_INTEGRATE double *grid)
 Collocates coefficients C_i onto the grid for general case. More...
 
static void general_cij_to_ci (const int lp, const double dj, GRID_CONST_WHEN_COLLOCATE double *cij, GRID_CONST_WHEN_INTEGRATE double *ci)
 Transforms coefficients C_ij into C_i by fixing grid index j. More...
 
static void general_cij_to_grid (const int lp, const int k, const int kg, const int npts_local[3], const int index_min[3], const int index_max[3], const int map_i[], const int map_j[], const double dh[3][3], const double gp[3], const double radius, const double exp_ij[], const double exp_jk[], const double exp_ki[], GRID_CONST_WHEN_COLLOCATE double *cij, GRID_CONST_WHEN_INTEGRATE double *grid)
 Collocates coefficients C_ij onto the grid for general case. More...
 
static void general_cijk_to_cij (const int lp, const double dk, GRID_CONST_WHEN_COLLOCATE double *cijk, GRID_CONST_WHEN_INTEGRATE double *cij)
 Transforms coefficients C_ijk into C_ij by fixing grid index k. More...
 
static void general_precompute_mapping (const int index_min, const int index_max, const int shift_local, const int npts_global, const int bounds[2], int map[])
 Precompute mapping of grid indices for general case. More...
 
static void general_fill_exp_table (const int idir, const int jdir, const int index_min[3], const int index_max[3], const double zetp, const double dh[3][3], const double gp[3], double exp_table[])
 Fill one of the 2D tables that speedup 3D Gaussian (Mathieu's trick). More...
 
static void general_cijk_to_grid (const int border_mask, const int lp, const double zetp, const double dh[3][3], const double dh_inv[3][3], const double rp[3], const int npts_global[3], const int npts_local[3], const int shift_local[3], const int border_width[3], const double radius, GRID_CONST_WHEN_COLLOCATE double *cijk, GRID_CONST_WHEN_INTEGRATE double *grid)
 Collocates coefficients C_ijk onto the grid for general case. More...
 
static void general_cxyz_to_cijk (const int lp, const double dh[3][3], GRID_CONST_WHEN_COLLOCATE double *cxyz, GRID_CONST_WHEN_INTEGRATE double *cijk)
 Transforms coefficients C_xyz into C_ijk. More...
 
static void general_cxyz_to_grid (const int border_mask, const int lp, const double zetp, const double dh[3][3], const double dh_inv[3][3], const double rp[3], const int npts_global[3], const int npts_local[3], const int shift_local[3], const int border_width[3], const double radius, GRID_CONST_WHEN_COLLOCATE double *cxyz, GRID_CONST_WHEN_INTEGRATE double *grid)
 Collocates coefficients C_xyz onto the grid for general case. More...
 
static void cxyz_to_grid (const bool orthorhombic, const int border_mask, const int lp, const double zetp, const double dh[3][3], const double dh_inv[3][3], const double rp[3], const int npts_global[3], const int npts_local[3], const int shift_local[3], const int border_width[3], const double radius, GRID_CONST_WHEN_COLLOCATE double *cxyz, GRID_CONST_WHEN_INTEGRATE double *grid)
 Collocates coefficients C_xyz onto the grid. More...
 
static void cab_to_cxyz (const int la_max, const int la_min, const int lb_max, const int lb_min, const double prefactor, const double ra[3], const double rb[3], const double rp[3], GRID_CONST_WHEN_COLLOCATE double *cab, GRID_CONST_WHEN_INTEGRATE double *cxyz)
 Transforms coefficients C_ab into C_xyz. More...
 
static void cab_to_grid (const bool orthorhombic, const int border_mask, 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, GRID_CONST_WHEN_COLLOCATE double *cab, GRID_CONST_WHEN_INTEGRATE double *grid)
 Collocates coefficients C_ab onto the grid. More...
 

Macro Definition Documentation

◆ GRID_CONST_WHEN_COLLOCATE

#define GRID_CONST_WHEN_COLLOCATE

Definition at line 22 of file grid_ref_collint.h.

◆ GRID_CONST_WHEN_INTEGRATE

#define GRID_CONST_WHEN_INTEGRATE   const

Definition at line 23 of file grid_ref_collint.h.

Function Documentation

◆ ortho_cx_to_grid()

static void ortho_cx_to_grid ( const int  lp,
const int  k1,
const int  k2,
const int  j1,
const int  j2,
const int  cmax,
const double  pol[3][lp+1][2 *cmax+1],
const int  map[3][2 *cmax+1],
const double  dh[3][3],
const double  dh_inv[3][3],
const double  kremain,
const int  npts_local[3],
GRID_CONST_WHEN_COLLOCATE double *  cx,
GRID_CONST_WHEN_INTEGRATE double *  grid 
)
inlinestatic

Collocates coefficients C_x onto the grid for orthorhombic case.

Author
Ole Schuett

Definition at line 31 of file grid_ref_collint.h.

◆ ortho_cxy_to_cx()

static void ortho_cxy_to_cx ( const int  lp,
const int  j1,
const int  j2,
const int  cmax,
const double  pol[3][lp+1][2 *cmax+1],
GRID_CONST_WHEN_COLLOCATE double *  cxy,
GRID_CONST_WHEN_INTEGRATE double *  cx 
)
inlinestatic

Transforms coefficients C_xy into C_x by fixing grid index j.

Author
Ole Schuett

Definition at line 99 of file grid_ref_collint.h.

◆ ortho_cxy_to_grid()

static void ortho_cxy_to_grid ( const int  lp,
const int  k1,
const int  k2,
const int  cmax,
const double  pol[3][lp+1][2 *cmax+1],
const int  map[3][2 *cmax+1],
const double  dh[3][3],
const double  dh_inv[3][3],
const double  disr_radius,
const int  npts_local[3],
GRID_CONST_WHEN_COLLOCATE double *  cxy,
GRID_CONST_WHEN_INTEGRATE double *  grid 
)
inlinestatic

Collocates coefficients C_xy onto the grid for orthorhombic case.

Author
Ole Schuett

Definition at line 132 of file grid_ref_collint.h.

◆ ortho_cxyz_to_cxy()

static void ortho_cxyz_to_cxy ( const int  lp,
const int  k1,
const int  k2,
const int  cmax,
const double  pol[3][lp+1][2 *cmax+1],
GRID_CONST_WHEN_COLLOCATE double *  cxyz,
GRID_CONST_WHEN_INTEGRATE double *  cxy 
)
inlinestatic

Transforms coefficients C_xyz into C_xz by fixing grid index k.

Author
Ole Schuett

Definition at line 173 of file grid_ref_collint.h.

◆ ortho_cxyz_to_grid()

static void ortho_cxyz_to_grid ( const int  lp,
const double  zetp,
const double  dh[3][3],
const double  dh_inv[3][3],
const double  rp[3],
const int  npts_global[3],
const int  npts_local[3],
const int  shift_local[3],
const double  radius,
GRID_CONST_WHEN_COLLOCATE double *  cxyz,
GRID_CONST_WHEN_INTEGRATE double *  grid 
)
inlinestatic

Collocates coefficients C_xyz onto the grid for orthorhombic case.

Author
Ole Schuett

Definition at line 207 of file grid_ref_collint.h.

Here is the caller graph for this function:

◆ general_ci_to_grid()

static void general_ci_to_grid ( const int  lp,
const int  jg,
const int  kg,
const int  ismin,
const int  ismax,
const int  npts_local[3],
const int  index_min[3],
const int  index_max[3],
const int  map_i[],
const double  gp[3],
const int  k,
const int  j,
const double  exp_ij[],
const double  exp_jk[],
const double  exp_ki[],
GRID_CONST_WHEN_COLLOCATE double *  ci,
GRID_CONST_WHEN_INTEGRATE double *  grid 
)
inlinestatic

Collocates coefficients C_i onto the grid for general case.

Author
Ole Schuett

Definition at line 334 of file grid_ref_collint.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ general_cij_to_ci()

static void general_cij_to_ci ( const int  lp,
const double  dj,
GRID_CONST_WHEN_COLLOCATE double *  cij,
GRID_CONST_WHEN_INTEGRATE double *  ci 
)
inlinestatic

Transforms coefficients C_ij into C_i by fixing grid index j.

Author
Ole Schuett

Definition at line 395 of file grid_ref_collint.h.

Here is the caller graph for this function:

◆ general_cij_to_grid()

static void general_cij_to_grid ( const int  lp,
const int  k,
const int  kg,
const int  npts_local[3],
const int  index_min[3],
const int  index_max[3],
const int  map_i[],
const int  map_j[],
const double  dh[3][3],
const double  gp[3],
const double  radius,
const double  exp_ij[],
const double  exp_jk[],
const double  exp_ki[],
GRID_CONST_WHEN_COLLOCATE double *  cij,
GRID_CONST_WHEN_INTEGRATE double *  grid 
)
inlinestatic

Collocates coefficients C_ij onto the grid for general case.

Author
Ole Schuett

Definition at line 416 of file grid_ref_collint.h.

Here is the call graph for this function:

◆ general_cijk_to_cij()

static void general_cijk_to_cij ( const int  lp,
const double  dk,
GRID_CONST_WHEN_COLLOCATE double *  cijk,
GRID_CONST_WHEN_INTEGRATE double *  cij 
)
inlinestatic

Transforms coefficients C_ijk into C_ij by fixing grid index k.

Author
Ole Schuett

Definition at line 489 of file grid_ref_collint.h.

◆ general_precompute_mapping()

static void general_precompute_mapping ( const int  index_min,
const int  index_max,
const int  shift_local,
const int  npts_global,
const int  bounds[2],
int  map[] 
)
inlinestatic

Precompute mapping of grid indices for general case.

Author
Ole Schuett

Definition at line 514 of file grid_ref_collint.h.

Here is the call graph for this function:

◆ general_fill_exp_table()

static void general_fill_exp_table ( const int  idir,
const int  jdir,
const int  index_min[3],
const int  index_max[3],
const double  zetp,
const double  dh[3][3],
const double  gp[3],
double  exp_table[] 
)
inlinestatic

Fill one of the 2D tables that speedup 3D Gaussian (Mathieu's trick).

Author
Ole Schuett

Definition at line 536 of file grid_ref_collint.h.

Here is the call graph for this function:

◆ general_cijk_to_grid()

static void general_cijk_to_grid ( const int  border_mask,
const int  lp,
const double  zetp,
const double  dh[3][3],
const double  dh_inv[3][3],
const double  rp[3],
const int  npts_global[3],
const int  npts_local[3],
const int  shift_local[3],
const int  border_width[3],
const double  radius,
GRID_CONST_WHEN_COLLOCATE double *  cijk,
GRID_CONST_WHEN_INTEGRATE double *  grid 
)
inlinestatic

Collocates coefficients C_ijk onto the grid for general case.

Author
Ole Schuett

Definition at line 583 of file grid_ref_collint.h.

Here is the caller graph for this function:

◆ general_cxyz_to_cijk()

static void general_cxyz_to_cijk ( const int  lp,
const double  dh[3][3],
GRID_CONST_WHEN_COLLOCATE double *  cxyz,
GRID_CONST_WHEN_INTEGRATE double *  cijk 
)
inlinestatic

Transforms coefficients C_xyz into C_ijk.

Author
Ole Schuett

Definition at line 698 of file grid_ref_collint.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ general_cxyz_to_grid()

static void general_cxyz_to_grid ( const int  border_mask,
const int  lp,
const double  zetp,
const double  dh[3][3],
const double  dh_inv[3][3],
const double  rp[3],
const int  npts_global[3],
const int  npts_local[3],
const int  shift_local[3],
const int  border_width[3],
const double  radius,
GRID_CONST_WHEN_COLLOCATE double *  cxyz,
GRID_CONST_WHEN_INTEGRATE double *  grid 
)
inlinestatic

Collocates coefficients C_xyz onto the grid for general case.

Author
Ole Schuett

Definition at line 769 of file grid_ref_collint.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cxyz_to_grid()

static void cxyz_to_grid ( const bool  orthorhombic,
const int  border_mask,
const int  lp,
const double  zetp,
const double  dh[3][3],
const double  dh_inv[3][3],
const double  rp[3],
const int  npts_global[3],
const int  npts_local[3],
const int  shift_local[3],
const int  border_width[3],
const double  radius,
GRID_CONST_WHEN_COLLOCATE double *  cxyz,
GRID_CONST_WHEN_INTEGRATE double *  grid 
)
inlinestatic

Collocates coefficients C_xyz onto the grid.

Author
Ole Schuett

Definition at line 801 of file grid_ref_collint.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cab_to_cxyz()

static void cab_to_cxyz ( const int  la_max,
const int  la_min,
const int  lb_max,
const int  lb_min,
const double  prefactor,
const double  ra[3],
const double  rb[3],
const double  rp[3],
GRID_CONST_WHEN_COLLOCATE double *  cab,
GRID_CONST_WHEN_INTEGRATE double *  cxyz 
)
inlinestatic

Transforms coefficients C_ab into C_xyz.

Author
Ole Schuett

Definition at line 827 of file grid_ref_collint.h.

Here is the caller graph for this function:

◆ cab_to_grid()

static void cab_to_grid ( const bool  orthorhombic,
const int  border_mask,
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,
GRID_CONST_WHEN_COLLOCATE double *  cab,
GRID_CONST_WHEN_INTEGRATE double *  grid 
)
inlinestatic

Collocates coefficients C_ab onto the grid.

Author
Ole Schuett

Definition at line 918 of file grid_ref_collint.h.

Here is the call graph for this function:
Here is the caller graph for this function: