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

#include <AMReX_PETSc.H>

Public Member Functions

 PETScABecLap (const BoxArray &grids, const DistributionMapping &dmap, const Geometry &geom_, MPI_Comm comm_)
 
 ~PETScABecLap ()
 
 PETScABecLap (PETScABecLap const &)=delete
 
 PETScABecLap (PETScABecLap &&) noexcept=delete
 
PETScABecLapoperator= (PETScABecLap const &)=delete
 
PETScABecLapoperator= (PETScABecLap &&) noexcept=delete
 
void setScalars (Real sa, Real sb)
 
void setACoeffs (const MultiFab &alpha)
 
void setBCoeffs (const Array< const MultiFab *, BL_SPACEDIM > &beta)
 
void setVerbose (int _verbose)
 
void solve (MultiFab &soln, const MultiFab &rhs, Real rel_tol, Real abs_tol, int max_iter, const BndryData &bndry, int max_bndry_order)
 
void prepareSolver ()
 
void loadVectors (MultiFab &soln, const MultiFab &rhs)
 
void getSolution (MultiFab &soln)
 

Private Attributes

MPI_Comm comm = MPI_COMM_NULL
 
Geometry geom
 
int verbose = 0
 
MultiFab acoefs
 
Array< MultiFab, AMREX_SPACEDIM > bcoefs
 
Real scalar_a
 
Real scalar_b
 
MultiFab diaginv
 
FabFactory< FArrayBox > const * m_factory = nullptr
 
BndryData const * m_bndry = nullptr
 
int m_maxorder = -1
 
std::unique_ptr< amrex_KSPsolver
 
std::unique_ptr< amrex_MatA
 
std::unique_ptr< amrex_Vecb
 
std::unique_ptr< amrex_Vecx
 
LayoutData< PetscInt > ncells_grid
 
FabArray< BaseFab< PetscInt > > cell_id
 
FabArray< BaseFab< PetscInt > > cell_id_vec
 
MultiFab const * m_eb_b_coeffs = nullptr
 

Static Private Attributes

static constexpr PetscInt regular_stencil_size = 2*AMREX_SPACEDIM + 1
 
static constexpr PetscInt eb_stencil_size = AMREX_D_TERM(3, *3, *3)
 

Constructor & Destructor Documentation

◆ PETScABecLap() [1/3]

amrex::PETScABecLap::PETScABecLap ( const BoxArray grids,
const DistributionMapping dmap,
const Geometry geom_,
MPI_Comm  comm_ 
)

◆ ~PETScABecLap()

amrex::PETScABecLap::~PETScABecLap ( )

◆ PETScABecLap() [2/3]

amrex::PETScABecLap::PETScABecLap ( PETScABecLap const &  )
delete

◆ PETScABecLap() [3/3]

amrex::PETScABecLap::PETScABecLap ( PETScABecLap &&  )
deletenoexcept

Member Function Documentation

◆ getSolution()

void amrex::PETScABecLap::getSolution ( MultiFab soln)

◆ loadVectors()

void amrex::PETScABecLap::loadVectors ( MultiFab soln,
const MultiFab rhs 
)

◆ operator=() [1/2]

PETScABecLap& amrex::PETScABecLap::operator= ( PETScABecLap &&  )
deletenoexcept

◆ operator=() [2/2]

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

◆ prepareSolver()

void amrex::PETScABecLap::prepareSolver ( )

◆ setACoeffs()

void amrex::PETScABecLap::setACoeffs ( const MultiFab alpha)

◆ setBCoeffs()

void amrex::PETScABecLap::setBCoeffs ( const Array< const MultiFab *, BL_SPACEDIM > &  beta)

◆ setScalars()

void amrex::PETScABecLap::setScalars ( Real  sa,
Real  sb 
)

◆ setVerbose()

void amrex::PETScABecLap::setVerbose ( int  _verbose)

◆ solve()

void amrex::PETScABecLap::solve ( MultiFab soln,
const MultiFab rhs,
Real  rel_tol,
Real  abs_tol,
int  max_iter,
const BndryData bndry,
int  max_bndry_order 
)

Member Data Documentation

◆ A

std::unique_ptr<amrex_Mat> amrex::PETScABecLap::A
private

◆ acoefs

MultiFab amrex::PETScABecLap::acoefs
private

◆ b

std::unique_ptr<amrex_Vec> amrex::PETScABecLap::b
private

◆ bcoefs

Array<MultiFab,AMREX_SPACEDIM> amrex::PETScABecLap::bcoefs
private

◆ cell_id

FabArray<BaseFab<PetscInt> > amrex::PETScABecLap::cell_id
private

◆ cell_id_vec

FabArray<BaseFab<PetscInt> > amrex::PETScABecLap::cell_id_vec
private

◆ comm

MPI_Comm amrex::PETScABecLap::comm = MPI_COMM_NULL
private

◆ diaginv

MultiFab amrex::PETScABecLap::diaginv
private

◆ eb_stencil_size

constexpr PetscInt amrex::PETScABecLap::eb_stencil_size = AMREX_D_TERM(3, *3, *3)
staticconstexprprivate

◆ geom

Geometry amrex::PETScABecLap::geom
private

◆ m_bndry

BndryData const* amrex::PETScABecLap::m_bndry = nullptr
private

◆ m_eb_b_coeffs

MultiFab const* amrex::PETScABecLap::m_eb_b_coeffs = nullptr
private

◆ m_factory

FabFactory<FArrayBox> const* amrex::PETScABecLap::m_factory = nullptr
private

◆ m_maxorder

int amrex::PETScABecLap::m_maxorder = -1
private

◆ ncells_grid

LayoutData<PetscInt> amrex::PETScABecLap::ncells_grid
private

◆ regular_stencil_size

constexpr PetscInt amrex::PETScABecLap::regular_stencil_size = 2*AMREX_SPACEDIM + 1
staticconstexprprivate

◆ scalar_a

Real amrex::PETScABecLap::scalar_a
private

◆ scalar_b

Real amrex::PETScABecLap::scalar_b
private

◆ solver

std::unique_ptr<amrex_KSP> amrex::PETScABecLap::solver
private

◆ verbose

int amrex::PETScABecLap::verbose = 0
private

◆ x

std::unique_ptr<amrex_Vec> amrex::PETScABecLap::x
private

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