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++)
74 for (
int i = 0; i <
s; i++)
83 mfem_error(
"DenseSymmetricMatrix::Mult() not implemented!");
88 mfem_error(
"DenseSymmetricMatrix::Inverse() not implemented!");
94 mfem_error(
"DenseSymmetricMatrix::Print() not implemented!");
virtual void Mult(const Vector &x, Vector &y) const
Matrix vector multiplication.
virtual real_t & Elem(int i, int j)
Returns reference to a_{ij}.
void SetSize(int s)
Change the size of the DenseSymmetricMatrix to s x s.
virtual MatrixInverse * Inverse() const
Returns a pointer to (an approximation) of the matrix inverse.
DenseSymmetricMatrix & operator*=(real_t c)
int GetStoredSize() const
Return the number of stored nonzeros in the matrix.
virtual ~DenseSymmetricMatrix()
Destroys the symmetric matrix.
DenseSymmetricMatrix & operator=(real_t c)
Sets the matrix elements equal to constant c.
virtual void Print(std::ostream &out=mfem::out, int width_=4) const
Prints matrix to stream out.
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)