MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / BDKey

Class BDKey

Src/Base/AMReX_FabArrayBase.H:229–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227 * Objects with the same references have the same key.
228 */
229 struct BDKey {
230 BDKey () noexcept = default;
231 BDKey (const BoxArray::RefID& baid, const DistributionMapping::RefID& dmid) noexcept
232 : m_ba_id(baid), m_dm_id(dmid) {}
233 bool operator< (const BDKey& rhs) const noexcept {
234 return (m_ba_id < rhs.m_ba_id) ||
235 ((m_ba_id == rhs.m_ba_id) && (m_dm_id < rhs.m_dm_id));
236 }
237 bool operator== (const BDKey& rhs) const noexcept {
238 return m_ba_id == rhs.m_ba_id && m_dm_id == rhs.m_dm_id;
239 }
240 bool operator!= (const BDKey& rhs) const noexcept {
241 return m_ba_id != rhs.m_ba_id || m_dm_id != rhs.m_dm_id;
242 }
243 friend std::ostream& operator<< (std::ostream& os, const BDKey& id);
244 private:
245 BoxArray::RefID m_ba_id;
246 DistributionMapping::RefID m_dm_id;
247 };
248
249 [[nodiscard]] BDKey getBDKey () const noexcept {
250 return {boxarray.getRefID(), distributionMap.getRefID()};

Callers 1

clearMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected