Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BlockMatrix.cpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // For more information, please see: http://www.nektar.info
4 //
5 // The MIT License
6 //
7 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
8 // Department of Aeronautics, Imperial College London (UK), and Scientific
9 // Computing and Imaging Institute, University of Utah (USA).
10 //
11 // License for the specific language governing rights and limitations under
12 // Permission is hereby granted, free of charge, to any person obtaining a
13 // copy of this software and associated documentation files (the "Software"),
14 // to deal in the Software without restriction, including without limitation
15 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 // and/or sell copies of the Software, and to permit persons to whom the
17 // Software is furnished to do so, subject to the following conditions:
18 //
19 // The above copyright notice and this permission notice shall be included
20 // in all copies or substantial portions of the Software.
21 //
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28 // DEALINGS IN THE SOFTWARE.
29 //
30 // Description:
31 //
32 ///////////////////////////////////////////////////////////////////////////////
33 
37 
38 
39 namespace Nektar
40 {
41  template<typename DataType, typename InnerMatrixType>
43  BaseType(0,0,type),
44  m_data(),
45  m_rowSizes(),
46  m_columnSizes(),
47  m_storageSize(),
48  m_numberOfBlockRows(0),
49  m_numberOfBlockColumns(0)
50  {
51  }
52 
53  template<typename DataType, typename InnerMatrixType>
54  NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::NekMatrix(unsigned int numberOfBlockRows, unsigned int numberOfBlockColumns,
55  unsigned int rowsPerBlock, unsigned int columnsPerBlock,
56  MatrixStorage type) :
57  BaseType(numberOfBlockRows*rowsPerBlock, numberOfBlockColumns*columnsPerBlock,type),
58  m_data(),
59  m_rowSizes(numberOfBlockRows),
60  m_columnSizes(numberOfBlockColumns),
61  m_storageSize(0),
62  m_numberOfBlockRows(numberOfBlockRows),
63  m_numberOfBlockColumns(numberOfBlockColumns)
64  {
65  m_storageSize = GetRequiredStorageSize();
66  m_data = Array<OneD, boost::shared_ptr<InnerType> >(m_storageSize, boost::shared_ptr<InnerType>());
67  for(unsigned int i = 1; i <= numberOfBlockRows; ++i)
68  {
69  m_rowSizes[i-1] = i*rowsPerBlock-1;
70  }
71 
72  for(unsigned int i = 1; i <= numberOfBlockColumns; ++i)
73  {
74  m_columnSizes[i-1] = i*columnsPerBlock-1;
75  }
76  }
77 
78  template<typename DataType, typename InnerMatrixType>
79  NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::NekMatrix(unsigned int numberOfBlockRows, unsigned int numberOfBlockColumns,
80  const unsigned int* rowsPerBlock, const unsigned int* columnsPerBlock,
81  MatrixStorage type) :
82  BaseType(std::accumulate(rowsPerBlock, rowsPerBlock + numberOfBlockRows, 0),
83  std::accumulate(columnsPerBlock, columnsPerBlock + numberOfBlockColumns, 0),
84  type),
85  m_data(),
86  m_rowSizes(numberOfBlockRows),
87  m_columnSizes(numberOfBlockColumns),
88  m_storageSize(0),
89  m_numberOfBlockRows(numberOfBlockRows),
90  m_numberOfBlockColumns(numberOfBlockColumns)
91  {
92  m_storageSize = GetRequiredStorageSize();
93  m_data = Array<OneD, boost::shared_ptr<InnerType> >(m_storageSize, boost::shared_ptr<InnerType>());
94  Initialize(rowsPerBlock, columnsPerBlock);
95  }
96 
97  template<typename DataType, typename InnerMatrixType>
98  NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::NekMatrix(unsigned int numberOfBlockRows, unsigned int numberOfBlockColumns,
99  const Array<OneD, const unsigned int>& rowsPerBlock, const Array<OneD, const unsigned int>& columnsPerBlock,
100  MatrixStorage type) :
101  BaseType(std::accumulate(rowsPerBlock.data(), rowsPerBlock.data() + numberOfBlockRows, 0),
102  std::accumulate(columnsPerBlock.data(), columnsPerBlock.data() + numberOfBlockColumns, 0),
103  type),
104  m_data(),
105  m_rowSizes(numberOfBlockRows),
106  m_columnSizes(numberOfBlockColumns),
107  m_storageSize(0),
108  m_numberOfBlockRows(numberOfBlockRows),
109  m_numberOfBlockColumns(numberOfBlockColumns)
110  {
111  m_storageSize = GetRequiredStorageSize();
112  m_data = Array<OneD, boost::shared_ptr<InnerType> >(m_storageSize, boost::shared_ptr<InnerType>());
113  Initialize(rowsPerBlock.data(), columnsPerBlock.data());
114  }
115 
116  template<typename DataType, typename InnerMatrixType>
118  const Array<OneD, const unsigned int>& columnsPerBlock,
119  MatrixStorage type) :
120  BaseType(std::accumulate(rowsPerBlock.begin(), rowsPerBlock.end(), 0),
121  std::accumulate(columnsPerBlock.begin(), columnsPerBlock.end(), 0),
122  type),
123  m_data(),
124  m_rowSizes(rowsPerBlock.num_elements()),
125  m_columnSizes(columnsPerBlock.num_elements()),
126  m_storageSize(0),
127  m_numberOfBlockRows(rowsPerBlock.num_elements()),
128  m_numberOfBlockColumns(columnsPerBlock.num_elements())
129  {
130  m_storageSize = GetRequiredStorageSize();
131  m_data = Array<OneD, boost::shared_ptr<InnerType> >(m_storageSize, boost::shared_ptr<InnerType>());
132  Initialize(rowsPerBlock.data(), columnsPerBlock.data());
133  }
134 
135  template<typename DataType, typename InnerMatrixType>
137  BaseType(rhs),
138  m_data(rhs.m_data.num_elements()),
139  m_rowSizes(rhs.m_rowSizes),
140  m_columnSizes(rhs.m_columnSizes),
141  m_storageSize(rhs.m_storageSize),
142  m_numberOfBlockRows(rhs.m_numberOfBlockRows),
143  m_numberOfBlockColumns(rhs.m_numberOfBlockColumns)
144  {
145  for(unsigned int i = 0; i < rhs.m_data.num_elements(); ++i)
146  {
147  m_data[i] = InnerType::CreateWrapper(rhs.m_data[i]);
148  }
149  }
150 
151  template<typename DataType, typename InnerMatrixType>
152  unsigned int NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::GetRequiredStorageSize() const
153  {
154  return BaseType::GetRequiredStorageSize(this->GetStorageType(), this->GetNumberOfBlockRows(),
155  this->GetNumberOfBlockColumns());
156  }
157 
158  template<typename DataType, typename InnerMatrixType>
159  unsigned int NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::CalculateBlockIndex(unsigned int row, unsigned int column) const
160  {
161  return BaseType::CalculateIndex(this->GetStorageType(),
162  row, column, m_numberOfBlockRows, m_numberOfBlockColumns, this->GetTransposeFlag());
163  }
164 
165  template<typename DataType, typename InnerMatrixType>
166  const typename NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::InnerType*
167  NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::GetBlockPtr(unsigned int row, unsigned int column) const
168  {
169  ASSERTL2(row < m_numberOfBlockRows, std::string("Row ") + boost::lexical_cast<std::string>(row) +
170  std::string(" requested in a block matrix with a maximum of ") + boost::lexical_cast<std::string>(m_numberOfBlockRows) +
171  std::string(" rows"));
172  ASSERTL2(column < m_numberOfBlockColumns, std::string("Column ") + boost::lexical_cast<std::string>(column) +
173  std::string(" requested in a block matrix with a maximum of ") + boost::lexical_cast<std::string>(m_numberOfBlockColumns) +
174  std::string(" columns"));
175  int x = CalculateBlockIndex(row,column);
176  if (x == -1)
177  {
178  return 0;
179  }
180  else
181  {
182  return m_data[x].get();
183  }
184  }
185 
186  template<typename DataType, typename InnerMatrixType>
187  boost::shared_ptr<const typename NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::InnerType>
188  NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::GetBlock(unsigned int row, unsigned int column) const
189  {
190  ASSERTL2(row < m_numberOfBlockRows, std::string("Row ") + boost::lexical_cast<std::string>(row) +
191  std::string(" requested in a block matrix with a maximum of ") + boost::lexical_cast<std::string>(m_numberOfBlockRows) +
192  std::string(" rows"));
193  ASSERTL2(column < m_numberOfBlockColumns, std::string("Column ") + boost::lexical_cast<std::string>(column) +
194  std::string(" requested in a block matrix with a maximum of ") + boost::lexical_cast<std::string>(m_numberOfBlockColumns) +
195  std::string(" columns"));
196  int x = CalculateBlockIndex(row,column);
197  if (x < 0)
198  {
199  return boost::shared_ptr<const InnerType>();
200  }
201  else
202  {
203  return m_data[x];
204  }
205  }
206 
207  template<typename DataType, typename InnerMatrixType>
208  boost::shared_ptr<typename NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::InnerType>&
209  NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::GetBlock(unsigned int row, unsigned int column)
210  {
211  ASSERTL2(row < m_numberOfBlockRows, std::string("Row ") + boost::lexical_cast<std::string>(row) +
212  std::string(" requested in a block matrix with a maximum of ") + boost::lexical_cast<std::string>(m_numberOfBlockRows) +
213  std::string(" rows"));
214  ASSERTL2(column < m_numberOfBlockColumns, std::string("Column ") + boost::lexical_cast<std::string>(column) +
215  std::string(" requested in a block matrix with a maximum of ") + boost::lexical_cast<std::string>(m_numberOfBlockColumns) +
216  std::string(" columns"));
217  int x = CalculateBlockIndex(row,column);
218  if (x == -1)
219  {
220  return m_nullBlockPtr;
221  }
222  else
223  {
224  return m_data[x];
225  }
226  }
227 
228  template<typename DataType, typename InnerMatrixType>
229  void NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::SetBlock(unsigned int row, unsigned int column, boost::shared_ptr<InnerType>& m)
230  {
231  ASSERTL2(row < m_numberOfBlockRows, std::string("Row ") + boost::lexical_cast<std::string>(row) +
232  std::string(" requested in a block matrix with a maximum of ") + boost::lexical_cast<std::string>(m_numberOfBlockRows) +
233  std::string(" rows"));
234  ASSERTL2(column < m_numberOfBlockColumns, std::string("Column ") + boost::lexical_cast<std::string>(column) +
235  std::string(" requested in a block matrix with a maximum of ") + boost::lexical_cast<std::string>(m_numberOfBlockColumns) +
236  std::string(" columns"));
237  m_data[CalculateBlockIndex(row, column)] = InnerType::CreateWrapper(m);
238  }
239 
240 
241 
242  template<typename DataType, typename InnerMatrixType>
243  typename NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::ConstGetValueType
244  NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::operator()(unsigned int row, unsigned int col) const
245  {
246  ASSERTL2(row < this->GetRows(), std::string("Row ") + boost::lexical_cast<std::string>(row) +
247  std::string(" requested in a matrix with a maximum of ") + boost::lexical_cast<std::string>(this->GetRows()) +
248  std::string(" rows"));
249  ASSERTL2(col < this->GetColumns(), std::string("Column ") + boost::lexical_cast<std::string>(col) +
250  std::string(" requested in a matrix with a maximum of ") + boost::lexical_cast<std::string>(this->GetColumns()) +
251  std::string(" columns"));
252 
253 
254  const Array<OneD, unsigned int>* rowSizes = &m_rowSizes;
255  const Array<OneD, unsigned int>* columnSizes = &m_columnSizes;
256 
257  if( this->GetTransposeFlag() == 'T' )
258  {
259  std::swap(rowSizes, columnSizes);
260  }
261 
262  unsigned int blockRow = std::lower_bound(rowSizes->begin(), rowSizes->end(), row) - rowSizes->begin();
263  unsigned int blockColumn = std::lower_bound(columnSizes->begin(), columnSizes->end(), col) - columnSizes->begin();
264  const boost::shared_ptr<const InnerType> block = GetBlock(blockRow, blockColumn);
265 
266  unsigned int actualRow = row;
267  if( blockRow > 0 )
268  {
269  actualRow = row-((*rowSizes)[blockRow-1])-1;
270  }
271 
272  unsigned int actualCol = col;
273  if( blockColumn > 0 )
274  {
275  actualCol = col-((*columnSizes)[blockColumn-1])-1;
276  }
277 
278 
279  if( block )
280  {
281  return (*block)(actualRow, actualCol);
282  }
283  else
284  {
285  return m_zeroElement;
286  }
287  }
288 
289  template<typename DataType, typename InnerMatrixType>
290  unsigned int NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::GetStorageSize() const
291  {
292  return m_storageSize;
293  }
294 
295  template<typename DataType, typename InnerMatrixType>
296  unsigned int NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::GetNumberOfBlockRows() const
297  {
298  if( this->GetTransposeFlag() == 'N' )
299  {
300  return m_numberOfBlockRows;
301  }
302  else
303  {
304  return m_numberOfBlockColumns;
305  }
306  }
307 
308  template<typename DataType, typename InnerMatrixType>
309  unsigned int NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::GetNumberOfBlockColumns() const
310  {
311  if( this->GetTransposeFlag() == 'N' )
312  {
313  return m_numberOfBlockColumns;
314  }
315  else
316  {
317  return m_numberOfBlockRows;
318  }
319  }
320 
321  template<typename DataType, typename InnerMatrixType>
322  unsigned int NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::GetNumberOfRowsInBlockRow(unsigned int blockRow) const
323  {
324  if( this->GetTransposeFlag() == 'N' )
325  {
326  return GetNumberOfElementsInBlock(blockRow, m_numberOfBlockRows, m_rowSizes);
327  }
328  else
329  {
330  return GetNumberOfElementsInBlock(blockRow, m_numberOfBlockColumns, m_columnSizes);
331  }
332  }
333 
334  template<typename DataType, typename InnerMatrixType>
335  unsigned int NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::GetNumberOfColumnsInBlockColumn(unsigned int blockCol) const
336  {
337  if( this->GetTransposeFlag() == 'T' )
338  {
339  return GetNumberOfElementsInBlock(blockCol, m_numberOfBlockRows, m_rowSizes);
340  }
341  else
342  {
343  return GetNumberOfElementsInBlock(blockCol, m_numberOfBlockColumns, m_columnSizes);
344  }
345  }
346 
347  template<typename DataType, typename InnerMatrixType>
348  void NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::GetBlockSizes(
349  Array<OneD, unsigned int>& rowSizes,
350  Array<OneD, unsigned int>& colSizes) const
351  {
352  if( this->GetTransposeFlag() == 'T' )
353  {
354  rowSizes = m_columnSizes;
355  colSizes = m_rowSizes;
356  }
357  else
358  {
359  rowSizes = m_rowSizes;
360  colSizes = m_columnSizes;
361  }
362  }
363 
364  template<typename DataType, typename InnerMatrixType>
365  typename NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::iterator NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::begin() { return iterator(*this, 0, 0); }
366 
367  template<typename DataType, typename InnerMatrixType>
368  typename NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::iterator NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::end() { return iterator(*this); }
369 
370  template<typename DataType, typename InnerMatrixType>
371  typename NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::const_iterator NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::begin() const { return const_iterator(*this, 0, 0); }
372 
373  template<typename DataType, typename InnerMatrixType>
374  typename NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::const_iterator NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::end() const { return const_iterator(*this); }
375 
376 
377  template<typename DataType, typename InnerMatrixType>
378  NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag> NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::CreateWrapper(const NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>& rhs)
379  {
380  return ThisType(rhs);
381  }
382 
383  template<typename DataType, typename InnerMatrixType>
384  boost::shared_ptr<NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag> > NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::CreateWrapper(const boost::shared_ptr<NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag> >& rhs)
385  {
386  return boost::shared_ptr<ThisType>(new ThisType(*rhs));
387  }
388 
389 
390  template<typename DataType, typename InnerMatrixType>
391  unsigned int NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::GetNumberOfElementsInBlock(unsigned int block, unsigned int totalBlocks, const Array<OneD, unsigned int>& sizes)
392  {
393  ASSERTL2(block < totalBlocks, std::string("Block Element ") + boost::lexical_cast<std::string>(block) +
394  std::string(" requested in a matrix with a maximum of ") + boost::lexical_cast<std::string>(totalBlocks) +
395  std::string(" blocks."));
396  if( block == 0 )
397  {
398  return sizes[block]+1;
399  }
400  else
401  {
402  return sizes[block] - sizes[block-1];
403  }
404  }
405 
406  template<typename DataType, typename InnerMatrixType>
407  void NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::Initialize(const unsigned int* rowsPerBlock, const unsigned int* columnsPerBlock)
408  {
409  m_storageSize = this->GetRows()*this->GetColumns();
410  if (this->GetRows() > 0)
411  {
412  m_rowSizes[0] = rowsPerBlock[0] - 1;
413  for(unsigned int i = 1; i < m_numberOfBlockRows; ++i)
414  {
415  m_rowSizes[i] = rowsPerBlock[i] + m_rowSizes[i-1];
416  }
417  }
418  if (this->GetColumns() > 0)
419  {
420  m_columnSizes[0] = columnsPerBlock[0] - 1;
421  for(unsigned int i = 1; i < m_numberOfBlockColumns; ++i)
422  {
423  m_columnSizes[i] = columnsPerBlock[i] + m_columnSizes[i-1];
424  }
425  }
426  }
427 
428  template<typename DataType, typename InnerMatrixType>
429  typename boost::call_traits<typename NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::NumberType>::value_type
430  NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::v_GetValue(unsigned int row, unsigned int column) const
431  {
432  return (*this)(row, column);
433  }
434 
435  template<typename DataType, typename InnerMatrixType>
436  unsigned int NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::v_GetStorageSize() const
437  {
438  return this->GetStorageSize();
439  }
440 
441  template<typename DataType, typename InnerMatrixType>
442  void NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::v_Transpose()
443  {
444  BOOST_FOREACH(boost::shared_ptr<InnerType> ptr, m_data)
445  {
446  if( ptr.get() != 0 )
447  {
448  ptr->Transpose();
449  }
450  }
451  }
452 
453 
454 // template<typename DataType, typename InnerMatrixType>
455 // template<typename MatrixType>
456 // NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::iterator_base<MatrixType>::iterator_base(MatrixType& m, unsigned int curRow, unsigned int curCol) :
457 // m_matrix(m),
458 // m_curRow(curRow),
459 // m_curColumn(curCol)
460 // {
461 // }
462 
463 // template<typename DataType, typename InnerMatrixType>
464 // template<typename MatrixType>
465 // NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::iterator_base<MatrixType>::iterator_base(MatrixType& m) :
466 // m_matrix(m),
467 // m_curRow(std::numeric_limits<unsigned int>::max()),
468 // m_curColumn(std::numeric_limits<unsigned int>::max())
469 // {
470 // }
471 
472 // template<typename DataType, typename InnerMatrixType>
473 // template<typename MatrixType>
474 // NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::iterator_base<MatrixType>::iterator_base(const NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::iterator_base<MatrixType>& rhs) :
475 // m_matrix(rhs.m_matrix),
476 // m_curRow(rhs.m_curRow),
477 // m_curColumn(rhs.m_curColumn)
478 // {
479 // }
480 
481 // template<typename DataType, typename InnerMatrixType>
482 // template<typename MatrixType>
483 // void NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::iterator_base<MatrixType>::operator++()
484 // {
485 // if( m_curRow != std::numeric_limits<unsigned int>::max() )
486 // {
487 // boost::tie(m_curRow, m_curColumn) = StoragePolicy::Advance(
488 // m_matrix.GetRows(), m_matrix.GetColumns(), m_curRow, m_curColumn);
489 // }
490 // }
491 
492 // template<typename DataType, typename InnerMatrixType>
493 // template<typename MatrixType>
494 // typename NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::NumberType
495 // NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::iterator_base<MatrixType>::operator*()
496 // {
497 // return m_matrix(m_curRow, m_curColumn);
498 // }
499 
500 // template<typename DataType, typename InnerMatrixType>
501 // template<typename MatrixType>
502 // bool NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::iterator_base<MatrixType>::operator==(const NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::iterator_base<MatrixType>& rhs)
503 // {
504 // return m_curRow == rhs.m_curRow && m_curColumn == rhs.m_curColumn;
505 // }
506 
507 // template<typename DataType, typename InnerMatrixType>
508 // template<typename MatrixType>
509 // bool NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::iterator_base<MatrixType>::operator!=(const NekMatrix<NekMatrix<DataType, InnerMatrixType>, BlockMatrixTag>::iterator_base<MatrixType>& rhs)
510 // {
511 // return !(*this == rhs);
512 // }
513 
514 
516  template LIB_UTILITIES_EXPORT class NekMatrix<NekMatrix< NekMatrix<NekDouble, StandardMatrixTag>, BlockMatrixTag>, BlockMatrixTag>;
517  template LIB_UTILITIES_EXPORT class NekMatrix<NekMatrix< NekMatrix<NekDouble, StandardMatrixTag>, ScaledMatrixTag>, BlockMatrixTag>;
518  template LIB_UTILITIES_EXPORT class NekMatrix<NekMatrix<NekMatrix< NekMatrix<NekDouble, StandardMatrixTag>, ScaledMatrixTag>, BlockMatrixTag>, BlockMatrixTag>;
519 }
520 
STL namespace.
#define LIB_UTILITIES_EXPORT
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
Definition: ErrorUtil.hpp:250