Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::FFT::OpenBCSolver< T > Class Template Reference

Convolution-based solver for open boundary conditions using Green's functions. More...

#include <AMReX_FFT_OpenBCSolver.H>

Public Types

using MF = typename R2C< T >::MF
 
using cMF = typename R2C< T >::cMF
 

Public Member Functions

 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.
 

Detailed Description

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.

Member Typedef Documentation

◆ cMF

template<typename T = Real>
using amrex::FFT::OpenBCSolver< T >::cMF = typename R2C<T>::cMF

◆ MF

template<typename T = Real>
using amrex::FFT::OpenBCSolver< T >::MF = typename R2C<T>::MF

Constructor & Destructor Documentation

◆ OpenBCSolver()

template<typename T >
amrex::FFT::OpenBCSolver< T >::OpenBCSolver ( Box const &  domain,
Info const &  info = Info{} 
)
explicit

Build a solver over domain using the FFT Info settings in info.

Parameters
domainPhysical domain (cell or nodal indexing).
infoOptional FFT configuration (domain strategy, batching, etc.).

Member Function Documentation

◆ Domain()

template<typename T = Real>
Box const & amrex::FFT::OpenBCSolver< T >::Domain ( ) const
inline

Access the physical domain this solver was built for.

Returns
Original (un-extended) problem domain.

◆ setGreensFunction()

template<typename T >
template<class F >
void amrex::FFT::OpenBCSolver< T >::setGreensFunction ( F const &  greens_function)

Populate the spectral Green's function used by subsequent solves.

Template Parameters
FCallable type satisfying T(int i, int j, int k).
Parameters
greens_functionFunctor that evaluates the physical-space Green's function.

◆ solve()

template<typename T >
void amrex::FFT::OpenBCSolver< T >::solve ( MF phi,
MF const &  rho 
)

Solve for phi given right-hand side rho.

Parameters
phiSolution MultiFab (overwritten in place).
rhoRight-hand-side MultiFab.

The documentation for this class was generated from the following file: