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

FFT-based projection of a cell-centered velocity field onto the space of fields that are divergence free with respect to the node-centered cross-stencil divergence. More...

#include <AMReX_FFT_CrossProj.H>

Public Member Functions

 CrossProj (Geometry const &geom)
 Construct a periodic CrossProj solver.
 CrossProj (Geometry const &geom, Array< std::pair< Boundary, Boundary >, 3 > const &bc)
 Construct a CrossProj solver with explicit boundary types.
void solve (MF &a_soln, MF const &a_rhs)
 Project the velocity in a_rhs and store the result in a_soln.

Detailed Description

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

FFT-based projection of a cell-centered velocity field onto the space of fields that are divergence free with respect to the node-centered cross-stencil divergence.

The divergence at each node is computed from the 4 (2D) or 8 (3D) cells surrounding it. Currently only all-periodic boundaries are supported, in 2D and 3D, with at least 2 cells in each direction. The first AMREX_SPACEDIM components of the MFs are the velocity.

Constructor & Destructor Documentation

◆ CrossProj() [1/2]

template<typename MF = MultiFab>
amrex::FFT::CrossProj< MF >::CrossProj ( Geometry const & geom)
inlineexplicit

Construct a periodic CrossProj solver.

Parameters
geomPeriodic geometry (all directions must be periodic).

◆ CrossProj() [2/2]

template<typename MF = MultiFab>
amrex::FFT::CrossProj< MF >::CrossProj ( Geometry const & geom,
Array< std::pair< Boundary, Boundary >, 3 > const & bc )
inline

Construct a CrossProj solver with explicit boundary types.

Only periodic BCs are supported.

Parameters
geomPeriodic geometry.
bcPair of boundary descriptors (low/high) per coordinate direction.

Member Function Documentation

◆ solve()

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

Project the velocity in a_rhs and store the result in a_soln.

If a_soln has ghost cells, one layer of ghost cells will be filled. The two MFs could be the same MF.

Parameters
a_solnProjected velocity.
a_rhsVelocity to be projected.

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