Nektar++
Public Types | Public Member Functions | List of all members
Nektar::Utilities::element_id_less_than Struct Reference

Define element ordering based on ID. More...

#include <MeshElements.h>

Public Types

typedef boost::shared_ptr< ElementpT
 

Public Member Functions

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

Detailed Description

Define element ordering based on ID.

Definition at line 1014 of file MeshElements.h.

Member Typedef Documentation

Definition at line 1016 of file MeshElements.h.

Member Function Documentation

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

Definition at line 1017 of file MeshElements.h.

1018  {
1019  // check for 0
1020  if (a.get() == 0)
1021  {
1022  // if b is also 0, then they are equal, hence a is not
1023  // less than b
1024  return b.get() != 0;
1025  }
1026  else if (b.get() == 0)
1027  {
1028  return false;
1029  }
1030  else
1031  {
1032  return a->GetId() < b->GetId();
1033  }
1034  }