Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
Nektar::NekMeshUtils::element_id_less_than Struct Reference

Define element ordering based on ID. More...

#include <Element.h>

Public Types

typedef boost::shared_ptr
< Element
pT
 

Public Member Functions

bool operator() (const pT a, const pT b) const
 

Detailed Description

Define element ordering based on ID.

Definition at line 536 of file Element.h.

Member Typedef Documentation

Definition at line 538 of file Element.h.

Member Function Documentation

bool Nektar::NekMeshUtils::element_id_less_than::operator() ( const pT  a,
const pT  b 
) const
inline

Definition at line 539 of file Element.h.

540  {
541  // check for 0
542  if (a.get() == 0)
543  {
544  // if b is also 0, then they are equal, hence a is not
545  // less than b
546  return b.get() != 0;
547  }
548  else if (b.get() == 0)
549  {
550  return false;
551  }
552  else
553  {
554  return a->GetId() < b->GetId();
555  }
556  }