OpenImpala
Image-based parallel transport property solver
Loading...
Searching...
No Matches
OpenImpala::NeumannBC Class Reference

Zero-flux Neumann BC — no stencil modification needed. More...

#include <BoundaryCondition.H>

Inheritance diagram for OpenImpala::NeumannBC:
[legend]
Collaboration diagram for OpenImpala::NeumannBC:
[legend]

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

Detailed Description

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.

Member Function Documentation

◆ applyBC()

void OpenImpala::NeumannBC::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
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.).

Parameters
[in,out]aFlattened stencil array, size nval*7.
[in,out]rhsRight-hand side, size nval.
[in,out]xinitInitial guess, size nval.
[in]nvalNumber of cells in this box.
[in]active_mask3-D activity mask (1=active, 0=inactive), with ghosts.
[in]mask_loLower bounds of active_mask (3 ints).
[in]mask_hiUpper bounds of active_mask (3 ints).
[in]diff_coeff3-D cell-centred diffusion coefficients, with ghosts.
[in]dc_loLower bounds of diff_coeff (3 ints).
[in]dc_hiUpper bounds of diff_coeff (3 ints).
[in]bxloLower corner of valid box (3 ints).
[in]bxhiUpper corner of valid box (3 ints).
[in]domloDomain lower corner (3 ints).
[in]domhiDomain upper corner (3 ints).
[in]dxinvInverse grid spacing squared: [1/dx^2, 1/dy^2, 1/dz^2].
[in]vloBC value on the low face.
[in]vhiBC value on the high face.
[in]dirFlow direction (0=X, 1=Y, 2=Z).

Implements OpenImpala::BoundaryCondition.


The documentation for this class was generated from the following file: