Nektar++
Public Member Functions | Public Attributes | List of all members
Nektar::Collections::OpImpTimingKey Class Reference

#include <CollectionOptimisation.h>

Public Member Functions

 OpImpTimingKey (StdRegions::StdExpansionSharedPtr pExp, int ngeoms, int nbases)
 Constructor. More...
 
 ~OpImpTimingKey (void)
 Destructor. More...
 
LibUtilities::ShapeType GetShapeType (void) const
 
int GetExpOrder () const
 
int GetNGeoms () const
 
bool operator< (const OpImpTimingKey &rhs) const
 

Public Attributes

StdRegions::StdExpansionSharedPtr m_exp
 
int m_ngeoms
 
int m_nbasis
 

Detailed Description

Definition at line 48 of file CollectionOptimisation.h.

Constructor & Destructor Documentation

◆ OpImpTimingKey()

Nektar::Collections::OpImpTimingKey::OpImpTimingKey ( StdRegions::StdExpansionSharedPtr  pExp,
int  ngeoms,
int  nbases 
)
inline

Constructor.

Definition at line 52 of file CollectionOptimisation.h.

◆ ~OpImpTimingKey()

Nektar::Collections::OpImpTimingKey::~OpImpTimingKey ( void  )
inline

Destructor.

Definition at line 59 of file CollectionOptimisation.h.

60 {
61 }

Member Function Documentation

◆ GetExpOrder()

int Nektar::Collections::OpImpTimingKey::GetExpOrder ( ) const
inline

Definition at line 68 of file CollectionOptimisation.h.

69 {
70 return m_exp->GetBasis(0)->GetNumModes();
71 }

References m_exp.

◆ GetNGeoms()

int Nektar::Collections::OpImpTimingKey::GetNGeoms ( ) const
inline

Definition at line 73 of file CollectionOptimisation.h.

74 {
75 return m_ngeoms;
76 }

References m_ngeoms.

◆ GetShapeType()

LibUtilities::ShapeType Nektar::Collections::OpImpTimingKey::GetShapeType ( void  ) const
inline

Definition at line 63 of file CollectionOptimisation.h.

64 {
65 return m_exp->DetShapeType();
66 }

References m_exp.

◆ operator<()

bool Nektar::Collections::OpImpTimingKey::operator< ( const OpImpTimingKey rhs) const
inline

Definition at line 78 of file CollectionOptimisation.h.

79 {
80
81 if (m_nbasis < rhs.m_nbasis)
82 {
83 return true;
84 }
85
86 if (m_nbasis > rhs.m_nbasis)
87 {
88 return false;
89 }
90
91 for (int i = 0; i < m_nbasis; ++i)
92 {
93 if (m_exp->GetBasis(i)->GetBasisKey() !=
94 rhs.m_exp->GetBasis(i)->GetBasisKey())
95 {
96 return (m_exp->GetBasis(i)->GetBasisKey() <
97 rhs.m_exp->GetBasis(i)->GetBasisKey());
98 }
99 }
100
101 if ((m_ngeoms < 100) && (rhs.m_ngeoms < 100))
102 {
103 if (m_ngeoms < rhs.m_ngeoms)
104 {
105 return true;
106 }
107 else
108 {
109 return false;
110 }
111 }
112
113 return false;
114 }

References m_exp, m_nbasis, and m_ngeoms.

Member Data Documentation

◆ m_exp

StdRegions::StdExpansionSharedPtr Nektar::Collections::OpImpTimingKey::m_exp

Definition at line 116 of file CollectionOptimisation.h.

Referenced by GetExpOrder(), GetShapeType(), and operator<().

◆ m_nbasis

int Nektar::Collections::OpImpTimingKey::m_nbasis

Definition at line 118 of file CollectionOptimisation.h.

Referenced by operator<().

◆ m_ngeoms

int Nektar::Collections::OpImpTimingKey::m_ngeoms

Definition at line 117 of file CollectionOptimisation.h.

Referenced by GetNGeoms(), and operator<().