Block-Structured AMR Software Framework
amrex::OpenBCSolver Class Reference

Open Boundary Poisson Solver. More...

#include <AMReX_OpenBC.H>

Public Member Functions

 OpenBCSolver ()=default
 
 OpenBCSolver (const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo())
 
 ~OpenBCSolver ()=default
 
 OpenBCSolver (const OpenBCSolver &)=delete
 
 OpenBCSolver (OpenBCSolver &&)=delete
 
OpenBCSolveroperator= (const OpenBCSolver &)=delete
 
OpenBCSolveroperator= (OpenBCSolver &&)=delete
 
void define (const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo())
 
void setVerbose (int v) noexcept
 
void setBottomVerbose (int v) noexcept
 
void useHypre (bool use_hypre) noexcept
 
Real solve (const Vector< MultiFab * > &a_sol, const Vector< MultiFab const * > &a_rhs, Real a_tol_rel, Real a_tol_abs)
 
void compute_moments (Gpu::DeviceVector< openbc::Moments > &moments)
 
void compute_potential (Gpu::DeviceVector< openbc::Moments > const &moments)
 
void interpolate_potential (MultiFab &solg)
 

Private Member Functions

void bcast_moments (Gpu::DeviceVector< openbc::Moments > &moments)
 

Private Attributes

int m_verbose = 0
 
int m_bottom_verbose = 0
 
Vector< Geometrym_geom
 
Vector< BoxArraym_grids
 
Vector< DistributionMappingm_dmap
 
LPInfo m_info
 
std::unique_ptr< MLPoissonm_poisson_1
 
std::unique_ptr< MLPoissonm_poisson_2
 
std::unique_ptr< MLMGm_mlmg_1
 
std::unique_ptr< MLMGm_mlmg_2
 
BottomSolver m_bottom_solver_type = BottomSolver::bicgstab
 
int m_coarsen_ratio = 0
 
Array< MultiFab, AMREX_SPACEDIM > m_dpdn
 
Gpu::PinnedVector< openbc::MomTagm_momtags_h
 
Gpu::DeviceVector< openbc::MomTagm_momtags_d
 
Gpu::PinnedVector< intm_ngpublocks_h
 
Gpu::DeviceVector< intm_ngpublocks_d
 
int m_nthreads_momtag
 
int m_nblocks_local = 0
 
int m_nblocks = 0
 
Vector< intm_countvec
 
Vector< intm_offset
 
IntVect m_ngrowdomain
 
MultiFab m_crse_grown_faces_phi
 
MultiFab m_phind
 
BoxArray m_bag
 
Vector< IntVectm_box_offset
 
Vector< BoxArraym_ba_all
 
Vector< DistributionMappingm_dm_all
 
Vector< Geometrym_geom_all
 

Detailed Description

Open Boundary Poisson Solver.

References: (1) The Solution of Poisson's Equation for Isolated Source Distributions, R. A. James, 1977, JCP 25, 71 (2) A Local Corrections Algorithm for Solving Poisson's Equation in Three Dimensions, P. McCorquodale, P. Colella, G. T. Balls, & S. B. Baden, 2007, Communications in Applied Mathematics and Computational Science, 2, 1, 57-81

Constructor & Destructor Documentation

◆ OpenBCSolver() [1/4]

amrex::OpenBCSolver::OpenBCSolver ( )
default

◆ OpenBCSolver() [2/4]

amrex::OpenBCSolver::OpenBCSolver ( const Vector< Geometry > &  a_geom,
const Vector< BoxArray > &  a_grids,
const Vector< DistributionMapping > &  a_dmap,
const LPInfo a_info = LPInfo() 
)

◆ ~OpenBCSolver()

amrex::OpenBCSolver::~OpenBCSolver ( )
default

◆ OpenBCSolver() [3/4]

amrex::OpenBCSolver::OpenBCSolver ( const OpenBCSolver )
delete

◆ OpenBCSolver() [4/4]

amrex::OpenBCSolver::OpenBCSolver ( OpenBCSolver &&  )
delete

Member Function Documentation

◆ bcast_moments()

void amrex::OpenBCSolver::bcast_moments ( Gpu::DeviceVector< openbc::Moments > &  moments)
private

◆ compute_moments()

void amrex::OpenBCSolver::compute_moments ( Gpu::DeviceVector< openbc::Moments > &  moments)

◆ compute_potential()

void amrex::OpenBCSolver::compute_potential ( Gpu::DeviceVector< openbc::Moments > const &  moments)

◆ define()

