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!");
void SetSize(int s)
Change the size of the DenseSymmetricMatrix to s x s.
void Delete()
Delete the owned pointers and reset the Memory object.
DenseSymmetricMatrix & operator*=(double c)
Abstract data type for matrix inverse.
virtual void Print(std::ostream &out=mfem::out, int width_=4) const
Prints matrix to stream out.
virtual double & Elem(int i, int j)
Returns reference to a_{ij}.
int Capacity() const
Return the size of the allocated memory.
virtual void Mult(const Vector &x, Vector &y) const
Matrix vector multiplication.
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows().
void mfem_error(const char *msg)
Function called when an error is encountered. Used by the macros MFEM_ABORT, MFEM_ASSERT, MFEM_VERIFY.
Abstract data type matrix.
int height
Dimension of the output / number of rows in the matrix.
virtual MatrixInverse * Inverse() const
Returns a pointer to (an approximation) of the matrix inverse.
void New(int size)
Allocate host memory for size entries with the current host memory type returned by MemoryManager::Ge...
virtual ~DenseSymmetricMatrix()
Destroys the symmetric matrix.
int GetStoredSize() const
Return the number of stored nonzeros in the matrix.
DenseSymmetricMatrix & operator=(double c)
Sets the matrix elements equal to constant c.
int width
Dimension of the input / number of columns in the matrix.