ergo
operator_matrix.cc File Reference

Functions for computing the matrix of a dipole/quadrupole/etc operator. Full and sparse versions. More...

#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <errno.h>
#include <memory.h>
#include <time.h>
#include <stdarg.h>
#include <vector>
#include "pi.h"
#include "output.h"
#include "utilities.h"
#include "boysfunction.h"
#include "integral_info.h"
#include "integrals_general.h"
#include "box_system.h"
#include "operator_matrix.h"

Functions

int compute_operator_matrix_full (const BasisInfoStruct &basisInfoA, const BasisInfoStruct &basisInfoB, int pow_x, int pow_y, int pow_z, ergo_real *result)
 
int compute_operator_matrix_sparse (const BasisInfoStruct &basisInfoA, const BasisInfoStruct &basisInfoB, int pow_x, int pow_y, int pow_z, int n_A, int n_B, std::vector< int > &nvaluesList, std::vector< std::vector< int > > &colindList, std::vector< std::vector< ergo_real > > &valuesList)
 computes the matrix of a dipole/quadrupole/etc operator. More...
 
int compute_overlap_matrix (const BasisInfoStruct &basisInfoA, const BasisInfoStruct &basisInfoB, ergo_real *result)
 

Variables

static const ergo_real MATRIX_ELEMENT_THRESHOLD_VALUE = 1e-12
 

Detailed Description

Functions for computing the matrix of a dipole/quadrupole/etc operator. Full and sparse versions.

Author
: Elias Rudberg responsible

Function Documentation

◆ compute_operator_matrix_full()

int compute_operator_matrix_full ( const BasisInfoStruct basisInfoA,
const BasisInfoStruct basisInfoB,
int  pow_x,
int  pow_y,
int  pow_z,
ergo_real result 
)

◆ compute_operator_matrix_sparse()

int compute_operator_matrix_sparse ( const BasisInfoStruct basisInfoA,
const BasisInfoStruct basisInfoB,
int  pow_x,
int  pow_y,
int  pow_z,
int  n_A,
int  n_B,
std::vector< int > &  nvaluesList,
std::vector< std::vector< int > > &  colindList,
std::vector< std::vector< ergo_real > > &  valuesList 
)

computes the matrix of a dipole/quadrupole/etc operator.

The columns and rows enumerate basisInfoA and basisInfoB respectively. The operator is in the form: X = (x^pow_x*y^pow_y*z^pow_z). The resulting matrix (possibly rectangular) is returned in nvaluesList, colindList, valuesList. Overlap matrix is associated with triple (0,0,0), X component of the dipole moment with (1,0,0), etc. The parameters pow_x pow_y pow_z determine the operator. The parameters n_A n_B give the number of basis functions in each of the two basis sets. The result is stored using the lists nvaluesList colindList valuesList each having length n_A.

References BasisInfoStruct::basisFuncList, DistributionSpecStruct::centerCoords, BasisFuncStruct::centerCoords, DistributionSpecStruct::coeff, compute_integral_of_simple_prim(), BoxSystem::create_box_system(), distance(), do_output(), get_basis_func_extent_list(), BoxSystem::get_items_near_point(), get_largest_simple_integral(), get_product_simple_primitives(), LOG_AREA_INTEGRALS, LOG_CAT_ERROR, LOG_CAT_INFO, MATRIX_ELEMENT_THRESHOLD_VALUE, DistributionSpecStruct::monomialInts, BasisInfoStruct::noOfBasisFuncs, Util::TimeMeter::print(), template_blas_fabs(), and template_blas_sqrt().

Referenced by compute_operator_matrix_full(), compute_operator_matrix_sparse_symm(), and compute_R_matrix_sparse().

◆ compute_overlap_matrix()

int compute_overlap_matrix ( const BasisInfoStruct basisInfoA,
const BasisInfoStruct basisInfoB,
ergo_real result 
)

Variable Documentation

◆ MATRIX_ELEMENT_THRESHOLD_VALUE

const ergo_real MATRIX_ELEMENT_THRESHOLD_VALUE = 1e-12
static