20 #ifndef _libint2_src_bin_libint_prefactors_h_ 21 #define _libint2_src_bin_libint_prefactors_h_ 24 #include <smart_ptr.h> 27 #include <singl_stack.h> 29 #define CTIMEENTITIES_SINGLETONS 1 47 static const unsigned int NMAX = 200;
48 static const unsigned int np = 2;
49 static const unsigned int nfunc_per_part = 1;
57 SafePtr<rdouble>
X_Y[np][3];
65 SafePtr<rdouble>
Y_X[np][3];
76 SafePtr<rdouble>
XY_X[np][2][3];
83 SafePtr<rdouble>
W_XY[np][3];
88 SafePtr<rdouble>
zeta[np][2];
146 #if CTIMEENTITIES_SINGLETONS 147 SafePtr<cdouble>
N_i[NMAX];
150 SafePtr<cdouble> Cdouble(
double a);
159 namespace prefactor {
163 static SafePtr<ManagerType>& Manager() {
169 static SafePtr<ManagerType> manager_;
173 #if CTIMEENTITIES_SINGLETONS 176 static SafePtr<ManagerType>& Manager() {
182 static SafePtr<ManagerType> manager_;
188 template <typename T, typename = typename std::enable_if<std::is_integral<T>::value>::type>
189 SafePtr< CTimeEntity<double> > Scalar(T a) {
191 SafePtr<return_type> tmp(
new return_type(a));
192 #if CTIMEENTITIES_SINGLETONS 194 typedef typename singletons_type::ManagerType
ManagerType;
195 const typename ManagerType::value_type& result = singletons_type::Manager()->
find(tmp);
196 return result.second;
202 inline SafePtr< CTimeEntity<double> > Scalar(
double a) {
204 SafePtr<return_type> tmp(
new return_type(a));
205 #if CTIMEENTITIES_SINGLETONS 207 typedef typename singletons_type::ManagerType
ManagerType;
208 const typename ManagerType::value_type& result = singletons_type::Manager()->
find(tmp);
209 return result.second;
225 inline SafePtr< RTimeEntity<double> > Scalar(
const std::string&
id) {
230 SafePtr<return_type> tmp(
new return_type(
id));
231 const ManagerType::value_type& result = singletons_type::Manager()->find(tmp);
232 return result.second;
240 SafePtr< RTimeEntity<T> > operator[](
unsigned int xyz) {
241 return Scalar(id_ +
"_" + dirchar[xyz]);
244 static const char* dirchar;
253 for(
int xyz=0; xyz<3; ++xyz) val_[xyz] = val[xyz];
255 SafePtr< CTimeEntity<T> > operator[](
unsigned int xyz) {
256 return Scalar(val_[xyz]);
263 #if 0 // these do not get resolved correctly by icpc 12 on OS X 269 template <
class T =
double>
RTimeVector3<T> Vector(
const std::string&
id)
286 double qn[3];
for(
unsigned int xyz=0; xyz<3; ++xyz) qn[xyz] = bf.
qn(xyz);
292 double d[3];
for(
unsigned int xyz=0; xyz<3; ++xyz) d[xyz] = dd.
d(xyz);
Definition: prefactors.h:161
SafePtr< rdouble > TwoPRepITR_vpfac0[np]
Prefactors for the ITR relation for TwoPRep integrals (a+1 0|c0):
Definition: prefactors.h:113
SingletonStack<T,KeyType> helps to implement Singleton-like objects of type T.
Definition: singl_stack.h:42
SafePtr< rdouble > R12kG12VRR_pfac2
prefactor in front of (a0|c-1 0)
Definition: prefactors.h:131
SafePtr< cdouble > N_i[NMAX]
integers represented as doubles
Definition: prefactors.h:148
auxiliary class that write expressions with runtime cartesian vectors
Definition: prefactors.h:236
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:55
CTimeEntity is an Entity of type T that exists at compile-time of the generated code (hence has a val...
Definition: entity.h:183
SafePtr< rdouble > Y_X[np][3]
Cartesian components of Y_X vectors.
Definition: prefactors.h:65
SafePtr< rdouble > zeta2[np][2]
squared orbital exponents
Definition: prefactors.h:92
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:23
SafePtr< rdouble > XY_X[np][2][3]
cartesian components of vXY_X vector
Definition: prefactors.h:76
Prefactors is a collection of common quantities which appear as prefactors in recurrence relations fo...
Definition: prefactors.h:39
SafePtr< rdouble > R12kG12VRR_pfac4[np][3]
cartesian components of pfac4 vector
Definition: prefactors.h:137
SafePtr< rdouble > one_o_2alpha12[np]
1/(2*alpha12)
Definition: prefactors.h:103
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:125
SafePtr< rdouble > W_XY[np][3]
cartesian components of W_XY vector
Definition: prefactors.h:83
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:74
SafePtr< rdouble > zeta[np][2]
orbital exponents
Definition: prefactors.h:88
unsigned int qn(unsigned int axis) const
Returns the quantum number along axis.
Definition: gauss.cc:141
RTimeEntity is an Entity of type T that exists at runtime of the generated code (hence has no value k...
Definition: entity.h:99
SafePtr< rdouble > vW_XY[np]
W-XY vectors: vW_XY[0] = W-P, vW_XY[1] = W-Q.
Definition: prefactors.h:81
const value_type & find(const SafePtr< T > &obj)
Returns the pointer to the unique instance of object obj.
Definition: singl_stack.h:79
SafePtr< rdouble > rho_o_alpha12[np]
rho/alpha12
Definition: prefactors.h:105
unsigned int d(unsigned int xyz) const
returns the number of quanta along xyz
Definition: bfset.h:125
SafePtr< rdouble > one_o_2alphasum
1/(2*(zeta+eta))
Definition: prefactors.h:107
SafePtr< rdouble > R12kG12VRR_vpfac4[np]
prefactor in front of (a0|k-2|c0)
Definition: prefactors.h:135
SafePtr< rdouble > R12kG12VRR_pfac0[np][3]
cartesian components of pfac0 vector
Definition: prefactors.h:127
auxiliary class that write expressions with compile-time cartesian vectors
Definition: prefactors.h:250
SafePtr< rdouble > R12kG12VRR_pfac1[np]
prefactor in front of (a-1 0|c0)
Definition: prefactors.h:129
SafePtr< rdouble > alpha12[np]
alpha12[p] is the sum of exponents for particle p: alpha12[0] = zeta, alpha12[1] = eta...
Definition: prefactors.h:99
Definition: prefactors.h:174
SafePtr< rdouble > Overlap00_1d[3]
Precomputed 1-d integrals.
Definition: prefactors.h:143
3D Cartesian Gaussian Function
Definition: bfset.h:320
SafePtr< rdouble > X_Y[np][3]
Cartesian components of X-Y vectors.
Definition: prefactors.h:57
SafePtr< rdouble > TwoPRepITR_pfac0[np][3]
cartesian components of pfac0 vector
Definition: prefactors.h:115
SafePtr< rdouble > TwoPRepITR_pfac1[np]
prefactor in front of (a0|c+1 0) = -alpha12[1]/alpha12[0]
Definition: prefactors.h:117
SafePtr< rdouble > R12kG12VRR_pfac3[np]
prefactor in front of (|k-2|)
Definition: prefactors.h:133
SafePtr< rdouble > rho
rho = zeta*eta/(zeta+eta)
Definition: prefactors.h:101
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:63