diff --git a/src/madness/mra/funcimpl.h b/src/madness/mra/funcimpl.h index 53c34893f35..44ff0b8e9f8 100644 --- a/src/madness/mra/funcimpl.h +++ b/src/madness/mra/funcimpl.h @@ -1184,7 +1184,7 @@ template T alpha; ///< the current function impl R beta; ///< prefactor for other function impl do_gaxpy_inplace() = default; - do_gaxpy_inplace(FunctionImpl* f, T alpha, R beta) : f(f), alpha(alpha), beta(beta) {} + do_gaxpy_inplace(FunctionImpl* f, T alpha, R beta) : f(f), alpha(alpha), beta(beta) {} bool operator()(typename rangeT::iterator& it) const { const keyT& key = it->first; const FunctionNode& other_node = it->second; @@ -1384,7 +1384,7 @@ template struct do_convert_to_color { double limit; bool log; - static double lower() { return 1.e-10; }; + static double lower() {return 1.e-10;}; do_convert_to_color() = default; do_convert_to_color(const double limit, const bool log) : limit(limit), log(log) {} double operator()(double val) const { @@ -2064,7 +2064,7 @@ template // fast return if the node has children (not a leaf node) if(node.has_children()) return; - const implT* g = this; + const implT* g=this; // break the 6D key into two 3D keys (may also work for every even dimension) Key key1, key2; @@ -3112,7 +3112,7 @@ template opT op; coeff_value_adaptor() = default; - coeff_value_adaptor(const FunctionImpl* impl_func, + coeff_value_adaptor(const FunctionImpl* impl_func, const opT& op) : impl_func(impl_func), op(op) {} @@ -5433,7 +5433,7 @@ template } resultT operator()(resultT a, resultT b) const { - return (a + b); + return (a+b); } template void serialize(const Archive& ar) { @@ -5636,7 +5636,7 @@ template template static void do_inner_localX(const typename mapT::iterator lstart, const typename mapT::iterator lend, - typename FunctionImpl::mapT* rmap_ptr, + typename FunctionImpl::mapT* rmap_ptr, const bool sym, Tensor< TENSOR_RESULT_TYPE(T,R) >* result_ptr, Mutex* mutex) { @@ -5651,7 +5651,7 @@ template const int nleft = leftv.size(); const int nright= rightv.size(); - for (int iv = 0; iv < nleft; iv++) { + for (int iv=0; iv* iptr = leftv[iv].second; @@ -5659,8 +5659,8 @@ template const int j = rightv[jv].first; const GenTensor* jptr = rightv[jv].second; - if (!sym || (sym && i <= j)) - r(i, j) += iptr->trace_conj(*jptr); + if (!sym || (sym && i<=j)) + r(i,j) += iptr->trace_conj(*jptr); } } } @@ -5673,7 +5673,7 @@ template template static void do_inner_localX(const typename mapT::iterator lstart, const typename mapT::iterator lend, - typename FunctionImpl::mapT* rmap_ptr, + typename FunctionImpl::mapT* rmap_ptr, const bool sym, Tensor< TENSOR_RESULT_TYPE(T,R) >* result_ptr, Mutex* mutex) { @@ -5817,10 +5817,10 @@ template // Rij += Aki*Bkj mapT lmap = make_key_vec_map(left); - typename FunctionImpl::mapT rmap; - auto* rmap_ptr = (typename FunctionImpl::mapT*)(&lmap); - if ((std::vector*>*)(&left) != &right) { - rmap = FunctionImpl::make_key_vec_map(right); + typename FunctionImpl::mapT rmap; + auto* rmap_ptr = (typename FunctionImpl::mapT*)(&lmap); + if ((std::vector*>*)(&left) != &right) { + rmap = FunctionImpl::make_key_vec_map(right); rmap_ptr = &rmap; } @@ -5829,7 +5829,7 @@ template Tensor< TENSOR_RESULT_TYPE(T,R) > r(left.size(), right.size()); Mutex mutex; - typename mapT::iterator lstart = lmap.begin(); + typename mapT::iterator lstart=lmap.begin(); while (lstart != lmap.end()) { typename mapT::iterator lend = lstart; advance(lend,chunk); diff --git a/src/madness/mra/vmra.h b/src/madness/mra/vmra.h index 96ecc373c3c..b3863bb52c5 100644 --- a/src/madness/mra/vmra.h +++ b/src/madness/mra/vmra.h @@ -924,7 +924,7 @@ namespace madness { int64_t jhi = std::min(jlo + jchunk, m); std::vector< Function > jvec(g.begin()+jlo, g.begin()+jhi); - Tensor P = matrix_inner(A.get_world(), ivec, jvec); + Tensor P = matrix_inner(A.get_world(), ivec, jvec); A.copy_from_replicated_patch(ilo, ihi - 1, jlo, jhi - 1, P); } } @@ -948,7 +948,6 @@ namespace madness { compress(world, g); - std::vector*> left(f.size()); std::vector*> right(g.size()); for (unsigned int i=0; i