21 #ifndef _libint2_src_bin_libint_prefactors_h_ 22 #define _libint2_src_bin_libint_prefactors_h_ 25 #include <smart_ptr.h> 28 #include <singl_stack.h> 30 #define CTIMEENTITIES_SINGLETONS 1 48 static const unsigned int NMAX = 200;
49 static const unsigned int np = 2;
50 static const unsigned int nfunc_per_part = 1;
58 SafePtr<rdouble>
X_Y[np][3];
66 SafePtr<rdouble>
Y_X[np][3];
77 SafePtr<rdouble>
XY_X[np][2][3];
84 SafePtr<rdouble>
W_XY[np][3];
89 SafePtr<rdouble>
zeta[np][2];
147 #if CTIMEENTITIES_SINGLETONS 148 SafePtr<cdouble>
N_i[NMAX];
151 SafePtr<cdouble> Cdouble(
double a);
160 namespace prefactor {
164 static SafePtr<ManagerType>& Manager() {
170 static SafePtr<ManagerType> manager_;
174 #if CTIMEENTITIES_SINGLETONS 177 static SafePtr<ManagerType>& Manager() {
183 static SafePtr<ManagerType> manager_;
189 template <typename T, typename = typename std::enable_if<std::is_integral<T>::value>::type>
190 SafePtr< CTimeEntity<double> > Scalar(T a) {
192 SafePtr<return_type> tmp(
new return_type(a));
193 #if CTIMEENTITIES_SINGLETONS 195 typedef typename singletons_type::ManagerType ManagerType;
196 const typename ManagerType::value_type& result = singletons_type::Manager()->find(tmp);
197 return result.second;
203 inline SafePtr< CTimeEntity<double> > Scalar(
double a) {
205 SafePtr<return_type> tmp(
new return_type(a));
206 #if CTIMEENTITIES_SINGLETONS 207 typedef CTimeSingletons<double> singletons_type;
208 typedef typename singletons_type::ManagerType ManagerType;
209 const typename ManagerType::value_type& result = singletons_type::Manager()->find(tmp);
210 return result.second;
226 inline SafePtr< RTimeEntity<double> > Scalar(
const std::string&
id) {
228 typedef RTimeEntity<T> return_type;
229 typedef RTimeSingletons<T> singletons_type;
230 typedef singletons_type::ManagerType ManagerType;
231 SafePtr<return_type> tmp(
new return_type(
id));
232 const ManagerType::value_type& result = singletons_type::Manager()->find(tmp);
233 return result.second;
241 SafePtr< RTimeEntity<T> > operator[](
unsigned int xyz) {
242 return Scalar(id_ +
"_" + dirchar[xyz]);
245 static const char* dirchar;
254 for(
int xyz=0; xyz<3; ++xyz) val_[xyz] = val[xyz];
256 SafePtr< CTimeEntity<T> > operator[](
unsigned int xyz) {
257 return Scalar(val_[xyz]);
264 #if 0 // these do not get resolved correctly by icpc 12 on OS X 270 template <
class T =
double> RTimeVector3<T> Vector(
const std::string&
id)
272 return RTimeVector3<T>(
id);
275 template <
class T =
double> CTimeVector3<T> Vector(
const T* a)
277 return CTimeVector3<T>(a);
280 inline RTimeVector3<double> Vector(
const char*
id)
282 return RTimeVector3<double>(
id);
285 inline CTimeVector3<double> Vector(
const CGF& bf)
287 double qn[3];
for(
unsigned int xyz=0; xyz<3; ++xyz) qn[xyz] = bf.qn(xyz);
288 return CTimeVector3<double>(qn);
291 inline CTimeVector3<double> Vector(
const OriginDerivative<3u>& dd)
293 double d[3];
for(
unsigned int xyz=0; xyz<3; ++xyz) d[xyz] = dd.d(xyz);
294 return CTimeVector3<double>(d);
Definition: prefactors.h:162
SafePtr< rdouble > TwoPRepITR_vpfac0[np]
Prefactors for the ITR relation for TwoPRep integrals (a+1 0|c0):
Definition: prefactors.h:114
SingletonStack<T,KeyType> helps to implement Singleton-like objects of type T.
Definition: singl_stack.h:43
SafePtr< rdouble > R12kG12VRR_pfac2
prefactor in front of (a0|c-1 0)
Definition: prefactors.h:132
SafePtr< cdouble > N_i[NMAX]
integers represented as doubles
Definition: prefactors.h:149
auxiliary class that write expressions with runtime cartesian vectors
Definition: prefactors.h:237
SafePtr< 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:56
CTimeEntity is an Entity of type T that exists at compile-time of the generated code (hence has a val...
Definition: entity.h:186
SafePtr< rdouble > Y_X[np][3]
Cartesian components of Y_X vectors.
Definition: prefactors.h:66
SafePtr< rdouble > zeta2[np][2]
squared orbital exponents
Definition: prefactors.h:93
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:24
SafePtr< rdouble > XY_X[np][2][3]
cartesian components of vXY_X vector
Definition: prefactors.h:77
Prefactors is a collection of common quantities which appear as prefactors in recurrence relations fo...
Definition: prefactors.h:40
SafePtr< rdouble > R12kG12VRR_pfac4[np][3]
cartesian components of pfac4 vector
Definition: prefactors.h:138
SafePtr< rdouble > one_o_2alpha12[np]
1/(2*alpha12)
Definition: prefactors.h:104
SafePtr< 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:126
SafePtr< rdouble > W_XY[np][3]
cartesian components of W_XY vector
Definition: prefactors.h:84
SafePtr< 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:75
SafePtr< rdouble > zeta[np][2]
orbital exponents
Definition: prefactors.h:89
RTimeEntity is an Entity of type T that exists at runtime of the generated code (hence has no value k...
Definition: entity.h:102
SafePtr< rdouble > vW_XY[np]
W-XY vectors: vW_XY[0] = W-P, vW_XY[1] = W-Q.
Definition: prefactors.h:82
SafePtr< rdouble > rho_o_alpha12[np]
rho/alpha12
Definition: prefactors.h:106
SafePtr< rdouble > one_o_2alphasum
1/(2*(zeta+eta))
Definition: prefactors.h:108
SafePtr< rdouble > R12kG12VRR_vpfac4[np]
prefactor in front of (a0|k-2|c0)
Definition: prefactors.h:136
SafePtr< rdouble > R12kG12VRR_pfac0[np][3]
cartesian components of pfac0 vector
Definition: prefactors.h:128
auxiliary class that write expressions with compile-time cartesian vectors
Definition: prefactors.h:251
SafePtr< rdouble > R12kG12VRR_pfac1[np]
prefactor in front of (a-1 0|c0)
Definition: prefactors.h:130
SafePtr< rdouble > alpha12[np]
alpha12[p] is the sum of exponents for particle p: alpha12[0] = zeta, alpha12[1] = eta.
Definition: prefactors.h:100
Definition: prefactors.h:175
SafePtr< rdouble > Overlap00_1d[3]
Precomputed 1-d integrals.
Definition: prefactors.h:144
SafePtr< rdouble > X_Y[np][3]
Cartesian components of X-Y vectors.
Definition: prefactors.h:58
SafePtr< rdouble > TwoPRepITR_pfac0[np][3]
cartesian components of pfac0 vector
Definition: prefactors.h:116
SafePtr< rdouble > TwoPRepITR_pfac1[np]
prefactor in front of (a0|c+1 0) = -alpha12[1]/alpha12[0]
Definition: prefactors.h:118
SafePtr< rdouble > R12kG12VRR_pfac3[np]
prefactor in front of (|k-2|)
Definition: prefactors.h:134
SafePtr< rdouble > rho
rho = zeta*eta/(zeta+eta)
Definition: prefactors.h:102
SafePtr< 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:64