4#include <AMReX_Config.H>
78#ifdef AMREX_STRICT_MODE
90#ifdef AMREX_STRICT_MODE
119#ifdef AMREX_STRICT_MODE
131#ifdef AMREX_STRICT_MODE
149 [[nodiscard]] Real
min (
int comp,
151 bool local =
false)
const;
156 [[nodiscard]] Real
min (
const Box& region,
159 bool local =
false)
const;
168 [[nodiscard]] Real
max (
int comp,
170 bool local =
false)
const;
175 [[nodiscard]] Real
max (
const Box& region,
178 bool local =
false)
const;
183 [[nodiscard]] Real
norm0 (
int comp = 0,
int nghost = 0,
bool local =
false,
bool ignore_covered =
false )
const;
184 [[nodiscard]] Real
norminf (
int comp = 0,
int nghost = 0,
bool local =
false,
bool ignore_covered =
false )
const {
185 return norm0(comp,nghost,local,ignore_covered);
188 [[nodiscard]] Real
norm0 (
const iMultiFab&
mask,
int comp = 0,
int nghost = 0,
bool local =
false)
const;
193 [[nodiscard]] Real
norm0 (
int comp,
int ncomp,
IntVect const& nghost,
bool local =
false,
194 bool ignore_covered =
false)
const;
204 return norm0(comps,nghost,local,ignore_covered);
212 [[nodiscard]] Real
norm1 (
int comp,
const Periodicity& period,
bool ignore_covered =
false)
const;
217 [[nodiscard]] Real
norm1 (
int comp = 0,
int ngrow = 0,
bool local =
false)
const;
227 [[nodiscard]] Real
norm2 (
int comp = 0)
const;
232 [[nodiscard]] Real
norm2 (
int comp,
int numcomp)
const;
246 [[nodiscard]] Real
sum (
int comp = 0,
bool local =
false)
const;
250 [[nodiscard]] Real
sum (
Box const& region,
int comp = 0,
bool local =
false)
const;
267 [[nodiscard]] Real
sum_unique (
Box const& region,
int comp = 0,
bool local =
false)
const;
359 void invert (Real numerator,
370 void invert (Real numerator,
381 void invert (Real numerator,
390 void invert (Real numerator,
417 void negate (
int nghost = 0);
428 int nghost = 0)
const;
431 int nghost = 0)
const;
477 int numcomp,
int nghost,
bool local =
false);
483 int numcomp,
int nghost,
bool local =
false);
488 int numcomp,
int nghost,
bool local =
false);
673 [[nodiscard]]
bool is_finite (
bool local=
false)
const;
674 [[nodiscard]]
bool is_finite (
int scomp,
int ncomp,
int ngrow = 0,
bool local=
false)
const;
675 [[nodiscard]]
bool is_finite (
int scomp,
int ncomp,
const IntVect& ngrow,
bool local=
false)
const;
684 [[nodiscard]]
bool contains_nan (
bool local=
false)
const;
685 [[nodiscard]]
bool contains_nan (
int scomp,
int ncomp,
int ngrow = 0,
bool local=
false)
const;
686 [[nodiscard]]
bool contains_nan (
int scomp,
int ncomp,
const IntVect& ngrow,
bool local=
false)
const;
693 [[nodiscard]]
bool contains_inf (
bool local=
false)
const;
694 [[nodiscard]]
bool contains_inf (
int scomp,
int ncomp,
int ngrow = 0,
bool local=
false)
const;
695 [[nodiscard]]
bool contains_inf (
int scomp,
int ncomp,
const IntVect& ngrow,
bool local=
false)
const;
728 std::allocator<MultiFab*> a1;
729 std::allocator<MultiFab const*> a2;
730 std::allocator<FabArray<FArrayBox>*> a3;
731 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:105
A collection of Boxes stored in an Array.
Definition AMReX_BoxArray.H:551
Calculates the distribution of FABs to MPI processes.
Definition AMReX_DistributionMapping.H:41
A Fortran Array of REALs.
Definition AMReX_FArrayBox.H:229
CopyComTag::CopyComTagsContainer CopyComTagsContainer
Definition AMReX_FabArrayBase.H:220
CopyComTag::MapOfCopyComTagContainers MapOfCopyComTagContainers
Definition AMReX_FabArrayBase.H:221
An Array of FortranArrayBox(FAB)-like Objects.
Definition AMReX_FabArray.H:345
Definition AMReX_FabFactory.H:50
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:306
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:519
FabArrayBase::CopyComTagsContainer CopyComTagsContainer
Some useful typedefs.
Definition AMReX_MultiFab.H:719
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:1437
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:1378
FabArrayBase::MapOfCopyComTagContainers MapOfCopyComTagContainers
Definition AMReX_MultiFab.H:720
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:1035
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:1541
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:664
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:292
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:725
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:1143
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:232
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:1223
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:252
IntVect maxIndex(int comp, int nghost=0) const
Definition AMReX_MultiFab.cpp:1021
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:315
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:609
Vector< Real > norminf(const Vector< int > &comps, int nghost=0, bool local=false, bool ignore_covered=false) const
Definition AMReX_MultiFab.H:203
static void Initialize()
Definition AMReX_MultiFab.cpp:422
void AverageSync(const Periodicity &period=Periodicity::NonPeriodic())
Sync up nodal data via averaging.
Definition AMReX_MultiFab.cpp:1547
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:719
Real norminf(int comp=0, int nghost=0, bool local=false, bool ignore_covered=false) const
Definition AMReX_MultiFab.H:184
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:299
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:1065
void initVal()
Definition AMReX_MultiFab.cpp:543
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:272
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:1417
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:1390
IntVect minIndex(int comp, int nghost=0) const
Definition AMReX_MultiFab.cpp:1013
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:854
Real norminf(const iMultiFab &mask, int comp=0, int nghost=0, bool local=false) const
Definition AMReX_MultiFab.H:189
MultiFab() noexcept
Constructs an empty MultiFab.
Definition AMReX_MultiFab.cpp:443
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:1384
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:1457
MultiFab & operator=(MultiFab &&rhs) noexcept=default
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:1558
MultiFab(const MultiFab &rhs)=delete
~MultiFab()
Definition AMReX_MultiFab.cpp:504
static void Finalize()
Definition AMReX_MultiFab.cpp:438
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:1475
void OverrideSync(const iMultiFab &msk, const Periodicity &period=Periodicity::NonPeriodic())
Sync up nodal data with owners overriding non-owners.
Definition AMReX_MultiFab.cpp:1578
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:1271
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
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition AMReX_Vector.H:28
Definition AMReX_iMultiFab.H:32
Definition AMReX_Amr.cpp:49
MakeType
Definition AMReX_MakeType.H:7
__host__ __device__ void ignore_unused(const Ts &...)
This shuts up the compiler about unused variables.
Definition AMReX.H:138
DefaultFabFactory< FArrayBox > FArrayBoxFactory
Definition AMReX_FArrayBox.H:458
void GccPlacaterMF()
Definition AMReX_MultiFab.H:726
FabArray memory allocation information.
Definition AMReX_FabArray.H:66