oomph::DistributionPredicate Class Reference

Class to allow sorting of column indices in conversion to epetra matrix. More...

Public Member Functions

 DistributionPredicate (const int &first_col, const int &ncol_local)
 Constructor: Pass number of first column and the number of local columns. More...
 
bool operator() (const int &col)
 

Private Attributes

int First_col
 First column held locally. More...
 
int Last_col
 Last colum held locally. More...
 

Detailed Description

Class to allow sorting of column indices in conversion to epetra matrix.

Constructor & Destructor Documentation

◆ DistributionPredicate()

oomph::DistributionPredicate::DistributionPredicate ( const int first_col,
const int ncol_local 
)
inline

Constructor: Pass number of first column and the number of local columns.

435  : First_col(first_col), Last_col(first_col + ncol_local - 1)
436  {
437  }
int First_col
First column held locally.
Definition: trilinos_helpers.cc:455
int Last_col
Last colum held locally.
Definition: trilinos_helpers.cc:458

Member Function Documentation

◆ operator()()

bool oomph::DistributionPredicate::operator() ( const int col)
inline

Comparison operator: is column col in the range between (including) First_col and Last_col

442  {
443  if (col >= First_col && col <= Last_col)
444  {
445  return true;
446  }
447  else
448  {
449  return false;
450  }
451  }
m col(1)

References col(), First_col, and Last_col.

Member Data Documentation

◆ First_col

int oomph::DistributionPredicate::First_col
private

First column held locally.

Referenced by operator()().

◆ Last_col

int oomph::DistributionPredicate::Last_col
private

Last colum held locally.

Referenced by operator()().


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