12 #include <fei_macros.hpp>
39 template<
class LocalOrdinal,
class GlobalOrdinal>
43 Dof(LocalOrdinal rank, GlobalOrdinal
id, LocalOrdinal field)
44 : m_rank(rank), m_id(id), m_field(field) {}
49 LocalOrdinal rank()
const {
return m_rank; }
50 GlobalOrdinal id()
const {
return m_id; }
51 LocalOrdinal field()
const {
return m_field; }
61 template<
class LocalOrdinal,
class GlobalOrdinal>
62 struct less_rank_id_field {
63 bool operator()(
const Dof<LocalOrdinal,GlobalOrdinal>& dof1,
64 const Dof<LocalOrdinal,GlobalOrdinal>& dof2)
const
66 if (dof1.rank()==dof2.rank()) {
67 if (dof1.id() == dof2.id())
return dof1.field() < dof2.field();
68 else return dof1.id() < dof2.id();
71 return dof1.rank() < dof2.rank();
75 bool operator()(
const Dof<LocalOrdinal,GlobalOrdinal>* dof1,
76 const Dof<LocalOrdinal,GlobalOrdinal>* dof2)
const
78 if (dof1->rank()==dof2->rank()) {
79 if (dof1->id() == dof2->id())
return dof1->field() < dof2->field();
80 else return dof1->id() < dof2->id();
83 return dof1->rank() < dof2->rank();
90 template<
class LocalOrdinal,
class GlobalOrdinal>
91 struct less_field_rank_id {
92 bool operator()(
const Dof<LocalOrdinal,GlobalOrdinal>& dof1,
93 const Dof<LocalOrdinal,GlobalOrdinal>& dof2)
const
95 if (dof1.field()==dof2.field()) {
96 if (dof1.rank() == dof2.rank())
return dof1.id() < dof2.id();
97 else return dof1.rank() < dof2.rank();
100 return dof1.field() < dof2.field();
104 bool operator()(
const Dof<LocalOrdinal,GlobalOrdinal>* dof1,
105 const Dof<LocalOrdinal,GlobalOrdinal>* dof2)
const
107 if (dof1->field()==dof2->field()) {
108 if (dof1->rank() == dof2->rank())
return dof1->id() < dof2->id();
109 else return dof1->rank() < dof2->rank();
112 return dof1->field() < dof2->field();
Dof(LocalOrdinal rank, GlobalOrdinal id, LocalOrdinal field)