1 #ifndef ERF_TERRAIN_POISSON_H_
2 #define ERF_TERRAIN_POISSON_H_
4 #include <AMReX_Geometry.H>
5 #include <AMReX_MultiFab.H>
10 #include <AMReX_FFT_Poisson.H>
16 using RT = amrex::Real;
18 TerrainPoisson (amrex::Geometry
const& geom, amrex::BoxArray
const& ba,
19 amrex::DistributionMapping
const& dm,
20 amrex::Gpu::DeviceVector<amrex::Real>& stretched_dz_lev_d,
21 amrex::MultiFab
const* z_phys_nd,
22 amrex::Array<std::string,2*AMREX_SPACEDIM>& domain_bc_type);
24 void apply(amrex::MultiFab& lhs, amrex::MultiFab
const& rhs);
28 void usePrecond(
bool precond_flag);
30 void getFluxes(amrex::MultiFab& phi, amrex::Array<amrex::MultiFab,AMREX_SPACEDIM>& fluxes);
32 void assign(amrex::MultiFab& lhs, amrex::MultiFab
const& rhs);
34 void scale(amrex::MultiFab& lhs, amrex::Real fac);
36 amrex::Real dotProduct(amrex::MultiFab
const& v1, amrex::MultiFab
const& v2);
38 void increment(amrex::MultiFab& lhs, amrex::MultiFab
const& rhs, amrex::Real a);
40 void linComb(amrex::MultiFab& lhs, amrex::Real a, amrex::MultiFab
const& rhs_a,
41 amrex::Real b, amrex::MultiFab
const& rhs_b);
43 amrex::MultiFab makeVecRHS();
45 amrex::MultiFab makeVecLHS();
47 amrex::Real norm2(amrex::MultiFab
const& v);
49 void precond(amrex::MultiFab& lhs, amrex::MultiFab
const& rhs);
51 void setToZero(amrex::MultiFab& v);
54 bool m_use_precond =
false;
55 amrex::Geometry m_geom;
56 amrex::BoxArray m_grids;
57 amrex::DistributionMapping m_dmap;
58 amrex::Gpu::DeviceVector<amrex::Real> m_stretched_dz_d;
59 const amrex::MultiFab* m_zphys;
61 std::unique_ptr<amrex::FFT::PoissonHybrid<amrex::MultiFab>> m_2D_fft_precond;
62 amrex::Array<std::pair<amrex::FFT::Boundary,amrex::FFT::Boundary>,AMREX_SPACEDIM> bc_fft;
auto apply_bcs
Definition: ERF_TI_utils.H:50