NAMD
Public Member Functions | Public Attributes | List of all members
patch_sortop_curve_a Struct Reference

Public Member Functions

 patch_sortop_curve_a (PatchMap *m)
 
bool operator() (int p1, int p2) const
 

Public Attributes

PatchMappmap
 

Detailed Description

Definition at line 1913 of file WorkDistrib.C.

Constructor & Destructor Documentation

patch_sortop_curve_a::patch_sortop_curve_a ( PatchMap m)
inline

Definition at line 1915 of file WorkDistrib.C.

1915 : pmap(m) {}

Member Function Documentation

bool patch_sortop_curve_a::operator() ( int  p1,
int  p2 
) const
inline

Definition at line 1916 of file WorkDistrib.C.

References PatchMap::index_a(), PatchMap::index_b(), PatchMap::index_c(), and pmap.

1916  {
1917  int a1 = pmap->index_a(p1);
1918  int a2 = pmap->index_a(p2);
1919  if ( a1 < a2 ) return true;
1920  if ( a1 > a2 ) return false;
1921  int dir = ( (a1 & 1) ? -1 : 1 );
1922  int b1 = pmap->index_b(p1);
1923  int b2 = pmap->index_b(p2);
1924  if ( b1 * dir < b2 * dir ) return true;
1925  if ( b1 * dir > b2 * dir ) return false;
1926  dir *= ( (b1 & 1) ? -1 : 1 );
1927  int c1 = pmap->index_c(p1);
1928  int c2 = pmap->index_c(p2);
1929  if ( c1 * dir < c2 * dir ) return true;
1930  return false;
1931  }
int index_a(int pid) const
Definition: PatchMap.h:86
int index_b(int pid) const
Definition: PatchMap.h:87
int index_c(int pid) const
Definition: PatchMap.h:88

Member Data Documentation

PatchMap* patch_sortop_curve_a::pmap

Definition at line 1914 of file WorkDistrib.C.

Referenced by operator()().


The documentation for this struct was generated from the following file: