Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed Sep 23, 2024
1 parent 018ea25 commit c762689
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/Gauss.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ class LegendrePolynomial {
this->_r[i] = -this->_r[degree - i - 1];
this->_w[i] = this->_w[degree - i - 1];
});

tbb::parallel_for(static_cast<size_t>(0), degree, [&](const size_t i) { this->_r[i] = MP_PI_HALF * this->_r[i] + MP_PI_HALF; });
}

[[nodiscard]] mpreal root(const int i) const { return this->_r[i]; }
Expand All @@ -122,7 +120,7 @@ class Quadrature {
return tbb::parallel_deterministic_reduce(
tbb::blocked_range<int>(0, static_cast<int>(poly.degree)), mpreal(0, config.precision_bits),
[&](const tbb::blocked_range<int>& r, mpreal running_total) {
for(auto i = r.begin(); i < r.end(); ++i) running_total += poly.weight(i) * f(i, poly.root(i));
for(auto i = r.begin(); i < r.end(); ++i) running_total += poly.weight(i) * f(i, MP_PI_HALF * poly.root(i) + MP_PI_HALF);
return running_total;
},
std::plus<>());
Expand Down
2 changes: 1 addition & 1 deletion src/VPMR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class Integrand {
}
};

tbb::concurrent_unordered_map<int, mpreal> Integrand::value(config.quadrature_order);
tbb::concurrent_unordered_map<int, mpreal> Integrand::value(100);

using mat = Eigen::Matrix<mpreal, Eigen::Dynamic, Eigen::Dynamic>;
using vec = Eigen::Matrix<mpreal, Eigen::Dynamic, 1>;
Expand Down

0 comments on commit c762689

Please sign in to comment.