21#ifndef _libint2_src_bin_libint_prefactors_h_
22#define _libint2_src_bin_libint_prefactors_h_
26#include <singl_stack.h>
31#define CTIMEENTITIES_SINGLETONS 1
49 static const unsigned int NMAX = 200;
50 static const unsigned int np = 2;
51 static const unsigned int nfunc_per_part = 1;
57 std::shared_ptr<rdouble>
vX_Y[np];
59 std::shared_ptr<rdouble>
X_Y[np][3];
65 std::shared_ptr<rdouble>
vY_X[np];
67 std::shared_ptr<rdouble>
Y_X[np][3];
76 std::shared_ptr<rdouble>
vXY_X[np][2];
78 std::shared_ptr<rdouble>
XY_X[np][2][3];
83 std::shared_ptr<rdouble>
vW_XY[np];
85 std::shared_ptr<rdouble>
W_XY[np][3];
90 std::shared_ptr<rdouble>
zeta[np][2];
94 std::shared_ptr<rdouble>
zeta2[np][2];
103 std::shared_ptr<rdouble>
rho;
148#if CTIMEENTITIES_SINGLETONS
150 std::shared_ptr<cdouble>
N_i[NMAX];
152 std::shared_ptr<cdouble> Cdouble(
double a);
166 static std::shared_ptr<ManagerType>& Manager() {
173 static std::shared_ptr<ManagerType> manager_;
176std::shared_ptr<typename RTimeSingletons<T>::ManagerType>
179#if CTIMEENTITIES_SINGLETONS
183 static std::shared_ptr<ManagerType>& Manager() {
190 static std::shared_ptr<ManagerType> manager_;
193std::shared_ptr<typename CTimeSingletons<T>::ManagerType>
199 typename =
typename std::enable_if<std::is_integral<T>::value>::type>
200std::shared_ptr<CTimeEntity<double> > Scalar(T a) {
202 std::shared_ptr<return_type> tmp(
new return_type(a));
203#if CTIMEENTITIES_SINGLETONS
205 typedef typename singletons_type::ManagerType ManagerType;
206 const typename ManagerType::value_type& result =
207 singletons_type::Manager()->find(tmp);
208 return result.second;
214inline std::shared_ptr<CTimeEntity<double> > Scalar(
double a) {
216 std::shared_ptr<return_type> tmp(
new return_type(a));
217#if CTIMEENTITIES_SINGLETONS
218 typedef CTimeSingletons<double> singletons_type;
219 typedef typename singletons_type::ManagerType ManagerType;
220 const typename ManagerType::value_type& result =
221 singletons_type::Manager()->find(tmp);
222 return result.second;
238inline std::shared_ptr<RTimeEntity<double> > Scalar(
const std::string&
id) {
240 typedef RTimeEntity<T> return_type;
241 typedef RTimeSingletons<T> singletons_type;
242 typedef singletons_type::ManagerType ManagerType;
243 std::shared_ptr<return_type> tmp(
new return_type(
id));
244 const ManagerType::value_type& result = singletons_type::Manager()->find(tmp);
245 return result.second;
254 std::shared_ptr<RTimeEntity<T> > operator[](
unsigned int xyz) {
255 return Scalar(id_ +
"_" + dirchar[xyz]);
259 static const char* dirchar;
270 for (
int xyz = 0; xyz < 3; ++xyz) val_[xyz] = val[xyz];
272 std::shared_ptr<CTimeEntity<T> > operator[](
unsigned int xyz) {
273 return Scalar(val_[xyz]);
287 template <
class T =
double> RTimeVector3<T> Vector(
const std::string&
id)
289 return RTimeVector3<T>(
id);
292 template <
class T =
double> CTimeVector3<T> Vector(
const T* a)
294 return CTimeVector3<T>(a);
297inline RTimeVector3<double> Vector(
const char*
id) {
298 return RTimeVector3<double>(
id);
301inline CTimeVector3<double> Vector(
const CGF& bf) {
303 for (
unsigned int xyz = 0; xyz < 3; ++xyz) qn[xyz] = bf.qn(xyz);
304 return CTimeVector3<double>(qn);
307inline CTimeVector3<double> Vector(
const OriginDerivative<3u>& dd) {
309 for (
unsigned int xyz = 0; xyz < 3; ++xyz) d[xyz] = dd.d(xyz);
310 return CTimeVector3<double>(d);
CTimeEntity is an Entity of type T that exists at compile-time of the generated code (hence has a val...
Definition entity.h:220
Prefactors is a collection of common quantities which appear as prefactors in recurrence relations fo...
Definition prefactors.h:41
std::shared_ptr< cdouble > N_i[NMAX]
integers represented as doubles
Definition prefactors.h:150
std::shared_ptr< rdouble > one_o_2alpha12[np]
1/(2*alpha12)
Definition prefactors.h:105
std::shared_ptr< rdouble > zeta[np][2]
orbital exponents
Definition prefactors.h:90
std::shared_ptr< rdouble > vXY_X[np][2]
XY-X vectors: XY is either P or Q, X is either (A or B) or (C or D).
Definition prefactors.h:76
std::shared_ptr< rdouble > R12kG12VRR_pfac0[np][3]
cartesian components of pfac0 vector
Definition prefactors.h:130
std::shared_ptr< rdouble > XY_X[np][2][3]
cartesian components of vXY_X vector
Definition prefactors.h:78
std::shared_ptr< rdouble > X_Y[np][3]
Cartesian components of X-Y vectors.
Definition prefactors.h:59
std::shared_ptr< rdouble > W_XY[np][3]
cartesian components of W_XY vector
Definition prefactors.h:85
std::shared_ptr< rdouble > R12kG12VRR_vpfac0[np]
prefactor in front of (a-1 0|c0) is one_o_2alpha12[0] prefactor in front of (a0|c-1 0) is one_o_2alph...
Definition prefactors.h:128
std::shared_ptr< rdouble > rho
rho = zeta*eta/(zeta+eta)
Definition prefactors.h:103
std::shared_ptr< rdouble > zeta2[np][2]
squared orbital exponents
Definition prefactors.h:94
std::shared_ptr< rdouble > R12kG12VRR_pfac4[np][3]
cartesian components of pfac4 vector
Definition prefactors.h:140
std::shared_ptr< rdouble > rho_o_alpha12[np]
rho/alpha12
Definition prefactors.h:107
std::shared_ptr< rdouble > R12kG12VRR_pfac1[np]
prefactor in front of (a-1 0|c0)
Definition prefactors.h:132
std::shared_ptr< rdouble > vX_Y[np]
X-Y vectors, where X and Y are for the same particle: X_Y[0] = AB, X_Y[1] = CD, etc.
Definition prefactors.h:57
std::shared_ptr< rdouble > R12kG12VRR_pfac3[np]
prefactor in front of (|k-2|)
Definition prefactors.h:136
std::shared_ptr< rdouble > vY_X[np]
Y-X vectors, where X and Y are for the same particle: Y_X[0] = BA, Y_X[1] = DC, etc.
Definition prefactors.h:65
std::shared_ptr< rdouble > TwoPRepITR_vpfac0[np]
Prefactors for the ITR relation for TwoPRep integrals (a+1 0|c0):
Definition prefactors.h:116
std::shared_ptr< rdouble > TwoPRepITR_pfac1[np]
prefactor in front of (a0|c+1 0) = -alpha12[1]/alpha12[0]
Definition prefactors.h:120
std::shared_ptr< rdouble > Y_X[np][3]
Cartesian components of Y_X vectors.
Definition prefactors.h:67
std::shared_ptr< rdouble > vW_XY[np]
W-XY vectors: vW_XY[0] = W-P, vW_XY[1] = W-Q.
Definition prefactors.h:83
std::shared_ptr< rdouble > R12kG12VRR_vpfac4[np]
prefactor in front of (a0|k-2|c0)
Definition prefactors.h:138
std::shared_ptr< rdouble > alpha12[np]
alpha12[p] is the sum of exponents for particle p: alpha12[0] = zeta, alpha12[1] = eta.
Definition prefactors.h:101
std::shared_ptr< rdouble > Overlap00_1d[3]
Precomputed 1-d integrals.
Definition prefactors.h:146
std::shared_ptr< rdouble > TwoPRepITR_pfac0[np][3]
cartesian components of pfac0 vector
Definition prefactors.h:118
std::shared_ptr< rdouble > one_o_2alphasum
1/(2*(zeta+eta))
Definition prefactors.h:109
std::shared_ptr< rdouble > R12kG12VRR_pfac2
prefactor in front of (a0|c-1 0)
Definition prefactors.h:134
RTimeEntity is an Entity of type T that exists at runtime of the generated code (hence has no value k...
Definition entity.h:151
SingletonStack<T,KeyType> helps to implement Singleton-like objects of type T.
Definition singl_stack.h:45
auxiliary class that write expressions with compile-time cartesian vectors
Definition prefactors.h:267
auxiliary class that write expressions with runtime cartesian vectors
Definition prefactors.h:250
Defaults definitions for various parameters assumed by Libint.
Definition algebra.cc:24
Definition prefactors.h:181
Definition prefactors.h:163