![]() |
Block-Structured AMR Software Framework
|
PETSc wrapper that assembles/solves (a alpha - b div beta grad) phi = rhs.
More...
#include <AMReX_PETSc.H>
Public Member Functions | |
| PETScABecLap (const BoxArray &grids, const DistributionMapping &dmap, const Geometry &geom_, MPI_Comm comm_) | |
| Construct a PETSc solver bound to the supplied AMR level. | |
| ~PETScABecLap () | |
| PETScABecLap (PETScABecLap const &)=delete | |
| PETScABecLap (PETScABecLap &&) noexcept=delete | |
| PETScABecLap & | operator= (PETScABecLap const &)=delete |
| PETScABecLap & | operator= (PETScABecLap &&) noexcept=delete |
| void | setScalars (Real sa, Real sb) |
| Store constant scalars for the diagonal and diffusive terms. | |
| void | setACoeffs (const MultiFab &alpha) |
Install cell-centered a coefficients (copied as needed). | |
| void | setBCoeffs (const Array< const MultiFab *, 3 > &beta) |
Install per-direction face-centered b coefficients. | |
| void | setVerbose (int _verbose) |
Set PETSc verbosity level forwarded to KSP monitors (_verbose). | |
| void | solve (MultiFab &soln, const MultiFab &rhs, Real rel_tol, Real abs_tol, int max_iter, const BndryData &bndry, int max_bndry_order) |
| Solve the assembled ABec system using PETSc/KSP. | |
| void | setEBDirichlet (MultiFab const *beb) |
Provide b coefficients stored in beb for embedded-boundary faces. | |
| void | prepareSolver () |
| Build PETSc matrices/vectors and apply runtime parameters. | |
| void | loadVectors (MultiFab &soln, const MultiFab &rhs) |
Copy AMReX solution guess soln and RHS rhs into PETSc vectors. | |
| void | getSolution (MultiFab &soln) |
Copy PETSc's solved solution back into AMReX storage soln. | |
PETSc wrapper that assembles/solves (a alpha - b div beta grad) phi = rhs.
| amrex::PETScABecLap::PETScABecLap | ( | const BoxArray & | grids, |
| const DistributionMapping & | dmap, | ||
| const Geometry & | geom_, | ||
| MPI_Comm | comm_ | ||
| ) |
Construct a PETSc solver bound to the supplied AMR level.
| grids | Grid layout for the level. |
| dmap | Distribution map associated with grids. |
| geom_ | Geometry describing the domain. |
| comm_ | MPI communicator passed to PETSc. |
| amrex::PETScABecLap::~PETScABecLap | ( | ) |
|
delete |
|
deletenoexcept |
| void amrex::PETScABecLap::getSolution | ( | MultiFab & | soln | ) |
Copy PETSc's solved solution back into AMReX storage soln.
Copy AMReX solution guess soln and RHS rhs into PETSc vectors.
|
deletenoexcept |
|
delete |
| void amrex::PETScABecLap::prepareSolver | ( | ) |
Build PETSc matrices/vectors and apply runtime parameters.
| void amrex::PETScABecLap::setACoeffs | ( | const MultiFab & | alpha | ) |
Install cell-centered a coefficients (copied as needed).
| alpha | MultiFab containing the a coefficients. |
Install per-direction face-centered b coefficients.
| beta | Array of per-direction coefficient MultiFabs. |
|
inline |
Provide b coefficients stored in beb for embedded-boundary faces.
Store constant scalars for the diagonal and diffusive terms.
| sa | Scalar applied to the a term. |
| sb | Scalar applied to the b term. |
| void amrex::PETScABecLap::setVerbose | ( | int | _verbose | ) |
Set PETSc verbosity level forwarded to KSP monitors (_verbose).