A solver for the Poisson equation for 1D, 2D and 3D regular grids is presented. The solver applies the convolution theorem in order to efficiently solve the Poisson equation in spectral space over a rectangular computational domain. Conversion to and from the spectral space is achieved through the use of discrete Fourier transforms, allowing for the application of highly optimised O(NlogN) algorithms. The data structure is configured to be modular such that the underlying interface for operations to, from and within the spectral space may be interchanged. For computationally demanding tasks, the library is optimised by making use of parallel processing architectures. A range of boundary conditions can be applied to the domain including periodic, Dirichlet, Neumann and fully unbounded. In the case of Neumann and Dirichlet boundary conditions, arbitrary inhomogeneous boundary conditions may be specified. The desired solution may be found either on regular (cell-boundary) or staggered (cell-centre) grid configurations. For problems with periodic, Dirichlet or Neumann boundary conditions either a pseudo-spectral or a second-order finite difference operator may be applied. For unbounded boundary conditions a range of Green's functions are available. In addition to this, a range of differential operators may be applied in the spectral space in order to treat different forms of the Poisson equation or to extract highly accurate gradients of the input fields. The underlying framework of the solver is first detailed, followed by a range of validations for each of the available boundary condition types. Finally, the performance of the library is investigated. The code is free and publicly available under a GNU v3.0 license.
翻译:演示 1D、 2D 和 3D 常规网格的 Poisson 方程式的求解器 。 求解器应用折叠式理论, 以便在矩形计算域中高效解决光谱空间中的 Poisson 方程式 。 通过使用离散的 Fourier 变换, 允许应用高度优化的 O( NlogN) 方程式。 数据结构的配置是模块化的, 这样可以将运行到光谱空间空间空间的基界面进行交换。 对于计算要求的任务, 图书馆通过使用平行处理结构来优化。 一系列的边界条件可以适用于域, 包括定期、 Dirichlet、 Neumann 和完全无界。 在 Neubmann 和 Drichlet 的边界条件中, 任意的不均匀的 O( NlogN) 边框条件。 理想的解决方案可以在常规( 缩放) 或平流直径直径( cell- centreate) 方格配置中找到。 在定期、 Dirichlet 或中应用的直径方程式的直径方程式中, 或中, 直径方程式的运行的运行的运行的运行的运行的运行运行运行的运行的运行的运行运行运行的运行运行的运行的运行的运行的运行的运行线程中, 可能是在GLLLLLLLM 的运行的运行的运行的运行的运行到可自由的运行到的运行范围程中, 。