41template <
typename DataType,
typename InnerMatrixType>
51template <
typename DataType,
typename InnerMatrixType>
53 typename boost::call_traits<NumberType>::const_reference scale,
54 std::shared_ptr<const InnerType> m)
56 ScaledMatrixTag>::
BaseType(m->GetRows(), m->GetColumns(),
58 m_matrix(m), m_scale(scale)
62template <
typename DataType,
typename InnerMatrixType>
66 ScaledMatrixTag>::BaseType(rhs),
67 m_matrix(rhs.m_matrix), m_scale(rhs.m_scale)
71template <
typename DataType,
typename InnerMatrixType>
72NekMatrix<NekMatrix<DataType, InnerMatrixType>, ScaledMatrixTag>::NekMatrix(
73 typename boost::call_traits<
74 typename NekMatrix<NekMatrix<DataType, InnerMatrixType>,
75 ScaledMatrixTag>::NumberType>::const_reference scale,
76 const NekMatrix<InnerType, ScaledMatrixTag> &rhs)
77 : NekMatrix<NekMatrix<DataType, InnerMatrixType>,
78 ScaledMatrixTag>::BaseType(rhs),
79 m_matrix(rhs.m_matrix), m_scale(scale)
83template <
typename DataType,
typename InnerMatrixType>
84typename NekMatrix<NekMatrix<DataType, InnerMatrixType>,
85 ScaledMatrixTag>::ConstGetValueType
87 unsigned int row,
unsigned int col)
const
89 return m_scale * m_matrix->GetValue(row, col, this->GetTransposeFlag());
92template <
typename DataType,
typename InnerMatrixType>
94 ScaledMatrixTag>::GetStorageSize()
const
96 return m_matrix->GetStorageSize();
99template <
typename DataType,
typename InnerMatrixType>
101 ScaledMatrixTag>::NumberType
104 return m_scale * m_matrix->Scale();
107template <
typename DataType,
typename InnerMatrixType>
114template <
typename DataType,
typename InnerMatrixType>
116 ScaledMatrixTag>::NumberType *
120 return m_matrix->GetRawPtr();
123template <
typename DataType,
typename InnerMatrixType>
124std::shared_ptr<const typename NekMatrix<NekMatrix<DataType, InnerMatrixType>,
125 ScaledMatrixTag>::InnerType>
127 ScaledMatrixTag>::GetOwnedMatrix()
const
132template <
typename DataType,
typename InnerMatrixType>
134 ScaledMatrixTag>::GetNumberOfSubDiagonals()
const
136 return m_matrix->GetNumberOfSubDiagonals();
139template <
typename DataType,
typename InnerMatrixType>
141 ScaledMatrixTag>::GetNumberOfSuperDiagonals()
const
143 return m_matrix->GetNumberOfSuperDiagonals();
146template <
typename DataType,
typename InnerMatrixType>
148 ScaledMatrixTag>::const_iterator
151 return const_iterator(m_matrix->begin(this->GetTransposeFlag()), m_scale);
154template <
typename DataType,
typename InnerMatrixType>
156 ScaledMatrixTag>::const_iterator
159 return const_iterator(m_matrix->end(this->GetTransposeFlag()), m_scale);
162template <
typename DataType,
typename InnerMatrixType>
166 ScaledMatrixTag> &rhs)
172template <
typename DataType,
typename InnerMatrixType>
174 NekMatrix<NekMatrix<DataType, InnerMatrixType>, ScaledMatrixTag>>
175NekMatrix<NekMatrix<DataType, InnerMatrixType>, ScaledMatrixTag>::CreateWrapper(
176 const std::shared_ptr<
177 NekMatrix<NekMatrix<DataType, InnerMatrixType>, ScaledMatrixTag>> &rhs)
179 return std::shared_ptr<ThisType>(
new ThisType(*rhs));
182template <
typename DataType,
typename InnerMatrixType>
183typename boost::call_traits<
184 typename NekMatrix<NekMatrix<DataType, InnerMatrixType>,
185 ScaledMatrixTag>::NumberType>::value_type
187 unsigned int row,
unsigned int column)
const
189 return ThisType::operator()(row, column);
192template <
typename DataType,
typename InnerMatrixType>
194 ScaledMatrixTag>::v_GetStorageSize()
const
196 return ThisType::GetStorageSize();
199template <
typename DataType,
typename InnerMatrixType>
201 ScaledMatrixTag>::v_GetTransposeFlag()
const
203 if (this->GetRawTransposeFlag() ==
'N')
205 return m_matrix->GetTransposeFlag();
209 if (m_matrix->GetTransposeFlag() ==
'N')
220template <
typename DataType>
230 NekMatrix<NekDouble, StandardMatrixTag>, ScaledMatrixTag>;
237template <
typename DataType>
240 v.SetScale(-1.0 * v.Scale());
#define LIB_UTILITIES_EXPORT
std::remove_const< typenameInnerType::NumberType >::type NumberType
void NegateInPlace(NekVector< DataType > &v)
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)