|
OpenImpala
Image-based parallel transport property solver
|
Applies Dirichlet BC at active cells adjacent to inactive cells near the domain boundary. More...
#include <BoundaryCondition.H>
Public Member Functions | |
| 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 *, const int *, const int *, const int *bxlo, const int *bxhi, const int *domlo, const int *domhi, const amrex::Real *, amrex::Real vlo, amrex::Real vhi, int dir) 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 |
Applies Dirichlet BC at active cells adjacent to inactive cells near the domain boundary.
Instead of pinning cells on the domain face itself, this pins active cells that have an inactive (solid) neighbor in the flow direction at the inlet/outlet boundary region. This is the "soil branch" BC for materials where the pore space does not extend to the domain face.
|
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.