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

Periodic BC — requires HYPRE periodic grid setup. More...

#include <BoundaryCondition.H>

Inheritance diagram for OpenImpala::PeriodicBC:
[legend]
Collaboration diagram for OpenImpala::PeriodicBC:
[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.
bool needsPeriodicGrid () const override
 Whether this BC requires HYPRE periodic grid setup.
Public Member Functions inherited from OpenImpala::BoundaryCondition
virtual ~BoundaryCondition ()=default

Detailed Description

Periodic BC — requires HYPRE periodic grid setup.

No stencil modification is needed because HYPRE's periodic grid handles the wrap-around connectivity. This class only signals that periodic grid setup is required via needsPeriodicGrid().

Member Function Documentation

◆ applyBC()

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

◆ needsPeriodicGrid()

bool OpenImpala::PeriodicBC::needsPeriodicGrid ( ) const
inlineoverridevirtual

Whether this BC requires HYPRE periodic grid setup.

Returns
true if setupGrid() should be called with periodic=true.

Reimplemented from OpenImpala::BoundaryCondition.


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