24 MFEM_ASSERT(s >= 0,
"invalid DenseSymmetricMatrix size: " << s);
27 data.
New((s*(s+1))/2);
35 "invalid DenseSymmetricMatrix size: " << s);
42 const int s2 = (s*(s+1))/2;
54 for (
int i = 0; i < s; i++)
67 for (
int i = 0; i < hw; i++)
88 for (
int i = 0; i < s; i++)
97 mfem_error(
"DenseSymmetricMatrix::Mult() not implemented!");
102 mfem_error(
"DenseSymmetricMatrix::Inverse() not implemented!");
void SetSize(int s)
Change the size of the DenseSymmetricMatrix to s x s.
DenseSymmetricMatrix & operator*=(real_t c)
int GetStoredSize() const
Return the number of stored nonzeros in the matrix.
MatrixInverse * Inverse() const override
Returns a pointer to (an approximation) of the matrix inverse.
void Mult(const Vector &x, Vector &y) const override
Matrix vector multiplication.
virtual ~DenseSymmetricMatrix()
Destroys the symmetric matrix.
DenseSymmetricMatrix & operator=(real_t c)
Sets the matrix elements equal to constant c.
real_t & Elem(int i, int j) override
Returns reference to a_{ij}.
Abstract data type for matrix inverse.
Abstract data type matrix.
int Capacity() const
Return the size of the allocated memory.
void Delete()
Delete the owned pointers and reset the Memory object.
void New(int size)
Allocate host memory for size entries with the current host memory type returned by MemoryManager::Ge...
int width
Dimension of the input / number of columns in the matrix.
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows().
int height
Dimension of the output / number of rows in the matrix.
void mfem_error(const char *msg)