20 #ifndef _libint2_src_bin_libint_cr11r1dotr1g1211_h_ 21 #define _libint2_src_bin_libint_cr11r1dotr1g1211_h_ 33 #include <r1dotr1g12_11_11.h> 36 #include <prefactors.h> 38 #include <default_params.h> 49 template <
template <
class>
class I,
class BFSet>
57 typedef I<BFSet> TargetType;
65 static SafePtr<ThisType> Instance(
const SafePtr<TargetType>&);
71 SafePtr<TargetType>
target()
const {
return target_; };
73 SafePtr<ChildType> child(
unsigned int i)
const;
75 SafePtr<DGVertex>
rr_target()
const {
return static_pointer_cast<
DGVertex,TargetType>(target()); }
77 SafePtr<DGVertex>
rr_child(
unsigned int i)
const {
return dynamic_pointer_cast<
DGVertex,ChildType>(child(i)); }
92 bool register_with_rrstack()
const;
96 static const unsigned int max_nchildren_ = 18;
97 SafePtr<TargetType> target_;
98 SafePtr<ChildType> children_[max_nchildren_];
99 unsigned int nchildren_;
101 std::string generate_label()
const 104 os <<
"RR ( " << rr_target()->label() <<
" )";
111 template <
template <
class>
class I,
class F>
112 SafePtr< CR_11_R1dotR1G12_11<I,F> >
115 SafePtr<ThisType> this_ptr(
new ThisType(Tint));
117 if (this_ptr->num_children() != 0) {
118 this_ptr->register_with_rrstack<
ThisType>();
121 return SafePtr<ThisType>();
124 template <
template <
class>
class I,
class F>
128 F sh_a(Tint->bra(0,0));
129 F sh_b(Tint->ket(0,0));
130 F sh_c(Tint->bra(1,0));
131 F sh_d(Tint->ket(1,0));
140 vector<F>* bra_ref = &bra;
141 vector<F>* ket_ref = &ket;
143 const unsigned int ndirs = is_simple() ? 3 : 1;
144 for(
int xyz=0; xyz<ndirs; xyz++) {
147 bra_ref->operator[](0).inc(xyz);
148 ket_ref->operator[](0).inc(xyz);
149 int next_child = nchildren_;
150 children_[next_child] = ChildType::Instance(bra[0],ket[0],bra[1],ket[1],0);
154 SafePtr<ExprType> expr0_ptr(
new ExprType(ExprType::OperatorTypes::Times,Scalar(1.0),rr_child(next_child)));
158 bra_ref->operator[](0).dec(xyz);
159 ket_ref->operator[](0).dec(xyz);
163 template <
template <
class>
class I,
class F>
164 SafePtr< typename CR_11_R1dotR1G12_11<I,F>::ChildType >
167 assert(i>=0 && i<nchildren_);
169 for(
int c=0; c<max_nchildren_; c++) {
170 if (children_[c] != 0) {
TrivialBFSet<T> defines static member result, which is true if T is a basis function set consisting o...
Definition: bfset.h:879
RecurrenceRelation::ExprType ExprType
The type of expressions in which RecurrenceRelations result.
Definition: comp_11_r1dotr1g12_11.h:60
SafePtr< DGVertex > rr_child(unsigned int i) const
Implementation of RecurrenceRelation::rr_child()
Definition: comp_11_r1dotr1g12_11.h:77
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:23
Definition: stdarray.h:18
This is a vertex of a Directed Graph (DG)
Definition: dgvertex.h:42
SafePtr< TargetType > target() const
target() returns pointer to the i-th child
Definition: comp_11_r1dotr1g12_11.h:71
AlgebraicOperator is an algebraic operator that acts on objects of type T.
Definition: algebra.h:47
RecurrenceRelation describes all recurrence relations.
Definition: rr.h:100
Set of basis functions.
Definition: bfset.h:41
unsigned int num_children() const
Implementation of RecurrenceRelation::num_children()
Definition: comp_11_r1dotr1g12_11.h:69
bool is_simple() const
Implementation of RecurrenceRelation::is_simple()
Definition: comp_11_r1dotr1g12_11.h:79
Compute relation for 2-e integrals of the r1.r1 x G12 operators.
Definition: comp_11_r1dotr1g12_11.h:50
SafePtr< DGVertex > rr_target() const
Implementation of RecurrenceRelation::rr_target()
Definition: comp_11_r1dotr1g12_11.h:75
Definition: integral_decl.h:37