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)=default
 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 46 of file CollectionOptimisation.h.

Constructor & Destructor Documentation

◆ OpImpTimingKey()

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

Constructor.

Definition at line 50 of file CollectionOptimisation.h.

◆ ~OpImpTimingKey()

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

Destructor.

Member Function Documentation

◆ GetExpOrder()

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

Definition at line 64 of file CollectionOptimisation.h.

65 {
66 return m_exp->GetBasis(0)->GetNumModes();
67 }

References m_exp.

◆ GetNGeoms()

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

Definition at line 69 of file CollectionOptimisation.h.

70 {
71 return m_ngeoms;
72 }

References m_ngeoms.

◆ GetShapeType()

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

Definition at line 59 of file CollectionOptimisation.h.

60 {
61 return m_exp->DetShapeType();
62 }

References m_exp.

◆ operator<()

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

Definition at line 74 of file CollectionOptimisation.h.

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

References m_exp, m_nbasis, and m_ngeoms.

Member Data Documentation

◆ m_exp

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

Definition at line 112 of file CollectionOptimisation.h.

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

◆ m_nbasis

int Nektar::Collections::OpImpTimingKey::m_nbasis

Definition at line 114 of file CollectionOptimisation.h.

Referenced by operator<().

◆ m_ngeoms

int Nektar::Collections::OpImpTimingKey::m_ngeoms

Definition at line 113 of file CollectionOptimisation.h.

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