4#include <AMReX_Config.H>
80#ifdef AMREX_STRICT_MODE
92#ifdef AMREX_STRICT_MODE
121#ifdef AMREX_STRICT_MODE
133#ifdef AMREX_STRICT_MODE
155 [[nodiscard]]
Real min (
int comp,
157 bool local =
false)
const;
167 bool local =
false)
const;
180 [[nodiscard]]
Real max (
int comp,
182 bool local =
false)
const;
192 bool local =
false)
const;
199 [[nodiscard]]
Real norm0 (
int comp = 0,
int nghost = 0,
bool local =
false,
bool ignore_covered =
false )
const;
201 [[nodiscard]]
Real norminf (
int comp = 0,
int nghost = 0,
bool local =
false,
bool ignore_covered =
false )
const {
202 return norm0(comp,nghost,local,ignore_covered);
210 [[nodiscard]]
Real norm0 (
const iMultiFab& mask,
int comp = 0,
int nghost = 0,
bool local =
false)
const;
213 return norm0(mask,comp,nghost,local);
221 [[nodiscard]]
Real norm0 (
int comp,
int ncomp,
IntVect const& nghost,
bool local =
false,
222 bool ignore_covered =
false)
const;
235 return norm0(comps,nghost,local,ignore_covered);
245 [[nodiscard]]
Real norm1 (
int comp,
const Periodicity& period,
bool ignore_covered =
false)
const;
253 [[nodiscard]]
Real norm1 (
int comp = 0,
int ngrow = 0,
bool local =
false)
const;
269 [[nodiscard]]
Real norm2 (
int comp = 0)
const;
277 [[nodiscard]]
Real norm2 (
int comp,
int numcomp)
const;
300 [[nodiscard]]
Real sum (
int comp = 0,
bool local =
false)
const;
307 [[nodiscard]]
Real sum (
Box const& region,
int comp = 0,
bool local =
false)
const;
329 [[nodiscard]]
Real sum_unique (
Box const& region,
int comp = 0,
bool local =
false)
const;
479 void negate (
int nghost = 0);
495 int nghost = 0)
const;
503 int nghost = 0)
const;
552 int numcomp,
int nghost,
bool local =
false);
561 int numcomp,
int nghost,
bool local =
false);
569 int numcomp,
int nghost,
bool local =
false);
756 [[nodiscard]]
bool is_finite (
bool local=
false)
const;
757 [[nodiscard]]
bool is_finite (
int scomp,
int ncomp,
int ngrow = 0,
bool local=
false)
const;
758 [[nodiscard]]
bool is_finite (
int scomp,
int ncomp,
const IntVect& ngrow,
bool local=
false)
const;
769 [[nodiscard]]
bool contains_nan (
bool local=
false)
const;
770 [[nodiscard]]
bool contains_nan (
int scomp,
int ncomp,
int ngrow = 0,
bool local=
false)
const;
771 [[nodiscard]]
bool contains_nan (
int scomp,
int ncomp,
const IntVect& ngrow,
bool local=
false)
const;
780 [[nodiscard]]
bool contains_inf (
bool local=
false)
const;
781 [[nodiscard]]
bool contains_inf (
int scomp,
int ncomp,
int ngrow = 0,
bool local=
false)
const;
782 [[nodiscard]]
bool contains_inf (
int scomp,
int ncomp,
const IntVect& ngrow,
bool local=
false)
const;
831 std::allocator<MultiFab*> a1;
832 std::allocator<MultiFab const*> a2;
833 std::allocator<FabArray<FArrayBox>*> a3;
834 std::allocator<FabArray<FArrayBox>
const*> a4;
Assertion macros used across AMReX for runtime consistency checks.
BaseFab container template providing box-based field storage.
Floating-point specialization of BaseFab plus FAB I/O helpers.
Reduction helpers and utility algorithms for FabArray objects.
Distributed container of FAB objects plus copy and fill utilities.
Abstract base class for memory arenas.
Definition AMReX_Arena.H:154
Reference-counted collection of Boxes.
Definition AMReX_BoxArray.H:681
Calculates the distribution of FABs to MPI processes.
Definition AMReX_DistributionMapping.H:51
A Fortran Array of REALs.
Definition AMReX_FArrayBox.H:237
CopyComTag::CopyComTagsContainer CopyComTagsContainer
Definition AMReX_FabArrayBase.H:236
CopyComTag::MapOfCopyComTagContainers MapOfCopyComTagContainers
Definition AMReX_FabArrayBase.H:237
An Array of FortranArrayBox(FAB)-like Objects.
Definition AMReX_FabArray.H:356
FabArray() noexcept
Definition AMReX_FabArray.H:2318
Abstract factory interface for creating, aliasing, and destroying FAB objects.
Definition AMReX_FabFactory.H:73
A collection (stored as an array) of FArrayBox objects.
Definition AMReX_MultiFab.H:40
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:311
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:524
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:1640
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:1581
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:1153
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:218
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:1744
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:156
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:671
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:297
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:735
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:1315
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:237
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:257
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:320
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:613
static void Initialize()
Definition AMReX_MultiFab.cpp:427
void AverageSync(const Periodicity &period=Periodicity::NonPeriodic())
Sync up nodal data via averaging.
Definition AMReX_MultiFab.cpp:1750
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:729
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:304
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:277
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:1620
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:1593
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:198
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:918
MultiFab() noexcept
Constructs an empty MultiFab.
Definition AMReX_MultiFab.cpp:448
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:1587
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:1660
MultiFab & operator=(MultiFab &&rhs) noexcept=default
MultiFab deepCopy() const
Definition AMReX_MultiFab.cpp:176
void WeightedSync(const MultiFab &wgt, const Periodicity &period=Periodicity::NonPeriodic())
Sync up nodal data with weights.
Definition AMReX_MultiFab.cpp:1761
MultiFab(const MultiFab &rhs)=delete
~MultiFab()
Definition AMReX_MultiFab.cpp:509
static void Finalize()
Definition AMReX_MultiFab.cpp:443
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:1678
void OverrideSync(const iMultiFab &msk, const Periodicity &period=Periodicity::NonPeriodic())
Synchronize nodal data. The synchronization will override valid regions by the intersecting valid reg...
Definition AMReX_MultiFab.cpp:1781
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:29
A Collection of IArrayBoxes.
Definition AMReX_iMultiFab.H:34
amrex_real Real
Floating Point Type for Fields.
Definition AMReX_REAL.H:80
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 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:1418
IntVect maxIndex(int comp, int nghost=0) const
Definition AMReX_MultiFab.cpp:1139
Vector< Real > norminf(const Vector< int > &comps, int nghost=0, bool local=false, bool ignore_covered=false) const
Definition AMReX_MultiFab.H:234
Real norminf(int comp=0, int nghost=0, bool local=false, bool ignore_covered=false) const
Definition AMReX_MultiFab.H:201
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:1210
IntVect minIndex(int comp, int nghost=0) const
Definition AMReX_MultiFab.cpp:1131
Real norminf(const iMultiFab &mask, int comp=0, int nghost=0, bool local=false) const
Definition AMReX_MultiFab.H:212
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:1466
Definition AMReX_Amr.cpp:50
MakeType
Definition AMReX_MakeType.H:7
__host__ __device__ void ignore_unused(const Ts &...)
No-op helper that marks variables as intentionally unused.
Definition AMReX.H:273
BoxND< 3 > Box
Box is an alias for amrex::BoxND instantiated with AMREX_SPACEDIM.
Definition AMReX_BaseFwd.H:35
void LinComb(MF &dst, typename MF::value_type a, MF const &src_a, int acomp, typename MF::value_type b, MF const &src_b, int bcomp, int dcomp, int ncomp, IntVect const &nghost)
dst = a*src_a + b*src_b
Definition AMReX_FabArrayUtility.H:2246
@ y
Definition AMReX_Orientation.H:14
@ x
Definition AMReX_Orientation.H:14
DefaultFabFactory< FArrayBox > FArrayBoxFactory
Definition AMReX_FArrayBox.H:547
FabArray< BaseFab< float > > fMultiFab
Definition AMReX_MultiFab.H:19
IntVectND< 3 > IntVect
IntVect is an alias for amrex::IntVectND instantiated with AMREX_SPACEDIM.
Definition AMReX_BaseFwd.H:38
MF::value_type norminf(MF const &mf, int scomp, int ncomp, IntVect const &nghost, bool local=false)
Return the infinity norm, with an MPI maximum unless local is true.
Definition AMReX_FabArrayUtility.H:2267
void Xpay(MF &dst, typename MF::value_type a, MF const &src, int scomp, int dcomp, int ncomp, IntVect const &nghost)
dst = src + a * dst
Definition AMReX_FabArrayUtility.H:2211
void GccPlacaterMF()
Definition AMReX_MultiFab.H:829
void OverrideSync(FabArray< FAB > &fa, FabArray< IFAB > const &msk, const Periodicity &period)
Synchronize shared nodal values using an owner mask.
Definition AMReX_FabArrayUtility.H:1648
void Saxpy(MF &dst, typename MF::value_type a, MF const &src, int scomp, int dcomp, int ncomp, IntVect const &nghost)
dst += a * src
Definition AMReX_FabArrayUtility.H:2203
FabArray memory allocation information.
Definition AMReX_FabArray.H:73