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 533 of file Element.h.

Member Typedef Documentation

Definition at line 535 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 536 of file Element.h.

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