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 382 of file MatrixFuncs.cpp.

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

References CalculateIndex().

Referenced by CalculateIndex().

◆ GetRequiredStorageSize()

unsigned int Nektar::TriangularBandedMatrixFuncs::GetRequiredStorageSize ( unsigned int  rows,
unsigned int  columns,
unsigned int  nSubSuperDiags 
)
static

Definition at line 303 of file MatrixFuncs.cpp.

377{
378 ASSERTL0(rows == columns, "Triangular matrices must be square.");
379 return (nSubSuperDiags + 1) * columns;
380}
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:208

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