Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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...
 
bool operator< (const OpImpTimingKey &rhs) const
 

Public Attributes

StdRegions::StdExpansionSharedPtr m_exp
 
int m_ngeoms
 
int m_nbasis
 

Detailed Description

Definition at line 49 of file CollectionOptimisation.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 53 of file CollectionOptimisation.h.

54  :
55  m_exp(pExp),
56  m_ngeoms(ngeoms),
57  m_nbasis(nbases)
58  {
59  }
StdRegions::StdExpansionSharedPtr m_exp
Nektar::Collections::OpImpTimingKey::~OpImpTimingKey ( void  )
inline

Destructor.

Definition at line 62 of file CollectionOptimisation.h.

63  {
64  }

Member Function Documentation

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

Definition at line 67 of file CollectionOptimisation.h.

References m_exp, m_nbasis, and m_ngeoms.

68  {
69 
70  if(m_nbasis < rhs.m_nbasis)
71  {
72  return true;
73  }
74 
75  if(m_nbasis > rhs.m_nbasis)
76  {
77  return false;
78  }
79 
80  for(int i = 0; i < m_nbasis; ++i)
81  {
82  if( m_exp->GetBasis(i)->GetBasisKey() !=
83  rhs.m_exp->GetBasis(i)->GetBasisKey() )
84  {
85  return (m_exp->GetBasis(i)->GetBasisKey() <
86  rhs.m_exp->GetBasis(i)->GetBasisKey());
87  }
88  }
89 
90  if( (m_ngeoms < 100) && (rhs.m_ngeoms < 100) )
91  {
92  if(m_ngeoms < rhs.m_ngeoms)
93  {
94  return true;
95  }
96  else
97  {
98  return false;
99  }
100  }
101 
102  return false;
103  }
StdRegions::StdExpansionSharedPtr m_exp

Member Data Documentation

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

Definition at line 105 of file CollectionOptimisation.h.

Referenced by operator<().

int Nektar::Collections::OpImpTimingKey::m_nbasis

Definition at line 107 of file CollectionOptimisation.h.

Referenced by operator<().

int Nektar::Collections::OpImpTimingKey::m_ngeoms

Definition at line 106 of file CollectionOptimisation.h.

Referenced by operator<().