Block-Structured AMR Software Framework
amrex::FaceDivFree Class Reference

Divergence-preserving interpolation on face centered data. More...

#include <AMReX_Interpolater.H>

Inheritance diagram for amrex::FaceDivFree:
amrex::Interpolater amrex::InterpBase

Public Member Functions

Box CoarseBox (const Box &fine, int ratio) override
 Returns coarsened box given fine box and refinement ratio. More...
 
Box CoarseBox (const Box &fine, const IntVect &ratio) override
 Returns coarsened box given fine box and refinement ratio. More...
 
void interp (const FArrayBox &crse, int crse_comp, FArrayBox &fine, int fine_comp, int ncomp, const Box &fine_region, const IntVect &ratio, const Geometry &crse_geom, const Geometry &fine_geom, Vector< BCRec > const &bcr, int actual_comp, int actual_state, RunOn runon) override
 Coarse to fine interpolation in space. More...
 
void interp_arr (Array< FArrayBox *, AMREX_SPACEDIM > const &crse, int crse_comp, Array< FArrayBox *, AMREX_SPACEDIM > const &fine, int fine_comp, int ncomp, const Box &fine_region, const IntVect &ratio, Array< IArrayBox *, AMREX_SPACEDIM > const &solve_mask, const Geometry &crse_geom, const Geometry &fine_geom, Vector< Array< BCRec, AMREX_SPACEDIM > > const &bcr, int actual_comp, int actual_state, RunOn runon) override
 Coarse to fine interpolation in space. More...
 
- Public Member Functions inherited from amrex::Interpolater
virtual void interp_face (const FArrayBox &, const int, FArrayBox &, const int, const int, const Box &, const IntVect &, const IArrayBox &, const Geometry &, const Geometry &, Vector< BCRec > const &, const int, RunOn)
 Coarse to fine interpolation in space for face-based data. More...
 
virtual void protect (const FArrayBox &, int, FArrayBox &, int, FArrayBox &, int, int, const Box &, const IntVect &, const Geometry &, const Geometry &, Vector< BCRec > &, RunOn)
 Re-visit the interpolation to protect against under- or overshoots. More...
 
- Public Member Functions inherited from amrex::InterpBase
 InterpBase ()=default
 
virtual ~InterpBase ()=default
 
 InterpBase (InterpBase const &) noexcept=default
 
 InterpBase (InterpBase &&) noexcept=default
 
InterpBaseoperator= (InterpBase const &) noexcept=default
 
InterpBaseoperator= (InterpBase &&) noexcept=default
 
InterpolaterBoxCoarsener BoxCoarsener (const IntVect &ratio)
 

Additional Inherited Members

- Static Public Member Functions inherited from amrex::InterpBase
static Vector< intGetBCArray (const Vector< BCRec > &bcr)
 

Detailed Description

Divergence-preserving interpolation on face centered data.

Divergence-preserving interpolation on face centered data, i.e., it ensures the divergence of the fine ghost cells match the value of the divergence of the underlying crse cell. All fine cells overlying a given coarse cell will have the same divergence, even when the coarse grid divergence is spatially varying. Based on Vanella et. al. (doi:10.1016/j.jcp.2010.05.003, section 3.2), but solves the interior closure problem using least squares with an initial guess equal to the average of fine face values across the cell.

Member Function Documentation

◆ CoarseBox() [1/2]

Box amrex::FaceDivFree::CoarseBox ( const Box fine,
const IntVect ratio 
)
overridevirtual

Returns coarsened box given fine box and refinement ratio.

Parameters
fine
ratio

Implements amrex::InterpBase.

◆ CoarseBox() [2/2]

Box amrex::FaceDivFree::CoarseBox ( const Box fine,
int  ratio 
)
overridevirtual

Returns coarsened box given fine box and refinement ratio.

Parameters
fine
ratio

Implements amrex::InterpBase.

◆ interp()

void amrex::FaceDivFree::interp ( const FArrayBox crse,
int  crse_comp,
FArrayBox fine,
int  fine_comp,
int  ncomp,
const Box fine_region,
const IntVect ratio,
const Geometry crse_geom,
const Geometry fine_geom,
Vector< BCRec > const &  bcr,
int  actual_comp,
int  actual_state,
RunOn  runon 
)
overridevirtual

Coarse to fine interpolation in space.

Parameters
crse
crse_comp
fine
fine_comp
ncomp
fine_region
ratio
crse_geom
fine_geom
bcr
actual_comp
actual_state
runon

Implements amrex::Interpolater.

◆ interp_arr()

void amrex::FaceDivFree::interp_arr ( Array< FArrayBox *, AMREX_SPACEDIM > const &  crse,
int  crse_comp,
Array< FArrayBox *, AMREX_SPACEDIM > const &  fine,
int  fine_comp,
int  ncomp,
const Box fine_region,
const IntVect ratio,
Array< IArrayBox *, AMREX_SPACEDIM > const &  solve_mask,
const Geometry crse_geom,
const Geometry fine_geom,
Vector< Array< BCRec, AMREX_SPACEDIM > > const &  bcr,
int  actual_comp,
int  actual_state,
RunOn  runon 
)
overridevirtual

Coarse to fine interpolation in space.

Parameters
crse
crse_comp
fine
fine_comp
ncomp
fine_region
ratio
solve_mask
crse_geom
fine_geom
bcr
actual_comp
actual_state
runon

Reimplemented from amrex::Interpolater.


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