Skip to content

Commit 44ea09d

Browse files
Merge pull request #647 from m-a-d-n-e-s-s/jm/bloch-fix
Prune Unused Code + More Descriptive Arguments
2 parents 1c17a48 + 900e2f8 commit 44ea09d

File tree

3 files changed

+8
-53
lines changed

3 files changed

+8
-53
lines changed

src/madness/chem/SCF.cc

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,29 +2135,6 @@ void SCF::orthonormalize(World& world, vecfuncT& amo_new) const {
21352135
}
21362136

21372137

2138-
complex_functionT APPLY(const complex_operatorT *q1d,
2139-
const complex_functionT& psi) {
2140-
complex_functionT r = psi; // Shallow copy violates constness !!!!!!!!!!!!!!!!!
2141-
coordT lo, hi;
2142-
lo[2] = -10;
2143-
hi[2] = +10;
2144-
2145-
r.reconstruct();
2146-
r.broaden();
2147-
r.broaden();
2148-
r.broaden();
2149-
r.broaden();
2150-
r = apply_1d_realspace_push(*q1d, r, 2);
2151-
r.sum_down();
2152-
r = apply_1d_realspace_push(*q1d, r, 1);
2153-
r.sum_down();
2154-
r = apply_1d_realspace_push(*q1d, r, 0);
2155-
r.sum_down();
2156-
2157-
return r;
2158-
}
2159-
2160-
21612138
// For given protocol, solve the DFT/HF/response equations
21622139
void SCF::solve(World& world) {
21632140
PROFILE_MEMBER_FUNC(SCF);

src/madness/chem/SCF.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ typedef SeparatedConvolution<double, 3> operatorT;
7878
typedef std::shared_ptr<operatorT> poperatorT;
7979
typedef Function<std::complex<double>, 3> complex_functionT;
8080
typedef std::vector<complex_functionT> cvecfuncT;
81-
typedef Convolution1D<double_complex> complex_operatorT;
8281

8382

8483
template<typename T, int NDIM>
@@ -492,27 +491,6 @@ class SCF {
492491

493492
void orthonormalize(World& world, vecfuncT& amo_new, int nocc) const;
494493

495-
complex_functionT APPLY(const complex_operatorT *q1d, const complex_functionT& psi) {
496-
complex_functionT r = psi; // Shallow copy violates constness !!!!!!!!!!!!!!!!!
497-
coordT lo, hi;
498-
lo[2] = -10;
499-
hi[2] = +10;
500-
501-
r.reconstruct();
502-
r.broaden();
503-
r.broaden();
504-
r.broaden();
505-
r.broaden();
506-
r = apply_1d_realspace_push(*q1d, r, 2);
507-
r.sum_down();
508-
r = apply_1d_realspace_push(*q1d, r, 1);
509-
r.sum_down();
510-
r = apply_1d_realspace_push(*q1d, r, 0);
511-
r.sum_down();
512-
513-
return r;
514-
}
515-
516494
// For given protocol, solve the DFT/HF/response equations
517495
void solve(World& world);
518496

src/madness/mra/operator.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ namespace madness {
11161116

11171117
/// WSTHORNTON Constructor for Gaussian Convolutions (mostly for backward compatability)
11181118
SeparatedConvolution(World& world,
1119-
Vector<double,NDIM> args,
1119+
Vector<double,NDIM> bloch_k,
11201120
const Tensor<Q>& coeff, const Tensor<double>& expnt,
11211121
const array_of_bools<NDIM>& lattice_summed = FunctionDefaults<NDIM>::get_bc().is_periodic(),
11221122
int k=FunctionDefaults<NDIM>::get_k(),
@@ -1145,7 +1145,7 @@ namespace madness {
11451145
double c2 = sqrt(expnt[mu]*width[d]*width[d]/madness::constants::pi);
11461146
std::shared_ptr<GaussianConvolution1D<double_complex> >
11471147
gcptr(new GaussianConvolution1D<double_complex>(k, c2,
1148-
expnt(mu)*width[d]*width[d], 0, lattice_summed[d], args[d]));
1148+
expnt(mu)*width[d]*width[d], 0, lattice_summed[d], bloch_k[d]));
11491149
ops[mu].setop(d,gcptr);
11501150
}
11511151
}
@@ -1773,7 +1773,7 @@ namespace madness {
17731773
static
17741774
inline
17751775
SeparatedConvolution<double_complex,3> PeriodicHFExchangeOperator(World& world,
1776-
Vector<double,3> args,
1776+
Vector<double,3> bloch_k,
17771777
double lo,
17781778
double eps,
17791779
const array_of_bools<3>& lattice_sum = FunctionDefaults<3>::get_bc().is_periodic(),
@@ -1795,7 +1795,7 @@ namespace madness {
17951795
fit.truncate_periodic_expansion(coeff, expnt, cell_width.max(), true);
17961796
}
17971797

1798-
return SeparatedConvolution<double_complex, 3>(world, args, coeff, expnt,
1798+
return SeparatedConvolution<double_complex, 3>(world, bloch_k, coeff, expnt,
17991799
lattice_sum, k, false);
18001800
}
18011801

@@ -1866,7 +1866,7 @@ namespace madness {
18661866
static
18671867
inline
18681868
SeparatedConvolution<double_complex,3> PeriodicBSHOperator3D(World& world,
1869-
Vector<double,3> args,
1869+
Vector<double,3> bloch_k,
18701870
double mu,
18711871
double lo,
18721872
double eps,
@@ -1889,14 +1889,14 @@ namespace madness {
18891889
if (lattice_sum_any) {
18901890
fit.truncate_periodic_expansion(coeff, expnt, cell_width.max(), false);
18911891
}
1892-
return SeparatedConvolution<double_complex, 3>(world, args, coeff, expnt,
1892+
return SeparatedConvolution<double_complex, 3>(world, bloch_k, coeff, expnt,
18931893
lattice_sum, k);
18941894
}
18951895

18961896
/// Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D
18971897
static inline
18981898
SeparatedConvolution<double_complex,3>* PeriodicBSHOperatorPtr3D(World& world,
1899-
Vector<double,3> args,
1899+
Vector<double,3> bloch_k,
19001900
double mu,
19011901
double lo,
19021902
double eps,
@@ -1919,7 +1919,7 @@ namespace madness {
19191919
if (lattice_sum_any) {
19201920
fit.truncate_periodic_expansion(coeff, expnt, cell_width.max(), false);
19211921
}
1922-
return new SeparatedConvolution<double_complex, 3>(world, args, coeff,
1922+
return new SeparatedConvolution<double_complex, 3>(world, bloch_k, coeff,
19231923
expnt, lattice_sum, k);
19241924
}
19251925

0 commit comments

Comments
 (0)