Skip to content

Commit

Permalink
[σpVσp] completed W0 CR
Browse files Browse the repository at this point in the history
  • Loading branch information
evaleev committed Nov 17, 2023
1 parent 12c304b commit ba3d612
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/bin/libint/comp_1_σpVσp_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,23 @@ CR_1_σpVσp_1<F>::CR_1_σpVσp_1(const SafePtr< TargetType >& Tint,
GenIntegralSet_1_1<BasisFunctionType, ElecPotOper, mType>>
factory(this);

F Dx_a{a}; Dx_a.deriv().inc(1);
F Dx_b{b}; Dx_b.deriv().inc(1);
constexpr auto x = 0;
constexpr auto y = 1;
constexpr auto z = 2;

// (a|W0|b) = (d a/dAx | V | d b/dBx) + (d a/dAy | V | d b/dBy) + (d a/dAz | V | d b/dBz)
F Dx_a{a}; Dx_a.deriv().inc(x);
F Dx_b{b}; Dx_b.deriv().inc(x);
auto Dx_a_V_Dx_b = factory.make_child(Dx_a, Dx_b, zero_m);
F Dy_a{a}; Dy_a.deriv().inc(y);
F Dy_b{b}; Dy_b.deriv().inc(y);
auto Dy_a_V_Dy_b = factory.make_child(Dy_a, Dy_b, zero_m);
F Dz_a{a}; Dz_a.deriv().inc(z);
F Dz_b{b}; Dz_b.deriv().inc(z);
auto Dz_a_V_Dz_b = factory.make_child(Dz_a, Dz_b, zero_m);
if (is_simple()) {
expr_ = Dx_a_V_Dx_b; // smth like this
nflops_ += 0;
expr_ = Scalar(-1)*(Dx_a_V_Dx_b + Dy_a_V_Dy_b + Dz_a_V_Dz_b); // smth like this
nflops_ += 3;
}
} // CR_1_σpVσp_1<F>::CR_1_σpVσp_1

Expand Down

0 comments on commit ba3d612

Please sign in to comment.