Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private 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 >:
Inheritance graph
[legend]
Collaboration diagram for Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >:
Collaboration graph
[legend]

Classes

class  const_iterator
 

Public Types

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

Public Member Functions

 NekMatrix ()
 
 NekMatrix (typename boost::call_traits< NumberType >::const_reference scale, boost::shared_ptr< const InnerType > m)
 
 NekMatrix (const ThisType &rhs)
 
 NekMatrix (typename boost::call_traits< NumberType >::const_reference scale, const ThisType &rhs)
 
ConstGetValueType operator() (unsigned int row, unsigned int col) const
 
unsigned int GetStorageSize () const
 
MatrixStorage GetType () const
 
NumberType Scale () const
 
void SetScale (const NumberType &)
 
const NumberTypeGetRawPtr () const
 
boost::shared_ptr< const
InnerType
GetOwnedMatrix () 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 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 boost::shared_ptr
< ThisType
CreateWrapper (const boost::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)
 

Private Member Functions

virtual boost::call_traits
< NumberType >::value_type 
v_GetValue (unsigned int row, unsigned int column) const
 
virtual unsigned int v_GetStorageSize () const
 
virtual MatrixStorage v_GetStorageType () const
 
virtual char v_GetTransposeFlag () const
 

Private Attributes

boost::shared_ptr< const
InnerType
m_matrix
 
NumberType m_scale
 

Additional Inherited Members

- Protected Member Functions inherited from Nektar::ConstMatrix< DataType >
 ConstMatrix (unsigned int rows, unsigned int columns)
 
 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
 

Detailed Description

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

Definition at line 49 of file ScaledMatrix.hpp.

Member Typedef Documentation

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

Definition at line 52 of file ScaledMatrix.hpp.

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

Definition at line 58 of file ScaledMatrix.hpp.

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

Definition at line 57 of file ScaledMatrix.hpp.

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

Definition at line 53 of file ScaledMatrix.hpp.

template<typename DataType , typename InnerMatrixType >
typedef boost::remove_const<typename InnerType::NumberType>::type Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::NumberType

Definition at line 55 of file ScaledMatrix.hpp.

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

Definition at line 54 of file ScaledMatrix.hpp.

Constructor & Destructor Documentation

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

Definition at line 40 of file ScaledMatrix.cpp.

40  :
41  NekMatrix<NekMatrix< DataType, InnerMatrixType>, ScaledMatrixTag>::BaseType(0,0),
42  m_matrix(new typename NekMatrix<NekMatrix< DataType, InnerMatrixType>, ScaledMatrixTag>::InnerType()),
43  m_scale(0)
44  {
45  }
template<typename DataType , typename InnerMatrixType >
Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::NekMatrix ( typename boost::call_traits< NumberType >::const_reference  scale,
boost::shared_ptr< const InnerType m 
)

Definition at line 48 of file ScaledMatrix.cpp.

49  :
50  NekMatrix<NekMatrix< DataType, InnerMatrixType>, ScaledMatrixTag>::BaseType(m->GetRows(), m->GetColumns()),
51  m_matrix(m),
52  m_scale(scale)
53  {
54  }
template<typename DataType , typename InnerMatrixType >
Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::NekMatrix ( const ThisType rhs)
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

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

Definition at line 122 of file ScaledMatrix.cpp.

122 { return const_iterator(m_matrix->begin(this->GetTransposeFlag()), m_scale); }
template<typename DataType , typename InnerMatrixType >
static ThisType Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::CreateWrapper ( const ThisType rhs)
static
template<typename DataType , typename InnerMatrixType >
static boost::shared_ptr<ThisType> Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::CreateWrapper ( const boost::shared_ptr< ThisType > &  rhs)
static
template<typename DataType , typename InnerMatrixType >
NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::const_iterator Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::end ( ) const

Definition at line 126 of file ScaledMatrix.cpp.

126 { return const_iterator(m_matrix->end(this->GetTransposeFlag()), m_scale); }
template<typename DataType , typename InnerMatrixType >
unsigned int Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::GetNumberOfSubDiagonals ( ) const

Definition at line 115 of file ScaledMatrix.cpp.

115 { return m_matrix->GetNumberOfSubDiagonals(); }
template<typename DataType , typename InnerMatrixType >
unsigned int Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::GetNumberOfSuperDiagonals ( ) const

Definition at line 118 of file ScaledMatrix.cpp.

118 { return m_matrix->GetNumberOfSuperDiagonals(); }
template<typename DataType , typename InnerMatrixType >
boost::shared_ptr< const typename NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::InnerType > Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::GetOwnedMatrix ( ) const

Definition at line 109 of file ScaledMatrix.cpp.

110  {
111  return m_matrix;
112  }
template<typename DataType , typename InnerMatrixType >
const NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::NumberType * Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::GetRawPtr ( ) const

Definition at line 105 of file ScaledMatrix.cpp.

105 { return m_matrix->GetRawPtr(); }
template<typename DataType , typename InnerMatrixType >
unsigned int Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::GetStorageSize ( ) const

Definition at line 82 of file ScaledMatrix.cpp.

83  {
84  return m_matrix->GetStorageSize();
85  }
template<typename DataType , typename InnerMatrixType >
MatrixStorage Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::GetType ( ) const

Definition at line 88 of file ScaledMatrix.cpp.

88 { return m_matrix->GetStorageType(); }
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 76 of file ScaledMatrix.cpp.

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

Definition at line 98 of file ScaledMatrix.cpp.

template<typename DataType , typename InnerMatrixType >
unsigned int Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::v_GetStorageSize ( ) const
privatevirtual

Implements Nektar::ConstMatrix< DataType >.

Definition at line 151 of file ScaledMatrix.cpp.

152  {
153  return ThisType::GetStorageSize();
154  }
template<typename DataType , typename InnerMatrixType >
MatrixStorage Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::v_GetStorageType ( ) const
privatevirtual

Implements Nektar::ConstMatrix< DataType >.

Definition at line 157 of file ScaledMatrix.cpp.

158  {
159  return ThisType::GetType();
160  }
template<typename DataType , typename InnerMatrixType >
char Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::v_GetTransposeFlag ( ) const
privatevirtual

Reimplemented from Nektar::ConstMatrix< DataType >.

Definition at line 163 of file ScaledMatrix.cpp.

164  {
165  if( this->GetRawTransposeFlag() == 'N' )
166  {
167  return m_matrix->GetTransposeFlag();
168  }
169  else
170  {
171  if( m_matrix->GetTransposeFlag() == 'N' )
172  {
173  return 'T';
174  }
175  else
176  {
177  return 'N';
178  }
179  }
180  }
char GetRawTransposeFlag() const
Definition: MatrixBase.cpp:273
template<typename DataType , typename InnerMatrixType >
boost::call_traits< typename NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::NumberType >::value_type Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::v_GetValue ( unsigned int  row,
unsigned int  column 
) const
privatevirtual

Implements Nektar::ConstMatrix< DataType >.

Definition at line 145 of file ScaledMatrix.cpp.

146  {
147  return ThisType::operator()(row, column);
148  }

Member Data Documentation

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

Definition at line 156 of file ScaledMatrix.hpp.

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

Definition at line 157 of file ScaledMatrix.hpp.