Nektar++
Static Public Member Functions | List of all members
Nektar::SymmetricBandedMatrixFuncs Struct Reference

#include <MatrixFuncs.h>

Inheritance diagram for Nektar::SymmetricBandedMatrixFuncs:
[legend]

Static Public Member Functions

static unsigned int CalculateIndex (unsigned int curRow, unsigned int curColumn, unsigned int nSuperDiags)
 
static unsigned int GetRequiredStorageSize (unsigned int rows, unsigned int columns, unsigned int nSubSuperDiags)
 

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 320 of file MatrixFuncs.h.

Member Function Documentation

◆ CalculateIndex()

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

Definition at line 389 of file MatrixFuncs.cpp.

391 {
392  if (curRow <= curColumn)
393  {
394  if ((curColumn - curRow) <= nSuperDiags)
395  {
396  unsigned int elementRow = nSuperDiags - (curColumn - curRow);
397  unsigned int elementColumn = curColumn;
398 
399  return elementRow + elementColumn * (nSuperDiags + 1);
400  }
401  else
402  {
403  return std::numeric_limits<unsigned int>::max();
404  }
405  }
406  else
407  {
408  return CalculateIndex(curColumn, curRow, nSuperDiags);
409  }
410 }
static unsigned int CalculateIndex(unsigned int curRow, unsigned int curColumn, unsigned int nSuperDiags)

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

◆ GetRequiredStorageSize()

unsigned int Nektar::TriangularBandedMatrixFuncs::GetRequiredStorageSize
static

Definition at line 303 of file MatrixFuncs.cpp.

384 {
385  ASSERTL0(rows == columns, "Triangular matrices must be square.");
386  return (nSubSuperDiags + 1) * columns;
387 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:215

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