Nektar++
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag > Class Template Reference

#include <ScaledMatrix.hpp>

Inheritance diagram for Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >:
[legend]

Classes

class  const_iterator
 

Public Types

typedef ConstMatrix< DataType > BaseType
 
typedef NekMatrix< DataType, InnerMatrixType > InnerType
 
typedef NekMatrix< InnerType, ScaledMatrixTag > ThisType
 
typedef std::remove_const< typenameInnerType::NumberType >::type NumberType
 
typedef NumberType GetValueType
 
typedef NumberType ConstGetValueType
 

Public Member Functions

 NekMatrix ()
 
 NekMatrix (typename boost::call_traits< NumberType >::const_reference scale, std::shared_ptr< const InnerType > m)
 
 NekMatrix (const ThisType &rhs)
 
 NekMatrix (typename boost::call_traits< NumberType >::const_reference scale, const ThisType &rhs)
 
ThisTypeoperator= (const ThisType &)=default
 
ConstGetValueType operator() (unsigned int row, unsigned int col) const
 
unsigned int GetStorageSize () const
 
NumberType Scale () const
 
void SetScale (const NumberType &)
 
const NumberTypeGetRawPtr () const
 
std::shared_ptr< const InnerTypeGetOwnedMatrix () const
 
unsigned int GetNumberOfSubDiagonals () const
 
unsigned int GetNumberOfSuperDiagonals () const
 
const_iterator begin () const
 
const_iterator end () const
 
- Public Member Functions inherited from Nektar::ConstMatrix< DataType >
virtual ~ConstMatrix ()
 
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
 

Static Public Member Functions

static ThisType CreateWrapper (const ThisType &rhs)
 
static std::shared_ptr< ThisTypeCreateWrapper (const std::shared_ptr< ThisType > &rhs)
 
- 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)
 

Protected Member Functions

boost::call_traits< NumberType >::value_type v_GetValue (unsigned int row, unsigned int column) const override
 
unsigned int v_GetStorageSize () const override
 
char v_GetTransposeFlag () const override
 
- 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 Attributes

std::shared_ptr< const InnerTypem_matrix
 
NumberType m_scale
 

Detailed Description

template<typename DataType, typename InnerMatrixType>
class Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >

Definition at line 46 of file ScaledMatrix.hpp.

Member Typedef Documentation

◆ BaseType

template<typename DataType , typename InnerMatrixType >
typedef ConstMatrix<DataType> Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::BaseType

Definition at line 50 of file ScaledMatrix.hpp.

◆ ConstGetValueType

template<typename DataType , typename InnerMatrixType >
typedef NumberType Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::ConstGetValueType

Definition at line 57 of file ScaledMatrix.hpp.

◆ GetValueType

template<typename DataType , typename InnerMatrixType >
typedef NumberType Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::GetValueType

Definition at line 56 of file ScaledMatrix.hpp.

◆ InnerType

template<typename DataType , typename InnerMatrixType >
typedef NekMatrix<DataType, InnerMatrixType> Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::InnerType

Definition at line 51 of file ScaledMatrix.hpp.

◆ NumberType

template<typename DataType , typename InnerMatrixType >
typedef std::remove_const<typenameInnerType::NumberType>::type Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::NumberType

Definition at line 54 of file ScaledMatrix.hpp.

◆ ThisType

template<typename DataType , typename InnerMatrixType >
typedef NekMatrix<InnerType, ScaledMatrixTag> Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::ThisType

Definition at line 52 of file ScaledMatrix.hpp.

Constructor & Destructor Documentation

◆ NekMatrix() [1/4]

template<typename DataType , typename InnerMatrixType >
Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::NekMatrix

Definition at line 42 of file ScaledMatrix.cpp.

43 : NekMatrix<NekMatrix<DataType, InnerMatrixType>,
44 ScaledMatrixTag>::BaseType(0, 0, eFULL),
45 m_matrix(new typename NekMatrix<NekMatrix<DataType, InnerMatrixType>,
46 ScaledMatrixTag>::InnerType()),
47 m_scale(0)
48{
49}

◆ NekMatrix() [2/4]

template<typename DataType , typename InnerMatrixType >
Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::NekMatrix ( typename boost::call_traits< NumberType >::const_reference  scale,
std::shared_ptr< const InnerType m 
)

Definition at line 52 of file ScaledMatrix.cpp.

55 : NekMatrix<NekMatrix<DataType, InnerMatrixType>,
56 ScaledMatrixTag>::BaseType(m->GetRows(), m->GetColumns(),
57 m->GetStorageType()),
58 m_matrix(m), m_scale(scale)
59{
60}

◆ NekMatrix() [3/4]

template<typename DataType , typename InnerMatrixType >
Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::NekMatrix ( const ThisType rhs)

◆ NekMatrix() [4/4]

template<typename DataType , typename InnerMatrixType >
Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::NekMatrix ( typename boost::call_traits< NumberType >::const_reference  scale,
const ThisType rhs 
)

Member Function Documentation

◆ begin()

