18#include "ioss_export.h"
30 ZoneConnectivity(std::string name,
int owner_zone, std::string donor_name,
int donor_zone,
35 : m_connectionName(std::move(name)), m_donorName(std::move(donor_name)),
36 m_transform(p_transform), m_ownerRangeBeg(range_beg), m_ownerRangeEnd(range_end),
37 m_ownerOffset(owner_offset), m_donorRangeBeg(donor_beg), m_donorRangeEnd(donor_end),
38 m_donorOffset(donor_offset), m_ownerZone(owner_zone), m_donorZone(donor_zone)
41 m_ownsSharedNodes = m_ownerZone < m_donorZone || m_donorZone == -1;
42 m_isActive = has_faces();
45 ZoneConnectivity(std::string name,
int owner_zone, std::string donor_name,
int donor_zone,
49 : m_connectionName(std::move(name)), m_donorName(std::move(donor_name)),
50 m_transform(p_transform), m_ownerRangeBeg(range_beg), m_ownerRangeEnd(range_end),
51 m_donorRangeBeg(donor_beg), m_donorRangeEnd(donor_end), m_ownerZone(owner_zone),
52 m_donorZone(donor_zone), m_ownsSharedNodes(owns_nodes), m_fromDecomp(from_decomp)
56 m_isActive = has_faces();
66 for (
int i = 0; i < 3; i++) {
67 snc *= (std::abs(m_ownerRangeEnd[i] - m_ownerRangeBeg[i]) + 1);
92 std::string m_connectionName{};
93 std::string m_donorName{};
97 template <
class Archive>
void serialize(Archive &archive)
99 archive(m_connectionName, m_donorName, m_transform, m_ownerRangeBeg, m_ownerRangeEnd,
100 m_ownerOffset, m_donorRangeBeg, m_donorRangeEnd, m_donorOffset, m_ownerGUID,
101 m_donorGUID, m_ownerZone, m_donorZone, m_ownerProcessor, m_donorProcessor,
102 m_sameRange, m_ownsSharedNodes, m_fromDecomp, m_isActive);
119 size_t m_ownerGUID{};
120 size_t m_donorGUID{};
125 int m_ownerProcessor{-1};
126 int m_donorProcessor{-1};
127 bool m_sameRange{
false};
130 bool m_ownsSharedNodes{
false};
133 mutable bool m_fromDecomp{
false};
135 bool m_isActive{
true};
141 IOSS_EXPORT std::ostream &
operator<<(std::ostream &os,
const ZoneConnectivity &zgc);
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40
std::ostream & operator<<(std::ostream &os, const Field &fld)
Definition Ioss_Field.C:41
std::array< int, 3 > IJK_t
Definition Ioss_CodeTypes.h:24
Definition Ioss_ZoneConnectivity.h:24
ZoneConnectivity(const ZoneConnectivity ©_from)=default
ZoneConnectivity()=default
IOSS_NODISCARD bool is_from_decomp() const
Definition Ioss_ZoneConnectivity.h:89
IOSS_NODISCARD size_t get_shared_node_count() const
Definition Ioss_ZoneConnectivity.h:63
ZoneConnectivity(std::string name, int owner_zone, std::string donor_name, int donor_zone, const Ioss::IJK_t p_transform, const Ioss::IJK_t range_beg, const Ioss::IJK_t range_end, const Ioss::IJK_t donor_beg, const Ioss::IJK_t donor_end, const Ioss::IJK_t owner_offset=IJK_t(), const Ioss::IJK_t donor_offset=IJK_t())
Definition Ioss_ZoneConnectivity.h:30
void serialize(Archive &archive)
Definition Ioss_ZoneConnectivity.h:97
ZoneConnectivity(std::string name, int owner_zone, std::string donor_name, int donor_zone, Ioss::IJK_t p_transform, Ioss::IJK_t range_beg, Ioss::IJK_t range_end, Ioss::IJK_t donor_beg, Ioss::IJK_t donor_end, bool owns_nodes, bool from_decomp)
Definition Ioss_ZoneConnectivity.h:45
ZoneConnectivity & operator=(const ZoneConnectivity ©_from)=default
IOSS_NODISCARD bool is_active() const
Definition Ioss_ZoneConnectivity.h:90