1 #ifndef AMREX_LayoutData_H_
2 #define AMREX_LayoutData_H_
3 #include <AMReX_Config.H>
46 m_data(std::move(rhs.m_data)),
49 rhs.m_need_to_clear_bd =
false;
76 m_data = std::move(rhs.m_data);
79 rhs.m_need_to_clear_bd =
false;
86 int local_index = a_mfi.LocalIndex();
89 return m_data[local_index];
95 int local_index = a_mfi.LocalIndex();
98 return m_data[local_index];
103 int local_index = this->
localindex(a_box_index);
105 return m_data[local_index];
111 int local_index = this->
localindex(a_box_index);
113 return m_data[local_index];
#define BL_ASSERT(EX)
Definition: AMReX_BLassert.H:39
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
Base class for FabArray.
Definition: AMReX_FabArrayBase.H:41
void clearThisBD(bool no_assertion=false) const
clear BD count and caches associated with this BD, if no other is using this BD.
FabArrayBase & operator=(const FabArrayBase &rhs)=default
void addThisBD()
add the current BD into BD count database
void define(const BoxArray &bxs, const DistributionMapping &dm, int nvar, int ngrow)
int localindex(int K) const noexcept
Return local index in the vector of FABs.
Definition: AMReX_FabArrayBase.H:118
int local_size() const noexcept
Return the number of local FABs in the FabArray.
Definition: AMReX_FabArrayBase.H:112
const DistributionMapping & DistributionMap() const noexcept
Return constant reference to associated DistributionMapping.
Definition: AMReX_FabArrayBase.H:130
a one-thingy-per-box distributed object
Definition: AMReX_LayoutData.H:13
T & operator[](int a_box_index) noexcept
Definition: AMReX_LayoutData.H:101
LayoutData(LayoutData &&rhs) noexcept
Definition: AMReX_LayoutData.H:44
Vector< T > m_data
Definition: AMReX_LayoutData.H:120
const T * data() const noexcept
Definition: AMReX_LayoutData.H:116
bool m_need_to_clear_bd
Definition: AMReX_LayoutData.H:121
const T & operator[](int a_box_index) const noexcept
Definition: AMReX_LayoutData.H:109
~LayoutData()
Definition: AMReX_LayoutData.H:34
T * data() noexcept
Definition: AMReX_LayoutData.H:117
LayoutData(const LayoutData &rhs) noexcept
Definition: AMReX_LayoutData.H:36
void define(const BoxArray &a_grids, const DistributionMapping &a_dm)
Definition: AMReX_LayoutData.H:25
LayoutData & operator=(const LayoutData &rhs) noexcept
Definition: AMReX_LayoutData.H:52
LayoutData(const BoxArray &a_grids, const DistributionMapping &a_dm)
Definition: AMReX_LayoutData.H:19
T & operator[](const MFIter &a_mfi) noexcept
Definition: AMReX_LayoutData.H:84
const T & operator[](const MFIter &a_mfi) const noexcept
Definition: AMReX_LayoutData.H:93
Definition: AMReX_MFIter.H:57
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition: AMReX_Vector.H:27
Definition: AMReX_Amr.cpp:49