Hipace
Public Member Functions | Protected Attributes | List of all members
FFTPoissonSolver Class Referenceabstract

This class handles functions and data to perform transverse Fourier-based Poisson solves. More...

#include <FFTPoissonSolver.H>

Inheritance diagram for FFTPoissonSolver:
FFTPoissonSolverDirichlet FFTPoissonSolverPeriodic

Public Member Functions

 FFTPoissonSolver ()=default
 
virtual ~FFTPoissonSolver ()=0
 
virtual void define (amrex::BoxArray const &realspace_ba, amrex::DistributionMapping const &dm, amrex::Geometry const &gm)=0
 Define real space and spectral space boxes and multifabs, multiplier coefficients inv_k2 to solve Poisson equation and FFT plans. Currently only works with a single box, i.e., serial FFT. More...
 
virtual void SolvePoissonEquation (amrex::MultiFab &lhs_mf)=0
 
amrex::MultiFabStagingArea ()
 

Protected Attributes

amrex::BoxArray m_spectralspace_ba
 
amrex::MultiFab m_stagingArea
 

Detailed Description

This class handles functions and data to perform transverse Fourier-based Poisson solves.

For a given source S, it solves equation Laplacian(F) = S and returns F. Once an instance is created, a typical use consists in:

  1. Compute S directly in FFTPoissonSolver::m_stagingArea
  2. Call FFTPoissonSolver::SolvePoissonEquation(mf), which will solve Poisson equation with RHS in the staging area and return the LHS in mf.

Constructor & Destructor Documentation

◆ FFTPoissonSolver()

FFTPoissonSolver::FFTPoissonSolver ( )
default

Default constructor

◆ ~FFTPoissonSolver()

FFTPoissonSolver::~FFTPoissonSolver ( )
pure virtual

Abstract class needs a virtual destructor

Member Function Documentation

◆ define()

virtual void FFTPoissonSolver::define ( amrex::BoxArray const &  realspace_ba,
amrex::DistributionMapping const &  dm,
amrex::Geometry const &  gm 
)
pure virtual

Define real space and spectral space boxes and multifabs, multiplier coefficients inv_k2 to solve Poisson equation and FFT plans. Currently only works with a single box, i.e., serial FFT.

Parameters
[in]realspace_baBoxArray on which the FFT is executed.
[in]dmDistributionMapping for the BoxArray.
[in]gmGeometry, contains the box dimensions.

Implemented in FFTPoissonSolverPeriodic, and FFTPoissonSolverDirichlet.

◆ SolvePoissonEquation()

virtual void FFTPoissonSolver::SolvePoissonEquation ( amrex::MultiFab lhs_mf)
pure virtual

Solve Poisson equation. The source term must be stored in the staging area m_stagingArea prior to this call.

Parameters
[in]lhs_mfDestination array, where the result is stored.

Implemented in FFTPoissonSolverPeriodic, and FFTPoissonSolverDirichlet.

◆ StagingArea()

amrex::MultiFab & FFTPoissonSolver::StagingArea ( )

Get reference to the taging area

Member Data Documentation

◆ m_spectralspace_ba

amrex::BoxArray FFTPoissonSolver::m_spectralspace_ba
protected

BoxArray for the spectral fields

◆ m_stagingArea

amrex::MultiFab FFTPoissonSolver::m_stagingArea
protected

Staging area, contains (real) field in real space. This is where the source term is stored before calling the Poisson solver


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