void amrex::OpenBCSolver::define ( const Vector< Geometry > &  a_geom,
const Vector< BoxArray > &  a_grids,
const Vector< DistributionMapping > &  a_dmap,
const LPInfo a_info = LPInfo() 
)

◆ interpolate_potential()

void amrex::OpenBCSolver::interpolate_potential ( MultiFab solg)

◆ operator=() [1/2]

OpenBCSolver& amrex::OpenBCSolver::operator= ( const OpenBCSolver )
delete

◆ operator=() [2/2]

OpenBCSolver& amrex::OpenBCSolver::operator= ( OpenBCSolver &&  )
delete

◆ setBottomVerbose()

void amrex::OpenBCSolver::setBottomVerbose ( int  v)
noexcept

◆ setVerbose()

void amrex::OpenBCSolver::setVerbose ( int  v)
noexcept

◆ solve()

Real amrex::OpenBCSolver::solve ( const Vector< MultiFab * > &  a_sol,
const Vector< MultiFab const * > &  a_rhs,
Real  a_tol_rel,
Real  a_tol_abs 
)

◆ useHypre()

void amrex::OpenBCSolver::useHypre ( bool  use_hypre)
noexcept

Member Data Documentation

◆ m_ba_all

Vector<BoxArray> amrex::OpenBCSolver::m_ba_all
private

◆ m_bag

BoxArray amrex::OpenBCSolver::m_bag
private

◆ m_bottom_solver_type

BottomSolver amrex::OpenBCSolver::m_bottom_solver_type = BottomSolver::bicgstab
private

◆ m_bottom_verbose

int amrex::OpenBCSolver::m_bottom_verbose = 0
private

◆ m_box_offset

Vector<IntVect> amrex::OpenBCSolver::m_box_offset
private

◆ m_coarsen_ratio

int amrex::OpenBCSolver::m_coarsen_ratio = 0
private

◆ m_countvec

Vector<int> amrex::OpenBCSolver::m_countvec
private

◆ m_crse_grown_faces_phi

MultiFab amrex::OpenBCSolver::m_crse_grown_faces_phi
private

◆ m_dm_all

Vector<DistributionMapping> amrex::OpenBCSolver::m_dm_all
private

◆ m_dmap

Vector<DistributionMapping> amrex::OpenBCSolver::m_dmap
private

◆ m_dpdn

Array<MultiFab,AMREX_SPACEDIM> amrex::OpenBCSolver::m_dpdn
private

◆ m_geom

Vector<Geometry> amrex::OpenBCSolver::m_geom
private

◆ m_geom_all

Vector<Geometry> amrex::OpenBCSolver::m_geom_all
private

◆ m_grids

Vector<BoxArray> amrex::OpenBCSolver::m_grids
private

◆ m_info

LPInfo amrex::OpenBCSolver::m_info
private

◆ m_mlmg_1

std::unique_ptr<MLMG> amrex::OpenBCSolver::m_mlmg_1
private

◆ m_mlmg_2

std::unique_ptr<MLMG> amrex::OpenBCSolver::m_mlmg_2
private

◆ m_momtags_d

Gpu::DeviceVector<openbc::MomTag> amrex::OpenBCSolver::m_momtags_d
private

◆ m_momtags_h

Gpu::PinnedVector<openbc::MomTag> amrex::OpenBCSolver::m_momtags_h
private

◆ m_nblocks

int amrex::OpenBCSolver::m_nblocks = 0
private

◆ m_nblocks_local

int amrex::OpenBCSolver::m_nblocks_local = 0
private

◆ m_ngpublocks_d

Gpu::DeviceVector<int> amrex::OpenBCSolver::m_ngpublocks_d
private

◆ m_ngpublocks_h

Gpu::PinnedVector<int> amrex::OpenBCSolver::m_ngpublocks_h
private

◆ m_ngrowdomain

IntVect amrex::OpenBCSolver::m_ngrowdomain
private

◆ m_nthreads_momtag

int amrex::OpenBCSolver::m_nthreads_momtag
private

◆ m_offset

Vector<int> amrex::OpenBCSolver::m_offset
private

◆ m_phind

MultiFab amrex::OpenBCSolver::m_phind
private

◆ m_poisson_1

std::unique_ptr<MLPoisson> amrex::OpenBCSolver::m_poisson_1
private

◆ m_poisson_2

std::unique_ptr<MLPoisson> amrex::OpenBCSolver::m_poisson_2
private

◆ m_verbose

int amrex::OpenBCSolver::m_verbose = 0
private

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