Nektar++
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
Nektar::Matrix< DataType > Class Template Referenceabstract

#include <MatrixBase.hpp>

Inheritance diagram for Nektar::Matrix< DataType >:
[legend]

Public Member Functions

 ~Matrix () override
 
void SetValue (unsigned int row, unsigned int column, typename boost::call_traits< DataType >::const_reference d)
 
- Public Member Functions inherited from Nektar::ConstMatrix< DataType >
virtual ~ConstMatrix ()=default
 
boost::call_traits< DataType >::value_type operator() (unsigned int row, unsigned int column) const
 
unsigned int GetStorageSize () const
 
MatrixStorage GetType () const
 
MatrixStorage GetStorageType () const
 
unsigned int GetRows () const
 
unsigned int GetTransposedRows (char transpose) const
 
unsigned int GetColumns () const
 
unsigned int GetTransposedColumns (char transpose) const
 
const unsigned int * GetSize () const
 
void Transpose ()
 
char GetTransposeFlag () const
 

Protected Member Functions

 Matrix (unsigned int rows, unsigned int columns, MatrixStorage policy=eFULL)
 
 Matrix (const Matrix< DataType > &rhs)
 
Matrix< DataType > & operator= (const Matrix< DataType > &rhs)
 
Matrix< DataType > & operator= (const ConstMatrix< DataType > &rhs)
 
- Protected Member Functions inherited from Nektar::ConstMatrix< DataType >
 ConstMatrix (unsigned int rows, unsigned int columns, MatrixStorage policy=eFULL)
 
 ConstMatrix (const ConstMatrix< DataType > &rhs)
 
ConstMatrix< DataType > & operator= (const ConstMatrix< DataType > &rhs)
 
void Resize (unsigned int rows, unsigned int columns)
 Resets the rows and columns in the array. This method does not update the data storage to match the new row and column counts. More...
 
void SetTransposeFlag (char newValue)
 
char GetRawTransposeFlag () const
 
virtual boost::call_traits< DataType >::value_type v_GetValue (unsigned int row, unsigned int column) const =0
 
virtual unsigned int v_GetStorageSize () const =0
 
virtual void v_Transpose ()
 
virtual char v_GetTransposeFlag () const
 

Private Member Functions

virtual void v_SetValue (unsigned int row, unsigned int column, typename boost::call_traits< DataType >::const_reference d)=0
 

Additional Inherited Members

- Static Public Member Functions inherited from Nektar::ConstMatrix< DataType >
static unsigned int CalculateIndex (MatrixStorage type, unsigned int row, unsigned int col, unsigned int numRows, unsigned int numColumns, const char transpose='N', unsigned int numSubDiags=0, unsigned int numSuperDiags=0)
 
static unsigned int GetRequiredStorageSize (MatrixStorage type, unsigned int rows, unsigned int columns, unsigned int subDiags=0, unsigned int superDiags=0)
 

Detailed Description

template<typename DataType>
class Nektar::Matrix< DataType >

Definition at line 133 of file MatrixBase.hpp.

Constructor & Destructor Documentation

◆ ~Matrix()

template<typename DataType >
Nektar::Matrix< DataType >::~Matrix
override

Definition at line 271 of file MatrixBase.cpp.

272{
273}

◆ Matrix() [1/2]

template<typename DataType >
Nektar::Matrix< DataType >::Matrix ( unsigned int  rows,
unsigned int  columns,
MatrixStorage  policy = eFULL 
)
protected

Definition at line 292 of file MatrixBase.cpp.

294 : ConstMatrix<DataType>(rows, columns, policy)
295{
296}

◆ Matrix() [2/2]

template<typename DataType >
Nektar::Matrix< DataType >::Matrix ( const Matrix< DataType > &  rhs)
protected

Definition at line 299 of file MatrixBase.cpp.

300 : ConstMatrix<DataType>(rhs)
301{
302}

Member Function Documentation

◆ operator=() [1/2]

template<typename DataType >
Matrix< DataType > & Nektar::Matrix< DataType >::operator= ( const ConstMatrix< DataType > &  rhs)
protected

Definition at line 312 of file MatrixBase.cpp.

313{
315 return *this;
316}
ConstMatrix< DataType > & operator=(const ConstMatrix< DataType > &rhs)
Definition: MatrixBase.cpp:238

References Nektar::ConstMatrix< DataType >::operator=().

◆ operator=() [2/2]

template<typename DataType >
Matrix< DataType > & Nektar::Matrix< DataType >::operator= ( const Matrix< DataType > &  rhs)
protected

◆ SetValue()

template<typename DataType >
void Nektar::Matrix< DataType >::SetValue ( unsigned int  row,
unsigned int  column,
typename boost::call_traits< DataType >::const_reference  d 
)

Definition at line 276 of file MatrixBase.cpp.

279{
280 ASSERTL2(row < this->GetRows(),
281 std::string("Row ") + std::to_string(row) +
282 std::string(" requested in a matrix with a maximum of ") +
283 std::to_string(this->GetRows()) + std::string(" rows"));
284 ASSERTL2(column < this->GetColumns(),
285 std::string("Column ") + std::to_string(column) +
286 std::string(" requested in a matrix with a maximum of ") +
287 std::to_string(this->GetColumns()) + std::string(" columns"));
288 v_SetValue(row, column, d);
289}
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...
Definition: ErrorUtil.hpp:265
unsigned int GetRows() const
Definition: MatrixBase.cpp:61
unsigned int GetColumns() const
Definition: MatrixBase.cpp:73
virtual void v_SetValue(unsigned int row, unsigned int column, typename boost::call_traits< DataType >::const_reference d)=0
std::vector< double > d(NPUPPER *NPUPPER)

References ASSERTL2, and Nektar::UnitTests::d().

◆ v_SetValue()

template<typename DataType >
virtual void Nektar::Matrix< DataType >::v_SetValue ( unsigned int  row,
unsigned int  column,
typename boost::call_traits< DataType >::const_reference  d 
)
privatepure virtual