Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | List of all members
Nektar::SymmetricBandedMatrixFuncs Struct Reference

#include <MatrixFuncs.h>

Inheritance diagram for Nektar::SymmetricBandedMatrixFuncs:
Inheritance graph
[legend]
Collaboration diagram for Nektar::SymmetricBandedMatrixFuncs:
Collaboration graph
[legend]

Static Public Member Functions

static unsigned int CalculateIndex (unsigned int curRow, unsigned int curColumn, unsigned int nSuperDiags)
 

Additional Inherited Members

- Static Private Member Functions inherited from Nektar::TriangularBandedMatrixFuncs
static unsigned int GetRequiredStorageSize (unsigned int rows, unsigned int columns, unsigned int nSubSuperDiags)
 

Detailed Description

Definition at line 249 of file MatrixFuncs.h.

Member Function Documentation

unsigned int Nektar::SymmetricBandedMatrixFuncs::CalculateIndex ( unsigned int  curRow,
unsigned int  curColumn,
unsigned int  nSuperDiags 
)
static

Definition at line 381 of file MatrixFuncs.cpp.

Referenced by Nektar::ConstMatrix< DataType >::CalculateIndex().

383  {
384  if( curRow <= curColumn )
385  {
386  if( (curColumn - curRow) <= nSuperDiags )
387  {
388  unsigned int elementRow = nSuperDiags - (curColumn - curRow);
389  unsigned int elementColumn = curColumn;
390 
391  return elementRow + elementColumn*(nSuperDiags+1);
392  }
393  else
394  {
395  return std::numeric_limits<unsigned int>::max();
396  }
397  }
398  else
399  {
400  return CalculateIndex(curColumn,curRow,nSuperDiags);
401  }
402 
403  }
static unsigned int CalculateIndex(unsigned int curRow, unsigned int curColumn, unsigned int nSuperDiags)