47 namespace MultiRegions
 
   49 std::string GlobalMatrix::def =
 
   50     LibUtilities::SessionReader::RegisterDefaultSolverInfo(
 
   51         "GlobalMatrixStorageType", 
"SmvBSR");
 
   52 std::string GlobalMatrix::lookupIds[3] = {
 
   53     LibUtilities::SessionReader::RegisterEnumValue(
 
   68                            unsigned int rows, 
unsigned int columns,
 
   71     : m_smvbsrmatrix(), m_rows(rows), m_mulCallsCounter(0)
 
   75             "GlobalMatrixStorageType");
 
   77     unsigned int brows, bcols;
 
   87     if (pSession->DefinesParameter(
"SparseBlockSize"))
 
   89         pSession->LoadParameter(
"SparseBlockSize", block_size);
 
   91                  "SparseBlockSize parameter must to be positive");
 
   94     brows = rows / block_size + (rows % block_size > 0);
 
   95     bcols = columns / block_size + (columns % block_size > 0);
 
   97     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::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
 
unsigned long m_mulCallsCounter
 
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[]
 
The above copyright notice and this permission notice shall be included.
 
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)