4 #include <AMReX_Config.H>
77 #ifdef AMREX_STRICT_MODE
89 #ifdef AMREX_STRICT_MODE
118 #ifdef AMREX_STRICT_MODE
130 #ifdef AMREX_STRICT_MODE
148 [[nodiscard]] Real
min (
int comp,
150 bool local =
false)
const;
155 [[nodiscard]] Real
min (
const Box& region,
158 bool local =
false)
const;
167 [[nodiscard]] Real
max (
int comp,
169 bool local =
false)
const;
174 [[nodiscard]] Real
max (
const Box& region,
177 bool local =
false)
const;
182 [[nodiscard]] Real
norm0 (
int comp = 0,
int nghost = 0,
bool local =
false,
bool ignore_covered =
false )
const;
183 [[nodiscard]] Real
norminf (
int comp = 0,
int nghost = 0,
bool local =
false,
bool ignore_covered =
false )
const {
184 return norm0(comp,nghost,local,ignore_covered);
187 [[nodiscard]] Real
norm0 (
const iMultiFab&
mask,
int comp = 0,
int nghost = 0,
bool local =
false)
const;
192 [[nodiscard]] Real
norm0 (
int comp,
int ncomp,
IntVect const& nghost,
bool local =
false,
193 bool ignore_covered =
false)
const;
203 return norm0(comps,nghost,local,ignore_covered);
211 [[nodiscard]] Real
norm1 (
int comp,
const Periodicity& period,
bool ignore_covered =
false)
const;
216 [[nodiscard]] Real
norm1 (
int comp = 0,
int ngrow = 0,
bool local =
false)
const;
226 [[nodiscard]] Real
norm2 (
int comp = 0)
const;
240 [[nodiscard]] Real
sum (
int comp = 0,
bool local =
false)
const;
244 [[nodiscard]] Real
sum (
Box const& region,
int comp = 0,
bool local =
false)
const;
261 [[nodiscard]] Real
sum_unique (
Box const& region,
int comp = 0,
bool local =
false)
const;
353 void invert (Real numerator,
364 void invert (Real numerator,
375 void invert (Real numerator,
384 void invert (Real numerator,
411 void negate (
int nghost = 0);
422 int nghost = 0)
const;
425 int nghost = 0)
const;
471 int numcomp,
int nghost,
bool local =
false);
477 int numcomp,
int nghost,
bool local =
false);
482 int numcomp,
int nghost,
bool local =
false);
667 [[nodiscard]]
bool is_finite (
bool local=
false)
const;
668 [[nodiscard]]
bool is_finite (
int scomp,
int ncomp,
int ngrow = 0,
bool local=
false)
const;
669 [[nodiscard]]
bool is_finite (
int scomp,
int ncomp,
const IntVect& ngrow,
bool local=
false)
const;
678 [[nodiscard]]
bool contains_nan (
bool local=
false)
const;
679 [[nodiscard]]
bool contains_nan (
int scomp,
int ncomp,
int ngrow = 0,
bool local=
false)
const;
680 [[nodiscard]]
bool contains_nan (
int scomp,
int ncomp,
const IntVect& ngrow,
bool local=
false)
const;
687 [[nodiscard]]
bool contains_inf (
bool local=
false)
const;
688 [[nodiscard]]
bool contains_inf (
int scomp,
int ncomp,
int ngrow = 0,
bool local=
false)
const;
689 [[nodiscard]]
bool contains_inf (
int scomp,
int ncomp,
const IntVect& ngrow,
bool local=
false)
const;
722 std::allocator<MultiFab*> a1;
723 std::allocator<MultiFab const*> a2;
724 std::allocator<FabArray<FArrayBox>*> a3;
725 std::allocator<FabArray<FArrayBox>
const*> a4;
Array4< int const > mask
Definition: AMReX_InterpFaceRegister.cpp:93
A virtual base class for objects that manage their own dynamic memory allocation.
Definition: AMReX_Arena.H:100
A collection of Boxes stored in an Array.
Definition: AMReX_BoxArray.H:549
Calculates the distribution of FABs to MPI processes.
Definition: AMReX_DistributionMapping.H:41
CopyComTag::CopyComTagsContainer CopyComTagsContainer
Definition: AMReX_FabArrayBase.H:219
CopyComTag::MapOfCopyComTagContainers MapOfCopyComTagContainers
Definition: AMReX_FabArrayBase.H:220
An Array of FortranArrayBox(FAB)-like Objects.
Definition: AMReX_FabArray.H:344
A collection (stored as an array) of FArrayBox objects.
Definition: AMReX_MultiFab.H:38
static void LinComb(MultiFab &dst, Real a, const MultiFab &x, int xcomp, Real b, const MultiFab &y, int ycomp, int dstcomp, int numcomp, int nghost)
dst = a*x + b*y
Definition: AMReX_MultiFab.cpp:359
void define(const BoxArray &bxs, const DistributionMapping &dm, int nvar, int ngrow, const MFInfo &info=MFInfo(), const FabFactory< FArrayBox > &factory=FArrayBoxFactory())
Definition: AMReX_MultiFab.cpp:572
void invert(Real numerator, int comp, int num_comp, int nghost=0)
Replaces the value of each cell in the specified subregion of the MultiFab with its reciprocal multip...
Definition: AMReX_MultiFab.cpp:1476
void minus(const MultiFab &mf, int strt_comp, int num_comp, int nghost)
This function subtracts the values of the cells in mf from the corresponding cells of this MultiFab....
Definition: AMReX_MultiFab.cpp:1417
Real norm0(int comp=0, int nghost=0, bool local=false, bool ignore_covered=false) const
Returns the maximum absolute value contained in component comp of the MultiFab.
Definition: AMReX_MultiFab.cpp:1084
static void Swap(MultiFab &dst, MultiFab &src, int srccomp, int dstcomp, int numcomp, int nghost)
Swap from src to dst including nghost ghost cells. The two MultiFabs MUST have the same underlying Bo...
Definition: AMReX_MultiFab.cpp:213
std::unique_ptr< iMultiFab > OwnerMask(const Periodicity &period=Periodicity::NonPeriodic()) const
Owner is the grid with the lowest grid number containing the data.
Definition: AMReX_MultiFab.cpp:1580
static void Add(MultiFab &dst, const MultiFab &src, int srccomp, int dstcomp, int numcomp, int nghost)
Add src to dst including nghost ghost cells. The two MultiFabs MUST have the same underlying BoxArray...
Definition: AMReX_MultiFab.cpp:151
bool contains_nan(bool local=false) const
Are there any NaNs in the MF? This may return false, even if the MF contains NaNs,...
Definition: AMReX_MultiFab.cpp:713
static void Saxpy(MultiFab &dst, Real a, const MultiFab &src, int srccomp, int dstcomp, int numcomp, int nghost)
dst += a*src
Definition: AMReX_MultiFab.cpp:345
static Real Dot(const MultiFab &x, int xcomp, const MultiFab &y, int ycomp, int numcomp, int nghost, bool local=false)
Returns the dot product of two MultiFabs.
Definition: AMReX_MultiFab.cpp:37
Real min(int comp, int nghost=0, bool local=false) const
Returns the minimum value contained in component comp of the MultiFab.
Definition: AMReX_MultiFab.cpp:774
Real norm1(int comp, const Periodicity &period, bool ignore_covered=false) const
Returns the L1 norm of component comp over the MultiFab.
Definition: AMReX_MultiFab.cpp:1182
static void Subtract(MultiFab &dst, const MultiFab &src, int srccomp, int dstcomp, int numcomp, int nghost)
Subtract src from dst including nghost ghost cells. The two MultiFabs MUST have the same underlying B...
Definition: AMReX_MultiFab.cpp:285
Real sum(int comp=0, bool local=false) const
Returns the sum of component "comp" over the MultiFab – no ghost cells are included.
Definition: AMReX_MultiFab.cpp:1262
static void Multiply(MultiFab &dst, const MultiFab &src, int srccomp, int dstcomp, int numcomp, int nghost)
Multiply dst by src including nghost ghost cells. The two MultiFabs MUST have the same underlying Box...
Definition: AMReX_MultiFab.cpp:305
IntVect maxIndex(int comp, int nghost=0) const
Definition: AMReX_MultiFab.cpp:1070
static void AddProduct(MultiFab &dst, const MultiFab &src1, int comp1, const MultiFab &src2, int comp2, int dstcomp, int numcomp, int nghost)
dst += src1*src2
Definition: AMReX_MultiFab.cpp:368
bool is_finite(bool local=false) const
Are the numbers in the MF finite (i.e., neither nan nor inf)? This may return true,...
Definition: AMReX_MultiFab.cpp:658
static void Initialize()
Definition: AMReX_MultiFab.cpp:475
void AverageSync(const Periodicity &period=Periodicity::NonPeriodic())
Sync up nodal data via averaging.
Definition: AMReX_MultiFab.cpp:1586
Vector< Real > norminf(const Vector< int > &comps, int nghost=0, bool local=false, bool ignore_covered=false) const
Definition: AMReX_MultiFab.H:202
bool contains_inf(bool local=false) const
Are there any Infs in the MF? This may return false, even if the MF contains Infs,...
Definition: AMReX_MultiFab.cpp:768
Real norminf(int comp=0, int nghost=0, bool local=false, bool ignore_covered=false) const
Definition: AMReX_MultiFab.H:183
static void Xpay(MultiFab &dst, Real a, const MultiFab &src, int srccomp, int dstcomp, int numcomp, int nghost)
dst = src + a*dst
Definition: AMReX_MultiFab.cpp:352
Real norm2(int comp=0) const
Returns the L2 norm of component comp over the MultiFab. No ghost cells are used.
Definition: AMReX_MultiFab.cpp:1114
MultiFab & operator=(MultiFab &&rhs) noexcept=default
void initVal()
Definition: AMReX_MultiFab.cpp:596
static void Divide(MultiFab &dst, const MultiFab &src, int srccomp, int dstcomp, int numcomp, int nghost)
Divide dst by src including nghost ghost cells. The two MultiFabs MUST have the same underlying BoxAr...
Definition: AMReX_MultiFab.cpp:325
void mult(Real val, int comp, int num_comp, int nghost=0)
Scales the value of each cell in the specified subregion of the MultiFab by the scalar val (a[i] <- a...
Definition: AMReX_MultiFab.cpp:1456
void plus(Real val, int comp, int num_comp, int nghost=0)
Adds the scalar value val to the value of each cell in the specified subregion of the MultiFab.
Definition: AMReX_MultiFab.cpp:1429
IntVect minIndex(int comp, int nghost=0) const
Definition: AMReX_MultiFab.cpp:1062
static void Copy(MultiFab &dst, const MultiFab &src, int srccomp, int dstcomp, int numcomp, int nghost)
Copy from src to dst including nghost ghost cells. The two MultiFabs MUST have the same underlying Bo...
Definition: AMReX_MultiFab.cpp:193
Real max(int comp, int nghost=0, bool local=false) const
Returns the maximum value contained in component comp of the MultiFab.
Definition: AMReX_MultiFab.cpp:903
Real norminf(const iMultiFab &mask, int comp=0, int nghost=0, bool local=false) const
Definition: AMReX_MultiFab.H:188
MultiFab() noexcept
Constructs an empty MultiFab.
Definition: AMReX_MultiFab.cpp:496
void divide(const MultiFab &mf, int strt_comp, int num_comp, int nghost)
This function divides the values of the cells in mf from the corresponding cells of this MultiFab....
Definition: AMReX_MultiFab.cpp:1423
void negate(int comp, int num_comp, int nghost=0)
Negates the value of each cell in the specified subregion of the MultiFab. The subregion consists of ...
Definition: AMReX_MultiFab.cpp:1496
MultiFab deepCopy() const
Definition: AMReX_MultiFab.cpp:171
void WeightedSync(const MultiFab &wgt, const Periodicity &period=Periodicity::NonPeriodic())
Sync up nodal data with weights.
Definition: AMReX_MultiFab.cpp:1597
MultiFab(const MultiFab &rhs)=delete
~MultiFab()
Definition: AMReX_MultiFab.cpp:557
static void Finalize()
Definition: AMReX_MultiFab.cpp:491
std::unique_ptr< MultiFab > OverlapMask(const Periodicity &period=Periodicity::NonPeriodic()) const
Return a mask indicating how many duplicates are in each point.
Definition: AMReX_MultiFab.cpp:1514
void OverrideSync(const iMultiFab &msk, const Periodicity &period=Periodicity::NonPeriodic())
Sync up nodal data with owners overriding non-owners.
Definition: AMReX_MultiFab.cpp:1617
Real sum_unique(int comp=0, bool local=false, const Periodicity &period=Periodicity::NonPeriodic()) const
Same as sum with local =false, but for non-cell-centered data, this only adds non-unique points that ...
Definition: AMReX_MultiFab.cpp:1310
This provides length of period for periodic domains. 0 means it is not periodic in that direction....
Definition: AMReX_Periodicity.H:17
static const Periodicity & NonPeriodic() noexcept
Definition: AMReX_Periodicity.cpp:52
Definition: AMReX_iMultiFab.H:32
Definition: AMReX_Amr.cpp:49
MakeType
Definition: AMReX_MakeType.H:7
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void ignore_unused(const Ts &...)
This shuts up the compiler about unused variables.
Definition: AMReX.H:111
DefaultFabFactory< FArrayBox > FArrayBoxFactory
Definition: AMReX_FArrayBox.H:494
void GccPlacaterMF()
Definition: AMReX_MultiFab.H:720
FabArray memory allocation information.
Definition: AMReX_FabArray.H:66