Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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
 
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 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 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 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, 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
 

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 41 of file ScaledMatrix.cpp.

41  :
42  NekMatrix<NekMatrix< DataType, InnerMatrixType>, ScaledMatrixTag>::BaseType(0,0,m_matrix->GetStorageType()),
43  m_matrix(new typename NekMatrix<NekMatrix< DataType, InnerMatrixType>, ScaledMatrixTag>::InnerType()),
44  m_scale(0)
45  {
46  }
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 49 of file ScaledMatrix.cpp.

50  :
51  NekMatrix<NekMatrix< DataType, InnerMatrixType>, ScaledMatrixTag>::BaseType(m->GetRows(), m->GetColumns(),m->GetStorageType()),
52  m_matrix(m),
53  m_scale(scale)
54  {
55  }
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 120 of file ScaledMatrix.cpp.

120 { 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 124 of file ScaledMatrix.cpp.

124 { 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 113 of file ScaledMatrix.cpp.

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

Definition at line 116 of file ScaledMatrix.cpp.

116 { 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 107 of file ScaledMatrix.cpp.

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

Definition at line 103 of file ScaledMatrix.cpp.

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

Definition at line 83 of file ScaledMatrix.cpp.

84  {
85  return m_matrix->GetStorageSize();
86  }
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 77 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 96 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 149 of file ScaledMatrix.cpp.

150  {
151  return ThisType::GetStorageSize();
152  }
template<typename DataType , typename InnerMatrixType >
char Nektar::NekMatrix< NekMatrix< DataType, InnerMatrixType >, ScaledMatrixTag >::v_GetTransposeFlag ( ) const
privatevirtual

Reimplemented from Nektar::ConstMatrix< DataType >.

Definition at line 155 of file ScaledMatrix.cpp.

156  {
157  if( this->GetRawTransposeFlag() == 'N' )
158  {
159  return m_matrix->GetTransposeFlag();
160  }
161  else
162  {
163  if( m_matrix->GetTransposeFlag() == 'N' )
164  {
165  return 'T';
166  }
167  else
168  {
169  return 'N';
170  }
171  }
172  }
char GetRawTransposeFlag() const
Definition: MatrixBase.hpp:115
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 143 of file ScaledMatrix.cpp.

144  {
145  return ThisType::operator()(row, column);
146  }

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 152 of file ScaledMatrix.hpp.

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

Definition at line 153 of file ScaledMatrix.hpp.