27 MFEM_ASSERT(s >= 0,
"invalid DenseSymmetricMatrix size: " << s);
30 data.
New((s*(s+1))/2);
42 "invalid DenseSymmetricMatrix size: " << s);
49 const int s2 = (s*(s+1))/2;
61 for (
int i = 0; i <
s; i++)
81 for (
int i = 0; i <
s; i++)
90 mfem_error(
"DenseSymmetricMatrix::Mult() not implemented!");
95 mfem_error(
"DenseSymmetricMatrix::Inverse() not implemented!");
101 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. The Memory is not reset by this method, i.e. it will, generally, not be Empty() after this call.
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.
void Reset()
Reset the memory to be empty, ensuring that Delete() will be a no-op.
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.
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...
DenseSymmetricMatrix & operator=(double c)
Sets the matrix elements equal to constant c.
int width
Dimension of the input / number of columns in the matrix.