Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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 423 of file Element.h.

Member Typedef Documentation

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

427  {
428  // check for 0
429  if (a.get() == 0)
430  {
431  // if b is also 0, then they are equal, hence a is not
432  // less than b
433  return b.get() != 0;
434  }
435  else if (b.get() == 0)
436  {
437  return false;
438  }
439  else
440  {
441  return a->GetId() < b->GetId();
442  }
443  }