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

3D Poisson solver for periodic, Dirichlet & Neumann boundaries in the first two dimensions, and Dirichlet & Neumann in the last dimension. The last dimension could have non-uniform mesh. More...

#include <AMReX_FFT_Poisson.H>

Public Types

using T = typename MF::value_type
 

Public Member Functions

template<typename FA = MF, std::enable_if_t< IsFabArray_v< FA >, int > = 0>
 PoissonHybrid (Geometry const &geom, Array< std::pair< Boundary, Boundary >, 3 > const &bc)
 Construct the hybrid Poisson solver (mixed BCs in z with optional nonuniform spacing).
 
void solve (MF &soln, MF const &rhs)
 Solve del dot grad soln = rhs for uniform spacing in all directions.
 
void solve (MF &soln, MF const &rhs, Vector< T > const &dz)
 Solve with user-specified layer spacing in the heterogeneous dimension.
 
void solve (MF &soln, MF const &rhs, Gpu::DeviceVector< T > const &dz)
 GPU-resident overload that accepts device storage for dz.
 
void solve_2d (MF &a_soln, MF const &a_rhs)
 Solve an independent 2-D Poisson problem on every z-plane.
 
template<typename TRIA , typename TRIC >
void solve (MF &a_soln, MF const &a_rhs, TRIA const &tria, TRIC const &tric)
 Solve using arbitrary tridiagonal coefficients along the hybrid dimension.
 
template<typename FA , typename TRIA , typename TRIC >
void solve_z (FA &spmf, TRIA const &tria, TRIC const &tric)
 CUDA helper that applies the supplied tridiagonal operator along z.
 
std::pair< BoxArray, DistributionMappinggetSpectralDataLayout () const
 Layout information for spectral storage used by the hybrid solver.
 

Detailed Description

template<typename MF = MultiFab>
class amrex::FFT::PoissonHybrid< MF >

3D Poisson solver for periodic, Dirichlet & Neumann boundaries in the first two dimensions, and Dirichlet & Neumann in the last dimension. The last dimension could have non-uniform mesh.

Member Typedef Documentation

◆ T

template<typename MF = MultiFab>
using amrex::FFT::PoissonHybrid< MF >::T = typename MF::value_type

Constructor & Destructor Documentation

◆ PoissonHybrid()

template<typename MF = MultiFab>
template<typename FA = MF, std::enable_if_t< IsFabArray_v< FA >, int > = 0>
amrex::FFT::PoissonHybrid< MF >::PoissonHybrid ( Geometry const &  geom,
Array< std::pair< Boundary, Boundary >, 3 > const &  bc 
)
inline

Construct the hybrid Poisson solver (mixed BCs in z with optional nonuniform spacing).

Parameters
geomGeometry describing domain and spacing.
bcBoundary descriptors for each direction.

Member Function Documentation

◆ getSpectralDataLayout()

template<typename MF >
std::pair< BoxArray, DistributionMapping > amrex::FFT::PoissonHybrid< MF >::getSpectralDataLayout ( ) const

Layout information for spectral storage used by the hybrid solver.

Returns
BoxArray/DistributionMapping pair describing the complex space decomposition.

◆ solve() [1/4]

template<typename MF >
template<typename TRIA , typename TRIC >
void amrex::FFT::PoissonHybrid< MF >::solve ( MF &  a_soln,
MF const &  a_rhs,
TRIA const &  tria,
TRIC const &  tric 
)

Solve using arbitrary tridiagonal coefficients along the hybrid dimension.

Parameters
a_solnSolution MultiFab.
a_rhsRight-hand side MultiFab.
triaFunctor providing sub-diagonal coefficients.
tricFunctor providing super-diagonal coefficients.

◆ solve() [2/4]

template<typename MF >
void amrex::FFT::PoissonHybrid< MF >::solve ( MF &  soln,
MF const &  rhs 
)

Solve del dot grad soln = rhs for uniform spacing in all directions.

If soln has ghost cells, one layer of ghost cells will be filled except for the domain-corner ghost zones the stencil does not use.

Parameters
solnSolution MultiFab.
rhsRight-hand side MultiFab.

◆ solve() [3/4]

template<typename MF >
void amrex::FFT::PoissonHybrid< MF >::solve ( MF &  soln,
MF const &  rhs,
Gpu::DeviceVector< T > const &  dz 
)

GPU-resident overload that accepts device storage for dz.

Parameters
solnSolution MultiFab.
rhsRight-hand side MultiFab.
dzDevice vector of cell spacings along the hybrid dimension.

◆ solve() [4/4]

template<typename MF >
void amrex::FFT::PoissonHybrid< MF >::solve ( MF &  soln,
MF const &  rhs,
Vector< T > const &  dz 
)

Solve with user-specified layer spacing in the heterogeneous dimension.

Parameters
solnSolution MultiFab.
rhsRight-hand side MultiFab.
dzVector of cell spacings along the hybrid dimension.

◆ solve_2d()

template<typename MF >
void amrex::FFT::PoissonHybrid< MF >::solve_2d ( MF &  a_soln,
MF const &  a_rhs 
)

Solve an independent 2-D Poisson problem on every z-plane.

Parameters
a_solnSolution MultiFab (updated plane-by-plane).
a_rhsRight-hand side MultiFab.

◆ solve_z()

template<typename MF >
template<typename FA , typename TRIA , typename TRIC >
void amrex::FFT::PoissonHybrid< MF >::solve_z ( FA &  spmf,
TRIA const &  tria,
TRIC const &  tric 
)

CUDA helper that applies the supplied tridiagonal operator along z.

Parameters
spmfSpectral MultiFab (either real or complex flavor).
triaSub-diagonal functor.
tricSuper-diagonal functor.

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