Skip to content

Commit

Permalink
Final formatting reverts
Browse files Browse the repository at this point in the history
  • Loading branch information
EricaCMitchell committed Dec 18, 2024
1 parent 12810bd commit eeb5988
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
30 changes: 15 additions & 15 deletions src/madness/mra/funcimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ template<size_t NDIM>
T alpha; ///< the current function impl
R beta; ///< prefactor for other function impl
do_gaxpy_inplace() = default;
do_gaxpy_inplace(FunctionImpl<T, NDIM>* f, T alpha, R beta) : f(f), alpha(alpha), beta(beta) {}
do_gaxpy_inplace(FunctionImpl<T,NDIM>* 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<Q,NDIM>& other_node = it->second;
Expand Down Expand Up @@ -1384,7 +1384,7 @@ template<size_t NDIM>
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 {
Expand Down Expand Up @@ -2064,7 +2064,7 @@ template<size_t NDIM>
// 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<LDIM> key1, key2;
Expand Down Expand Up @@ -3112,7 +3112,7 @@ template<size_t NDIM>
opT op;

coeff_value_adaptor() = default;
coeff_value_adaptor(const FunctionImpl<Q, NDIM>* impl_func,
coeff_value_adaptor(const FunctionImpl<Q,NDIM>* impl_func,
const opT& op)
: impl_func(impl_func), op(op) {}

Expand Down Expand Up @@ -5433,7 +5433,7 @@ template<size_t NDIM>
}

resultT operator()(resultT a, resultT b) const {
return (a + b);
return (a+b);
}

template <typename Archive> void serialize(const Archive& ar) {
Expand Down Expand Up @@ -5636,7 +5636,7 @@ template<size_t NDIM>
template <typename R>
static void do_inner_localX(const typename mapT::iterator lstart,
const typename mapT::iterator lend,
typename FunctionImpl<R, NDIM>::mapT* rmap_ptr,
typename FunctionImpl<R,NDIM>::mapT* rmap_ptr,
const bool sym,
Tensor< TENSOR_RESULT_TYPE(T,R) >* result_ptr,
Mutex* mutex) {
Expand All @@ -5651,16 +5651,16 @@ template<size_t NDIM>
const int nleft = leftv.size();
const int nright= rightv.size();

for (int iv = 0; iv < nleft; iv++) {
for (int iv=0; iv<nleft; iv++) {
const int i = leftv[iv].first;
const GenTensor<T>* iptr = leftv[iv].second;

for (int jv=0; jv<nright; jv++) {
const int j = rightv[jv].first;
const GenTensor<R>* 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);
}
}
}
Expand All @@ -5673,7 +5673,7 @@ template<size_t NDIM>
template <typename R>
static void do_inner_localX(const typename mapT::iterator lstart,
const typename mapT::iterator lend,
typename FunctionImpl<R, NDIM>::mapT* rmap_ptr,
typename FunctionImpl<R,NDIM>::mapT* rmap_ptr,
const bool sym,
Tensor< TENSOR_RESULT_TYPE(T,R) >* result_ptr,
Mutex* mutex) {
Expand Down Expand Up @@ -5817,10 +5817,10 @@ template<size_t NDIM>
// Rij += Aki*Bkj

mapT lmap = make_key_vec_map(left);
typename FunctionImpl<R, NDIM>::mapT rmap;
auto* rmap_ptr = (typename FunctionImpl<R, NDIM>::mapT*)(&lmap);
if ((std::vector<const FunctionImpl<R, NDIM>*>*)(&left) != &right) {
rmap = FunctionImpl<R, NDIM>::make_key_vec_map(right);
typename FunctionImpl<R,NDIM>::mapT rmap;
auto* rmap_ptr = (typename FunctionImpl<R,NDIM>::mapT*)(&lmap);
if ((std::vector<const FunctionImpl<R,NDIM>*>*)(&left) != &right) {
rmap = FunctionImpl<R,NDIM>::make_key_vec_map(right);
rmap_ptr = &rmap;
}

Expand All @@ -5829,7 +5829,7 @@ template<size_t NDIM>
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);
Expand Down
3 changes: 1 addition & 2 deletions src/madness/mra/vmra.h
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ namespace madness {
int64_t jhi = std::min(jlo + jchunk, m);
std::vector< Function<T,NDIM> > jvec(g.begin()+jlo, g.begin()+jhi);

Tensor<T> P = matrix_inner(A.get_world(), ivec, jvec);
Tensor<T> P = matrix_inner(A.get_world(), ivec, jvec);
A.copy_from_replicated_patch(ilo, ihi - 1, jlo, jhi - 1, P);
}
}
Expand All @@ -948,7 +948,6 @@ namespace madness {
compress(world, g);



std::vector<const FunctionImpl<T,NDIM>*> left(f.size());
std::vector<const FunctionImpl<R,NDIM>*> right(g.size());
for (unsigned int i=0; i<f.size(); i++) left[i] = f[i].get_impl().get();
Expand Down

0 comments on commit eeb5988

Please sign in to comment.