1 #ifndef AMREX_FLUXREGISTER_H_
2 #define AMREX_FLUXREGISTER_H_
3 #include <AMReX_Config.H>
94 int nComp () const noexcept;
106 Real
SumReg (
int comp) const;
249 RunOn runon) noexcept;
271 RunOn runon) noexcept;
288 RunOn runon) noexcept;
354 Real
scale,
int srccomp,
int destcomp,
int numcomp,
371 void write (const std::
string& name, std::ostream& os) const;
379 void read (const std::
string& name, std::istream& is);
384 Real
scale,
int scomp,
int dcomp,
int nc, const
Geometry& geom);
A BndryRegister organizes FabSets bounding each grid in a BoxArray. A FabSet is maintained for each b...
Definition: AMReX_BndryRegister.H:41
A collection of Boxes stored in an Array.
Definition: AMReX_BoxArray.H:550
Calculates the distribution of FABs to MPI processes.
Definition: AMReX_DistributionMapping.H:41
A Fortran Array of REALs.
Definition: AMReX_FArrayBox.H:229
Flux Register.
Definition: AMReX_FluxRegister.H:20
~FluxRegister()=default
The destructor.
FrOp
An enum that says whether to add or copy src data to members.
Definition: AMReX_FluxRegister.H:55
@ ADD
Definition: AMReX_FluxRegister.H:55
@ COPY
Definition: AMReX_FluxRegister.H:55
void write(const std::string &name, std::ostream &os) const
Write (used for writing to checkpoint)
Definition: AMReX_FluxRegister.cpp:881
void read(const std::string &name, std::istream &is)
Read (used for reading from checkpoint)
Definition: AMReX_FluxRegister.cpp:897
void Reflux(MultiFab &mf, const MultiFab &volume, Real scale, int scomp, int dcomp, int nc, const Geometry &crse_geom)
Apply flux correction. Note that this takes the coarse Geometry.
Definition: AMReX_FluxRegister.cpp:523
int ncomp
Number of state components.
Definition: AMReX_FluxRegister.H:395
void OverwriteFlux(Array< MultiFab *, AMREX_SPACEDIM > const &crse_fluxes, Real scale, int srccomp, int destcomp, int numcomp, const Geometry &crse_geom)
Overwrite the coarse flux at the coarse/fine interface (and the interface only) with the fine flux st...
Definition: AMReX_FluxRegister.cpp:732
int fine_level
Current level + 1.
Definition: AMReX_FluxRegister.H:392
FluxRegister(FluxRegister &&rhs) noexcept=default
void clear()
Definition: AMReX_FluxRegister.cpp:89
void CrseAdd(const MultiFab &mflx, const MultiFab &area, int dir, int srccomp, int destcomp, int numcomp, Real mult, const Geometry &geom)
Add coarse fluxes to the flux register. This is different from CrseInit with FluxRegister::ADD....
Definition: AMReX_FluxRegister.cpp:283
FluxRegister(const FluxRegister &rhs)=delete
void FineSetVal(int dir, int boxno, int destcomp, int numcomp, Real val, RunOn runon) noexcept
Set flux correction data for a fine box (given by boxno) to a given value. This routine used by FLASH...
Definition: AMReX_FluxRegister.cpp:496
int fineLevel() const noexcept
Returns the level number of the fine level.
Definition: AMReX_FluxRegister.cpp:34
IntVect ratio
Refinement ratio.
Definition: AMReX_FluxRegister.H:389
Real SumReg(int comp) const
Returns the sum of the registers.
Definition: AMReX_FluxRegister.cpp:95
FluxRegister()
The default constructor.
Definition: AMReX_FluxRegister.cpp:11
const BoxArray & coarsenedBoxes() const noexcept
The coarsened boxes.
Definition: AMReX_FluxRegister.cpp:52
void ClearInternalBorders(const Geometry &crse_geom)
Set internal borders to zero.
Definition: AMReX_FluxRegister.cpp:644
void FineAdd(const MultiFab &mflx, int dir, int srccomp, int destcomp, int numcomp, Real mult)
Increment flux correction with fine data.
Definition: AMReX_FluxRegister.cpp:359
void CrseInit(const MultiFab &mflx, const MultiFab &area, int dir, int srccomp, int destcomp, int numcomp, Real mult=-1.0, FrOp op=FluxRegister::COPY)
Initialize flux correction with coarse data.
Definition: AMReX_FluxRegister.cpp:160
const IntVect & refRatio() const noexcept
Returns the refinement ratio.
Definition: AMReX_FluxRegister.cpp:28
FluxRegister & operator=(const FluxRegister &rhs)=delete
void define(const BoxArray &fine_boxes, const DistributionMapping &dm, const IntVect &ref_ratio, int fine_lev, int nvar)
Initialize after using default constructor. This version allows setting the DistributionMapping.
Definition: AMReX_FluxRegister.cpp:58
int crseLevel() const noexcept
Returns the level number of the coarse level (fineLevel()-1).
Definition: AMReX_FluxRegister.cpp:40
int nComp() const noexcept
The number of components.
Definition: AMReX_FluxRegister.cpp:46
Rectangular problem domain geometry.
Definition: AMReX_Geometry.H:73
A collection (stored as an array) of FArrayBox objects.
Definition: AMReX_MultiFab.H:38
Encapsulation of the Orientation of the Faces of a Box.
Definition: AMReX_Orientation.H:29
Definition: AMReX_Amr.cpp:49
RunOn
Definition: AMReX_GpuControl.H:69
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > scale(const IntVectND< dim > &p, int s) noexcept
Returns a IntVectND obtained by multiplying each of the components of this IntVectND by s.
Definition: AMReX_IntVect.H:1006
std::array< T, N > Array
Definition: AMReX_Array.H:24