![]() |
Block-Structured AMR Software Framework
|
Open Boundary Poisson Solver. More...
#include <AMReX_OpenBC.H>
Public Member Functions | |
| OpenBCSolver ()=default | |
| Construct an empty solver; call define() before solving. | |
| OpenBCSolver (const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo()) | |
Build the solver hierarchy covering a_geom/ | |
| ~OpenBCSolver ()=default | |
| OpenBCSolver (const OpenBCSolver &)=delete | |
| OpenBCSolver (OpenBCSolver &&)=delete | |
| OpenBCSolver & | operator= (const OpenBCSolver &)=delete |
| OpenBCSolver & | operator= (OpenBCSolver &&)=delete |
| void | define (const Vector< Geometry > &a_geom, const Vector< BoxArray > &a_grids, const Vector< DistributionMapping > &a_dmap, const LPInfo &a_info=LPInfo()) |
| Initialize/refresh the solver. | |
| void | setVerbose (int v) noexcept |
Control verbosity (0 = silent) via v. | |
| void | setBottomVerbose (int v) noexcept |
Control bottom solver verbosity via v. | |
| void | useHypre (bool use_hypre) noexcept |
| Toggle the Hypre bottom solver (requires Hypre-enabled build). | |
| Real | solve (const Vector< MultiFab * > &a_sol, const Vector< MultiFab const * > &a_rhs, Real a_tol_rel, Real a_tol_abs) |
| Solve the isolated Poisson problem. | |
| void | compute_moments (Gpu::DeviceVector< openbc::Moments > &moments) |
| Build per-face multipole moments that summarize solution derivatives. | |
| void | compute_potential (Gpu::DeviceVector< openbc::Moments > const &moments) |
| Evaluate the coarse potential contribution from precomputed moments. | |
| void | interpolate_potential (MultiFab &solg) |
| Interpolate coarse potential values back onto the grown solution domain. | |
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
|
default |
Construct an empty solver; call define() before solving.
| amrex::OpenBCSolver::OpenBCSolver | ( | const Vector< Geometry > & | a_geom, |
| const Vector< BoxArray > & | a_grids, | ||
| const Vector< DistributionMapping > & | a_dmap, | ||
| const LPInfo & | a_info = LPInfo() |
||
| ) |
Build the solver hierarchy covering a_geom/ a_grids.
| a_geom | AMR geometry objects. |
| a_grids | AMR grid arrays. |
| a_dmap | Distribution mappings per level. |
| a_info | Optional linear-operator configuration overrides. |
|
default |
|
delete |
|
delete |
| void amrex::OpenBCSolver::compute_moments | ( | Gpu::DeviceVector< openbc::Moments > & | moments | ) |
Build per-face multipole moments that summarize solution derivatives.
| moments | Device vector sized to m_nblocks_local; filled in place. |
| void amrex::OpenBCSolver::compute_potential | ( | Gpu::DeviceVector< openbc::Moments > const & | moments | ) |
Evaluate the coarse potential contribution from precomputed moments.
| moments | Device buffer returned by compute_moments(). |
| void amrex::OpenBCSolver::define | ( | const Vector< Geometry > & | a_geom, |
| const Vector< BoxArray > & | a_grids, | ||
| const Vector< DistributionMapping > & | a_dmap, | ||
| const LPInfo & | a_info = LPInfo() |
||
| ) |
Initialize/refresh the solver.
May be called repeatedly if the mesh hierarchy changes.
| a_geom | AMR geometry objects. |
| a_grids | AMR grid arrays. |
| a_dmap | Distribution mappings per level. |
| a_info | Optional linear-operator configuration overrides. |
| void amrex::OpenBCSolver::interpolate_potential | ( | MultiFab & | solg | ) |
Interpolate coarse potential values back onto the grown solution domain.
| solg | Buffer defined on the extended domain; updated in place. |
|
delete |
|
delete |
|
noexcept |
Control bottom solver verbosity via v.
|
noexcept |
Control verbosity (0 = silent) via v.
| Real amrex::OpenBCSolver::solve | ( | const Vector< MultiFab * > & | a_sol, |
| const Vector< MultiFab const * > & | a_rhs, | ||
| Real | a_tol_rel, | ||
| Real | a_tol_abs | ||
| ) |
Solve the isolated Poisson problem.
The RHS/solution vectors must cover the AMR hierarchy supplied to define().
| a_sol | Solution MultiFabs (updated in place). |
| a_rhs | Right-hand sides. |
| a_tol_rel | Relative tolerance passed to both MLMG instances. |
| a_tol_abs | Absolute tolerance passed to both MLMG instances. |
|
noexcept |