|
OpenImpala
Image-based parallel transport property solver
|
Abstract base class for boundary conditions. More...
#include <BoundaryCondition.H>
Public Member Functions | |
| virtual void | applyBC (amrex::Real *a, amrex::Real *rhs, amrex::Real *xinit, int nval, const int *active_mask, const int *mask_lo, const int *mask_hi, const amrex::Real *diff_coeff, const int *dc_lo, const int *dc_hi, const int *bxlo, const int *bxhi, const int *domlo, const int *domhi, const amrex::Real *dxinv, amrex::Real vlo, amrex::Real vhi, int dir) const =0 |
| Apply BC modifications to stencil/rhs/xinit for one box. | |
| virtual bool | needsPeriodicGrid () const |
| Whether this BC requires HYPRE periodic grid setup. | |
| virtual | ~BoundaryCondition ()=default |
Abstract base class for boundary conditions.
Operates at box level: one virtual call per MFIter box, not per cell. The fill kernel builds the interior stencil first, then calls applyBC() to modify boundary cells.
|
virtualdefault |
|
pure virtual |
Apply BC modifications to stencil/rhs/xinit for one box.
Called after the interior stencil is fully built. Only modifies cells that require BC treatment (domain faces, phase boundaries, etc.).
| [in,out] | a | Flattened stencil array, size nval*7. |
| [in,out] | rhs | Right-hand side, size nval. |
| [in,out] | xinit | Initial guess, size nval. |
| [in] | nval | Number of cells in this box. |
| [in] | active_mask | 3-D activity mask (1=active, 0=inactive), with ghosts. |
| [in] | mask_lo | Lower bounds of active_mask (3 ints). |
| [in] | mask_hi | Upper bounds of active_mask (3 ints). |
| [in] | diff_coeff | 3-D cell-centred diffusion coefficients, with ghosts. |
| [in] | dc_lo | Lower bounds of diff_coeff (3 ints). |
| [in] | dc_hi | Upper bounds of diff_coeff (3 ints). |
| [in] | bxlo | Lower corner of valid box (3 ints). |
| [in] | bxhi | Upper corner of valid box (3 ints). |
| [in] | domlo | Domain lower corner (3 ints). |
| [in] | domhi | Domain upper corner (3 ints). |
| [in] | dxinv | Inverse grid spacing squared: [1/dx^2, 1/dy^2, 1/dz^2]. |
| [in] | vlo | BC value on the low face. |
| [in] | vhi | BC value on the high face. |
| [in] | dir | Flow direction (0=X, 1=Y, 2=Z). |
Implemented in OpenImpala::DirichletExternalBC, OpenImpala::DirichletPhaseBoundaryBC, OpenImpala::NeumannBC, and OpenImpala::PeriodicBC.
|
inlinevirtual |
Whether this BC requires HYPRE periodic grid setup.
Reimplemented in OpenImpala::PeriodicBC.