49 "GlobalMatrixStorageType",
"SmvBSR");
66 unsigned int rows,
unsigned int columns,
69 : m_smvbsrmatrix(), m_rows(rows), m_mulCallsCounter(0)
73 "GlobalMatrixStorageType");
75 unsigned int brows, bcols;
85 if (pSession->DefinesParameter(
"SparseBlockSize"))
87 pSession->LoadParameter(
"SparseBlockSize", block_size);
89 "SparseBlockSize parameter must to be positive");
92 brows = rows / block_size + (rows % block_size > 0);
93 bcols = columns / block_size + (columns % block_size > 0);
95 if (rows % block_size > 0)
117 brows, bcols, block_size, bcoMat, matStorage);
129 "Unsupported sparse storage type chosen");
134 std::cout <<
"Global matrix memory, bytes = " << matBytes;
135 if (matBytes / (1024 * 1024) > 0)
137 std::cout <<
" (" << matBytes / (1024 * 1024) <<
" MB)" << std::endl;
141 std::cout <<
" (" << matBytes / 1024 <<
" KB)" << std::endl;
143 std::cout <<
"Sparse storage block size = " << block_size << std::endl;
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
static std::string RegisterEnumValue(std::string pEnum, std::string pString, int pEnumValue)
Registers an enumeration value.
static std::string RegisterDefaultSolverInfo(const std::string &pName, const std::string &pValue)
Registers the default string value of a solver info property.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
static std::string lookupIds[]
unsigned long m_mulCallsCounter
GlobalMatrix(const LibUtilities::SessionReaderSharedPtr &pSession, unsigned int rows, unsigned int columns, const COOMatType &cooMat, const MatrixStorage &matStorage=eFULL)
Construct a new matrix.
DNekSmvBsrMatSharedPtr m_smvbsrmatrix
Pointer to a double-precision Nektar++ sparse matrix.
Array< OneD, NekDouble > m_tmpout
unsigned long GetMulCallsCounter() const
unsigned int GetNumNonZeroEntries() const
Array< OneD, NekDouble > m_tmpin
void Multiply(const Array< OneD, const NekDouble > &in, Array< OneD, NekDouble > &out)
Perform a matrix-vector multiply.
std::shared_ptr< SparseStorageType > SparseStorageSharedPtr
std::shared_ptr< SessionReader > SessionReaderSharedPtr
const char *const MatrixStorageTypeMap[]
std::map< CoordType, BCOEntryType > BCOMatType
void convertCooToBco(const unsigned int blkDim, const COOMatType &cooMat, BCOMatType &bcoMat)
std::map< CoordType, NekDouble > COOMatType
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)