38#include <boost/core/ignore_unused.hpp>
53 int rowcoord, localRow, blkRowCoord;
54 int colcoord, localCol, blkColCoord;
56 for (entry = cooMat.begin(); entry != cooMat.end(); entry++)
58 rowcoord = (entry->first).first;
59 colcoord = (entry->first).second;
61 blkRowCoord = rowcoord / blkDim;
62 blkColCoord = colcoord / blkDim;
64 CoordType blkCoords = std::make_pair(blkRowCoord, blkColCoord);
65 blk = bcoMat.find(blkCoords);
66 if (blk == bcoMat.end())
69 bcoMat[blkCoords] = b;
72 localRow = rowcoord % blkDim;
73 localCol = colcoord % blkDim;
77 const unsigned int localoffset = localRow + localCol * blkDim;
78 (bcoMat[blkCoords])[localoffset] = entry->second;
82template <
typename SparseStorageType>
89 for (
unsigned int i = 0; i < rhs.
GetRows(); ++i)
92 for (
unsigned int j = 0; j < rhs.
GetColumns(); ++j)
95 os.precision(osprecision);
97 if (j != rhs.GetColumns() - 1)
111template <
typename SparseStorageType>
118 for (
unsigned int i = 0; i < rhs.
GetRows(); ++i)
121 for (
unsigned int j = 0; j < rhs.
GetColumns(); ++j)
124 os.precision(osprecision);
126 if (j != rhs.GetColumns() - 1)
IndexType GetRows() const
IndexType GetColumns() const
IndexType GetRows() const
IndexType GetColumns() const
The above copyright notice and this permission notice shall be included.
COOMatType::const_iterator COOMatTypeConstIt
std::map< CoordType, BCOEntryType > BCOMatType
std::pair< IndexType, IndexType > CoordType
void convertCooToBco(const unsigned int blkDim, const COOMatType &cooMat, BCOMatType &bcoMat)
std::map< CoordType, NekDouble > COOMatType
std::ostream & operator<<(std::ostream &os, const NekMatrix< DataType, FormType > &rhs)
BCOMatType::const_iterator BCOMatTypeConstIt