Convolution-based solver for open boundary conditions using Green's functions.
More...
|
| | OpenBCSolver (Box const &domain, Info const &info=Info{}) |
| | Build a solver over domain using the FFT Info settings in info.
|
| |
| template<class F > |
| void | setGreensFunction (F const &greens_function) |
| | Populate the spectral Green's function used by subsequent solves.
|
| |
| void | solve (MF &phi, MF const &rho) |
| | Solve for phi given right-hand side rho.
|
| |
| Box const & | Domain () const |
| | Access the physical domain this solver was built for.
|
| |
| IntVect const & | PaddedLength () const |
| | Access the one-sided padded length used to build the internal FFT domain.
|
| |
| cMF & | greensFunctionFFT () noexcept |
| | Access the spectral Green's function held by this solver.
|
| |
| cMF const & | greensFunctionFFT () const noexcept |
| | Access the spectral Green's function held by this solver.
|
| |
template<typename T = Real>
class amrex::FFT::OpenBCSolver< T >
Convolution-based solver for open boundary conditions using Green's functions.
The class wraps an internal R2C plan and multiplies spectral data by a user-provided Green's function to solve Laplace/Poisson problems on a rectangular domain. It currently solves one right-hand-side component per call; the supplied FFT::Info must have batch_size == 1.
template<typename T = Real>
Access the spectral Green's function held by this solver.
This lets a caller keep its own set of Green's functions and move them into and out of the solver, for instance with std::swap, instead of recomputing them with setGreensFunction(). Since solve() only reads the spectral Green's function, one moved in this way needs no further preparation.
- Note
- In 2D, this is an alias of the Green's function R2C's spectral data. Callers may write through it, but must not swap or otherwise re-seat it, because a later setGreensFunction() writes into the aliased array.
- Returns
- The spectral Green's function.