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

Stokes solver for periodic domains using FFT. More...

#include <AMReX_FFT_Stokes.H>

Public Types

using cMF = FabArray< BaseFab< GpuComplex< typename MF::value_type > > >
 

Public Member Functions

 Stokes (Geometry const &geom, Array< std::pair< Boundary, Boundary >, 3 > const &bc)
 Construct a Stokes solver with explicit boundary types.
 
 Stokes (Geometry const &geom)
 Construct a purely periodic Stokes solver.
 
void solve (MF &U, MF &V, MF &W, MF &p, MF const &rhsx, MF const &rhsy, MF const &rhsz, typename MF::value_type alpha, typename MF::value_type eta)
 Solve the generalized Stokes problem in spectral space.
 

Detailed Description

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

Stokes solver for periodic domains using FFT.

Member Typedef Documentation

◆ cMF

template<typename MF = MultiFab>
using amrex::FFT::Stokes< MF >::cMF = FabArray<BaseFab<GpuComplex<typename MF::value_type> >>

Constructor & Destructor Documentation

◆ Stokes() [1/2]

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

Construct a Stokes solver with explicit boundary types.

Only periodic BCs are supported.

Parameters
geomGeometry describing the domain and metric information.
bcPair of boundary descriptors (low/high) per coordinate direction.

◆ Stokes() [2/2]

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

Construct a purely periodic Stokes solver.

Parameters
geomPeriodic geometry (all directions must be periodic).

Member Function Documentation

◆ solve()

template<typename MF >
void amrex::FFT::Stokes< MF >::solve ( MF &  U,
MF &  V,
MF &  W,
MF &  p,
MF const &  rhsx,
MF const &  rhsy,
MF const &  rhsz,
typename MF::value_type  alpha,
typename MF::value_type  eta 
)

Solve the generalized Stokes problem in spectral space.

Solves $(\alpha - \eta \nabla^2) \mathbf{u} + \nabla p = \mathbf{f}$ with the divergence-free constraint enforced in Fourier space. This solver is for 2D and 3D only.

This solver uses a MAC staggered grid. U and rhsx must be at x-face centers, V and rhsy at y-face centers, W and rhsz at z-face centers, and p cell-centered.

Parameters
Ux-component of velocity (output, at x-face centers).
Vy-component of velocity (output, at y-face centers).
Wz-component of velocity (output, at z-face centers, 3D only).
pPressure (output, cell-centered).
rhsxx-component of the right-hand side (at x-face centers).
rhsyy-component of the right-hand side (at y-face centers).
rhszz-component of the right-hand side (at z-face centers, 3D only).
alphaCoefficient multiplying the velocity.
etaCoefficient multiplying the velocity Laplacian.

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