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 247 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().

{
if( curRow <= curColumn )
{
if( (curColumn - curRow) <= nSuperDiags )
{
unsigned int elementRow = nSuperDiags - (curColumn - curRow);
unsigned int elementColumn = curColumn;
return elementRow + elementColumn*(nSuperDiags+1);
}
else
{
return std::numeric_limits<unsigned int>::max();
}
}
else
{
return CalculateIndex(curColumn,curRow,nSuperDiags);
}
}