|
Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
|
Encapsulates core logic for using Discrete Sine Transform (implemented in terms of FFTs) to solve Poisson's equation with isolated boundaries. More...
#include <PoissonZero3DBlockedGPU.hpp>
Public Member Functions | |
| PoissonZero3DBlockedGPU (const int n[3], const double lo[3], const double hi[3], const int m[3], const int id[3]) | |
| long | bytes () const |
| 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 buffer. | |
Encapsulates core logic for using Discrete Sine Transform (implemented in terms of FFTs) to solve Poisson's equation with isolated boundaries.
| void PoissonZero3DBlockedGPU::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 buffer.
This solver will NOT provide robust solutions for an arbitrary density field. To get a robust solution, the density field MUST correspond to a potential that satisfies the assumptions outlined in the documentation for this class as a whole
| [in] | bytes | The nominal sizes of the density and potential buffers. This must be at least as large as this->bytes(). |
| [in] | density | A device pointer to a buffer holding the values at each grid point corresponding to the RHS of Poisson's equation. After the input values are read from this buffer, it will be reused as scratch space. The contents of this buffer are unspecified once the calculation concludes. |
| [out] | potential | A device pointer to a buffer holding the computed gravitational potential. |
bytes argument is only used to ensure that the buffers are large enough to hold intermediate results. The logic for reading the input values from density and writing the final values of potential depend entirely on the values used to configure this and entirely ignore the bytes argument.