Abstract interface for the cut-cell stabilization of explicit finite-volume updates.
More...
Abstract interface for the cut-cell stabilization of explicit finite-volume updates.
An explicit update phi^{n+1} = phi^n - dt*D with the conservative divergence D = 1/(kappa*dx) * sum(fluxes) is unstable in small cut cells at a time step set by the regular cells. An implementation of this class turns the conservative divergence into the right-hand side R of a stabilized update,
phi^{n+1} = phi^n - dt * R,
which is conservative. R is per unit volume, i.e. not weighted by the volume fraction.
Depending on the implementation, R depends on phi^n and on dt. Callers must therefore pass the state that the update starts from and the time step of the update, use R only with that time step, and not add together right-hand sides that were computed separately. Several divergences that enter the same update are added together before they are passed to redistribute().
The implementations are EBFluxRedistribution (the hybrid divergence with mass redistribution) and EBStateRedistribution (weighted state redistribution). Both use EBMassRedistribution to move mass between cells.
| virtual void EBRedistribution::redistribute |
( |
EBAMRCellData & | a_divG, |
|
|
const EBAMRCellData & | a_phi, |
|
|
const Real | a_dt ) |
|
pure virtualnoexcept |
Turn the conservative divergence into the right-hand side of the stabilized update.
On input, a_divG holds kappa*D, the conservative divergence multiplied by the volume fraction, with coarse cells under finer levels averaged and ghost cells filled. On output, it holds R, such that the update is phi^{n+1} = phi^n - a_dt * R.
- Parameters
-
| [in,out] | a_divG | On input kappa*D, on output R. |
| [in] | a_phi | State that the update starts from. |
| [in] | a_dt | Time step of the update. It is signed: an update phi^n + dt*D passes -dt. |
Implemented in EBFluxRedistribution, and EBStateRedistribution.