Nektar++
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 std::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 505 of file Element.h.

Member Typedef Documentation

◆ pT

Definition at line 507 of file Element.h.

Member Function Documentation

◆ operator()()

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

Definition at line 508 of file Element.h.

509  {
510  // check for 0
511  if (a.get() == 0)
512  {
513  // if b is also 0, then they are equal, hence a is not
514  // less than b
515  return b.get() != 0;
516  }
517  else if (b.get() == 0)
518  {
519  return false;
520  }
521  else
522  {
523  return a->GetId() < b->GetId();
524  }
525  }