Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
Loading...
Searching...
No Matches
PoissonZero3DBlockedGPU.hpp
1#pragma once
2
3#include <mpi.h>
4
5#include "../../utils/gpu.hpp"
6
26{
27 public:
28 PoissonZero3DBlockedGPU(const int n[3], const double lo[3], const double hi[3], const int m[3], const int id[3]);
30
31 /* The minimum size of each buffer that is passed to `this->solve`*/
32 long bytes() const { return bytes_; }
33
59 void solve(long bytes, double *density, double *potential) const;
60
61 private:
62 double ddi_, ddj_, ddk_;
63 int idi_, idj_, idk_;
64 int mi_, mj_, mk_;
65 int ni_, nj_, nk_;
66 int mp_, mq_;
67 int idp_, idq_;
68 MPI_Comm commI_, commJ_, commK_;
69 int di_, dj_, dk_;
70 int dip_, djp_, djq_, dkq_;
71 int ni2_, nj2_, nk2_;
72 long bytes_;
73 cufftHandle d2zi_, d2zj_, d2zk_;
74#ifndef MPI_GPU
75 double *ha_, *hb_;
76#endif
77};
Encapsulates core logic for using Discrete Sine Transform (implemented in terms of FFTs) to solve Poi...
Definition PoissonZero3DBlockedGPU.hpp:26
void solve(long bytes, double *density, double *potential) const
Solve Possion's equation. To be memory efficient, this will reuse the density array as a scratch buff...