Skip to content

Commit

Permalink
Minor formatting simplifications consistency changes in sym_grp.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Apr 3, 2024
1 parent d13762b commit 6f494f5
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions c++/nda/sym_grp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
#include <itertools/omp_chunk.hpp>

namespace nda {
/**
* A structure to capture combinations of complex conjugation and sign flip.
*/
/// A structure to capture combinations of complex conjugation and sign flip.
struct operation {
/*@{*/
bool sgn = false; /**< change sign? */
Expand Down Expand Up @@ -97,13 +95,13 @@ namespace nda {
/**
* Accessor for symmetry classes
* @return Vector including the individual classes
*/
*/
[[nodiscard]] std::vector<sym_class_t> const &get_sym_classes() const { return sym_classes; }

/**
* Accessor for number of symmetry classes
* @return Number of deduced symmetry classes
*/
*/
long num_classes() const { return sym_classes.size(); }

/**
Expand All @@ -112,7 +110,7 @@ namespace nda {
* @param x An NdArray
* @param init_func The init function to be used
* @param parallel Switch to enable parallel evaluation of init_func. Default is false
*/
*/
template <typename H>
requires(NdaInitFunc<H, A>)
void init(A &x, H const &init_func, bool parallel = false) const {
Expand All @@ -121,7 +119,7 @@ namespace nda {
// reset input array to allow for mpi reduction
x() = 0.0;

#pragma omp parallel
#pragma omp parallel
for (auto const &sym_class : itertools::omp_chunk(mpi::chunk(sym_classes))) {
auto idx = x.indexmap().to_idx(sym_class[0].first);
auto ref_val = init_func(idx);
Expand Down Expand Up @@ -206,17 +204,15 @@ namespace nda {
}
};

/**
* Default constructor for sym_grp class
*/
/// Default constructor for sym_grp class
sym_grp() = default;

/**
* Constructor for sym_grp class
* @param x An NdArray
* @param sym_list List of symmetries modeling the NdaSymmetry concept
* @param max_length Maximum recursion depth for out-of-bounds projection. Default is 0.
*/
*/
sym_grp(A const &x, std::vector<F> const &sym_list, long const max_length = 0) {

// array to check whether index has been sorted into a symmetry class already
Expand Down Expand Up @@ -278,4 +274,4 @@ namespace nda {
return segment_length;
}
};
} // namespace nda
} // namespace nda

0 comments on commit 6f494f5

Please sign in to comment.