47 namespace MultiRegions
79 GetSolverInfoAsEnum<MatrixStorageType>(
"GlobalMatrixStorageType");
81 unsigned int brows, bcols;
91 if(pSession->DefinesParameter(
"SparseBlockSize"))
93 pSession->LoadParameter(
"SparseBlockSize", block_size);
94 ASSERTL1(block_size > 0,
"SparseBlockSize parameter must to be positive");
97 brows = rows / block_size + (rows % block_size > 0);
98 bcols = columns / block_size + (columns % block_size > 0);
100 if (rows % block_size > 0)
m_copyOp =
true;
120 brows, bcols, block_size, bcoMat, matStorage );
135 cout <<
"Global matrix storage type: "
137 std::cout <<
"Global matrix memory, bytes = " << matBytes;
138 if (matBytes/(1024*1024) > 0)
140 std::cout <<
" ("<< matBytes/(1024*1024) <<
" MB)" << std::endl;
144 std::cout <<
" ("<< matBytes/1024 <<
" KB)" << std::endl;
146 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 std::string RegisterEnumValue(std::string pEnum, std::string pString, int pEnumValue)
Registers an enumeration value.
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 unsigned int GetNumNonZeroEntries() const
const char *const MatrixStorageTypeMap[]
static std::string lookupIds[]
const unsigned long GetMulCallsCounter() const
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.
GlobalMatrix(const LibUtilities::SessionReaderSharedPtr &pSession, unsigned int rows, unsigned int columns, const COOMatType &cooMat, const MatrixStorage &matStorage=eFULL)
Construct a new matrix.
Array< OneD, NekDouble > m_tmpin
std::map< CoordType, BCOEntryType > BCOMatType
static std::string RegisterDefaultSolverInfo(const std::string &pName, const std::string &pValue)
Registers the default string value of a solver info property.
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)