|
OpenImpala
Image-based parallel transport property solver
|
Zero-flux Neumann BC — no stencil modification needed. More...
#include <BoundaryCondition.H>
Public Member Functions | |
| void | applyBC (amrex::Real *, amrex::Real *, amrex::Real *, int, const int *, const int *, const int *, const amrex::Real *, const int *, const int *, const int *, const int *, const int *, const int *, const amrex::Real *, amrex::Real, amrex::Real, int) const override |
| Apply BC modifications to stencil/rhs/xinit for one box. | |
| Public Member Functions inherited from OpenImpala::BoundaryCondition | |
| virtual bool | needsPeriodicGrid () const |
| Whether this BC requires HYPRE periodic grid setup. | |
| virtual | ~BoundaryCondition ()=default |
Zero-flux Neumann BC — no stencil modification needed.
The default stencil already produces zero-flux at boundaries where neighbors are inactive (off-diagonal = 0). This class only sets the initial guess.
|
inlineoverridevirtual |
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). |
Implements OpenImpala::BoundaryCondition.