mirror of
https://github.com/cosmo-sims/monofonIC.git
synced 2024-09-19 17:03:45 +02:00
Fixed compiler errors with gcc6. Tested with gcc 6.2, 8.2, 9.3, and 10.2, no errors or warnings.
This commit is contained in:
parent
fd8c661e23
commit
3bead20876
2 changed files with 4 additions and 4 deletions
|
@ -813,7 +813,7 @@ public:
|
|||
{
|
||||
FourierTransformForward();
|
||||
apply_function_k_dep([&](auto x, auto k) -> ccomplex_t {
|
||||
real_t shift = s.x * k[0] * get_dx()[0] + s.y * k[1] * get_dx()[1] + s.z * k[2] * get_dx()[2];
|
||||
real_t shift = s.x * k[0] * this->get_dx()[0] + s.y * k[1] * this->get_dx()[1] + s.z * k[2] * this->get_dx()[2];
|
||||
return x * std::exp(ccomplex_t(0.0, shift));
|
||||
});
|
||||
if( transform_back ){
|
||||
|
|
|
@ -162,12 +162,12 @@ struct grid_interpolate
|
|||
if (is_distributed_trait)
|
||||
{
|
||||
#if defined(USE_MPI)
|
||||
std::sort(pos.begin(), pos.end(), [&](auto x1, auto x2) { return get_task(x1) < get_task(x2); });
|
||||
std::sort(pos.begin(), pos.end(), [&](auto x1, auto x2) { return this->get_task(x1) < this->get_task(x2); });
|
||||
std::vector<int> sendcounts(MPI::get_size(), 0), sendoffsets(MPI::get_size(), 0);
|
||||
std::vector<int> recvcounts(MPI::get_size(), 0), recvoffsets(MPI::get_size(), 0);
|
||||
for (auto x : pos)
|
||||
{
|
||||
sendcounts[get_task(x)] += 3;
|
||||
sendcounts[this->get_task(x)] += 3;
|
||||
}
|
||||
|
||||
MPI_Alltoall(&sendcounts[0], 1, MPI_INT, &recvcounts[0], 1, MPI_INT, MPI_COMM_WORLD);
|
||||
|
|
Loading…
Reference in a new issue