48 namespace MultiRegions
50 std::string GlobalMatrix::def = LibUtilities::SessionReader::
51 RegisterDefaultSolverInfo(
"GlobalMatrixStorageType",
"SmvBSR");
52 std::string GlobalMatrix::lookupIds[3] = {
53 LibUtilities::SessionReader::RegisterEnumValue(
69 GlobalMatrix::GlobalMatrix(
80 GetSolverInfoAsEnum<MatrixStorageType>(
"GlobalMatrixStorageType");
82 unsigned int brows, bcols;
92 if(pSession->DefinesParameter(
"SparseBlockSize"))
94 pSession->LoadParameter(
"SparseBlockSize", block_size);
95 ASSERTL1(block_size > 0,
"SparseBlockSize parameter must to be positive");
98 brows = rows / block_size + (rows % block_size > 0);
99 bcols = columns / block_size + (columns % block_size > 0);
101 if (rows % block_size > 0)
m_copyOp =
true;
121 brows, bcols, block_size, bcoMat, matStorage );
136 cout <<
"Global matrix storage type: "
138 std::cout <<
"Global matrix memory, bytes = " << matBytes;
139 if (matBytes/(1024*1024) > 0)
141 std::cout <<
" ("<< matBytes/(1024*1024) <<
" MB)" << std::endl;
145 std::cout <<
" ("<< matBytes/1024 <<
" KB)" << std::endl;
147 std::cout <<
"Sparse storage block size = " << block_size << std::endl;
boost::shared_ptr< SparseStorageType > SparseStorageSharedPtr
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
std::map< CoordType, NekDouble > COOMatType
Array< OneD, NekDouble > m_tmpout
const char *const MatrixStorageTypeMap[]
unsigned long m_mulCallsCounter
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
void Multiply(const Array< OneD, const NekDouble > &in, Array< OneD, NekDouble > &out)
Perform a matrix-vector multiply.
unsigned int GetNumNonZeroEntries() const
Array< OneD, NekDouble > m_tmpin
std::map< CoordType, BCOEntryType > BCOMatType
unsigned long GetMulCallsCounter() const
DNekSmvBsrMatSharedPtr m_smvbsrmatrix
Pointer to a double-precision Nektar++ sparse matrix.
void convertCooToBco(const unsigned int blkRows, const unsigned int blkColumns, const unsigned int blkDim, const COOMatType &cooMat, BCOMatType &bcoMat)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)