template<typename DataType , typename InnerMatrixType >
NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::const_iterator Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::begin

Definition at line 149 of file ScaledMatrix.cpp.

150{
151 return const_iterator(m_matrix->begin(this->GetTransposeFlag()), m_scale);
152}

◆ CreateWrapper() [1/2]

template<typename DataType , typename InnerMatrixType >
static std::shared_ptr< ThisType > Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::CreateWrapper ( const std::shared_ptr< ThisType > &  rhs)
static

◆ CreateWrapper() [2/2]

template<typename DataType , typename InnerMatrixType >
static ThisType Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::CreateWrapper ( const ThisType rhs)
static

◆ end()

template<typename DataType , typename InnerMatrixType >
NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::const_iterator Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::end

Definition at line 157 of file ScaledMatrix.cpp.

158{
159 return const_iterator(m_matrix->end(this->GetTransposeFlag()), m_scale);
160}

◆ GetNumberOfSubDiagonals()

template<typename DataType , typename InnerMatrixType >
unsigned int Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::GetNumberOfSubDiagonals

Definition at line 134 of file ScaledMatrix.cpp.

135{
136 return m_matrix->GetNumberOfSubDiagonals();
137}

◆ GetNumberOfSuperDiagonals()

template<typename DataType , typename InnerMatrixType >
unsigned int Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::GetNumberOfSuperDiagonals

Definition at line 141 of file ScaledMatrix.cpp.

142{
143 return m_matrix->GetNumberOfSuperDiagonals();
144}

◆ GetOwnedMatrix()

template<typename DataType , typename InnerMatrixType >
std::shared_ptr< const typename NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::InnerType > Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::GetOwnedMatrix

Definition at line 127 of file ScaledMatrix.cpp.

128{
129 return m_matrix;
130}

◆ GetRawPtr()

template<typename DataType , typename InnerMatrixType >
const NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::NumberType * Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::GetRawPtr

Definition at line 117 of file ScaledMatrix.cpp.

119{
120 return m_matrix->GetRawPtr();
121}

◆ GetStorageSize()

template<typename DataType , typename InnerMatrixType >
unsigned int Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::GetStorageSize

Definition at line 94 of file ScaledMatrix.cpp.

95{
96 return m_matrix->GetStorageSize();
97}

◆ operator()()

template<typename DataType , typename InnerMatrixType >
NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::ConstGetValueType Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::operator() ( unsigned int  row,
unsigned int  col 
) const

Definition at line 86 of file ScaledMatrix.cpp.

88{
89 return m_scale * m_matrix->GetValue(row, col, this->GetTransposeFlag());
90}
char GetTransposeFlag() const
Definition: MatrixBase.cpp:122

◆ operator=()

template<typename DataType , typename InnerMatrixType >
ThisType & Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::operator= ( const ThisType )
default

◆ Scale()

template<typename DataType , typename InnerMatrixType >
NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::NumberType Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::Scale

Definition at line 102 of file ScaledMatrix.cpp.

103{
104 return m_scale * m_matrix->Scale();
105}

◆ SetScale()

template<typename DataType , typename InnerMatrixType >
void Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::SetScale ( const NumberType value)

Definition at line 108 of file ScaledMatrix.cpp.

110{
111 m_scale = value;
112}

◆ v_GetStorageSize()

template<typename DataType , typename InnerMatrixType >
unsigned int Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::v_GetStorageSize
overrideprotectedvirtual

Implements Nektar::ConstMatrix< DataType >.

Definition at line 194 of file ScaledMatrix.cpp.

195{
196 return ThisType::GetStorageSize();
197}

◆ v_GetTransposeFlag()

template<typename DataType , typename InnerMatrixType >
char Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::v_GetTransposeFlag
overrideprotectedvirtual

Reimplemented from Nektar::ConstMatrix< DataType >.

Definition at line 201 of file ScaledMatrix.cpp.

202{
203 if (this->GetRawTransposeFlag() == 'N')
204 {
205 return m_matrix->GetTransposeFlag();
206 }
207 else
208 {
209 if (m_matrix->GetTransposeFlag() == 'N')
210 {
211 return 'T';
212 }
213 else
214 {
215 return 'N';
216 }
217 }
218}
char GetRawTransposeFlag() const
Definition: MatrixBase.hpp:116

◆ v_GetValue()

template<typename DataType , typename InnerMatrixType >
boost::call_traits< typenameNekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::NumberType >::value_type Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::v_GetValue ( unsigned int  row,
unsigned int  column 
) const
overrideprotectedvirtual

Implements Nektar::ConstMatrix< DataType >.

Definition at line 186 of file ScaledMatrix.cpp.

188{
189 return ThisType::operator()(row, column);
190}

Member Data Documentation

◆ m_matrix

template<typename DataType , typename InnerMatrixType >
std::shared_ptr<const InnerType> Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::m_matrix
private

Definition at line 154 of file ScaledMatrix.hpp.

◆ m_scale

template<typename DataType , typename InnerMatrixType >
NumberType Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::m_scale
private

Definition at line 155 of file ScaledMatrix.hpp.