63 template <
int M,
int N,
typename T = real_t>
67 for (
int i = 0; i < M; i++)
69 for (
int j = 0; j < N; j++)
71 (*this)(i,j) = values[i][j];
82 data.
Wrap(d, h*w,
false);
139 virtual const real_t &
Elem(
int i,
int j)
const;
258 MFEM_ASSERT(v.
Size() ==
Width(),
"incompatible Vector size!");
277 { Eigensystem(ev, &evect); }
281 { Eigensystem(ev, &evect); }
286 { Eigensystem(
b, ev); }
290 { Eigensystem(
b, ev, &evect); }
295 { Eigensystem(
b, ev, &evect); }
377 int row_offset,
int col_offset);
496void Add(
const DenseMatrix &A,
const DenseMatrix &B,
505 real_t beta,
const DenseMatrix &B, DenseMatrix &C);
524void Mult(
const DenseMatrix &
b,
const DenseMatrix &c, DenseMatrix &
a);
527void AddMult(
const DenseMatrix &
b,
const DenseMatrix &c, DenseMatrix &
a);
543void CalcInverse(
const DenseMatrix &
a, DenseMatrix &inva);
551void CalcOrtho(
const DenseMatrix &J, Vector &n);
554void MultAAt(
const DenseMatrix &
a, DenseMatrix &aat);
557void MultADAt(
const DenseMatrix &A,
const Vector &D, DenseMatrix &ADAt);
560void AddMultADAt(
const DenseMatrix &A,
const Vector &D, DenseMatrix &ADAt);
563void MultABt(
const DenseMatrix &A,
const DenseMatrix &B, DenseMatrix &ABt);
566void MultADBt(
const DenseMatrix &A,
const Vector &D,
567 const DenseMatrix &B, DenseMatrix &ADBt);
570void AddMultABt(
const DenseMatrix &A,
const DenseMatrix &B, DenseMatrix &ABt);
573void AddMultADBt(
const DenseMatrix &A,
const Vector &D,
574 const DenseMatrix &B, DenseMatrix &ADBt);
581void MultAtB(
const DenseMatrix &A,
const DenseMatrix &B, DenseMatrix &AtB);
584void AddMultAtB(
const DenseMatrix &A,
const DenseMatrix &B, DenseMatrix &AtB);
597void MultVVt(
const Vector &v, DenseMatrix &vvt);
599void MultVWt(
const Vector &v,
const Vector &w, DenseMatrix &VWt);
602void AddMultVWt(
const Vector &v,
const Vector &w, DenseMatrix &VWt);
605void AddMultVVt(
const Vector &v, DenseMatrix &VWt);
616void RAP(
const DenseMatrix &A,
const DenseMatrix &P, DenseMatrix &
RAP);
620void RAP(
const DenseMatrix &Rt,
const DenseMatrix &A,
621 const DenseMatrix &P, DenseMatrix &
RAP);
667#ifdef MFEM_USE_LAPACK
837 bool own_data =
false;
887#ifdef MFEM_USE_LAPACK
937 bool left_eigen_vectors =
false,
938 bool right_eigen_vectors =
false);
962#ifdef MFEM_USE_LAPACK
985 bool left_singular_vectors=
false,
986 bool right_singular_vectors=
false);
1003 bool left_singular_vectors=
false,
1004 bool right_singular_vectors=
false);
1028 char left_singular_vectors=
'A',
1029 char right_singular_vectors=
'A');
1054 char left_singular_vectors=
'A',
1055 char right_singular_vectors=
'A');
1127 tdata.
Wrap(d, i*j*k,
false);
1134 tdata.
New(i*j*k, mt);
1139 : Mk(NULL, other.Mk.height, other.Mk.width), nk(other.nk)
1161 tdata.
New(i*j*k, mt);
1169 tdata.
Wrap(ext_data, i*j*k,
false);
1180 MFEM_ASSERT_INDEX_IN_RANGE(k, 0,
SizeK());
1186 MFEM_ASSERT_INDEX_IN_RANGE(k, 0,
SizeK());
1194 MFEM_ASSERT_INDEX_IN_RANGE(i, 0,
SizeI());
1195 MFEM_ASSERT_INDEX_IN_RANGE(j, 0,
SizeJ());
1196 MFEM_ASSERT_INDEX_IN_RANGE(k, 0,
SizeK());
1202 MFEM_ASSERT_INDEX_IN_RANGE(i, 0,
SizeI());
1203 MFEM_ASSERT_INDEX_IN_RANGE(j, 0,
SizeJ());
1204 MFEM_ASSERT_INDEX_IN_RANGE(k, 0,
SizeK());
1210 MFEM_ASSERT_INDEX_IN_RANGE(k, 0,
SizeK());
1216 MFEM_ASSERT_INDEX_IN_RANGE(k, 0,
SizeK());
1290void BatchLUSolve(
const DenseTensor &Mlu,
const Array<int> &P, Vector &X);
1297 MFEM_ASSERT(data && i >= 0 && i < height && j >= 0 && j <
width,
"");
1303 MFEM_ASSERT(data && i >= 0 && i < height && j >= 0 && j <
width,
"");
void UMult(int m, int n, real_t *X) const
void RightSolve(int m, int n, real_t *X) const
virtual void GetInverseMatrix(int m, real_t *X) const
Assuming L.L^t = A factored data of size (m x m), compute X <- A^{-1}.
CholeskyFactors(real_t *data_)
void USolve(int m, int n, real_t *X) const
virtual real_t Det(int m) const
virtual void Solve(int m, int n, real_t *X) const
virtual bool Factor(int m, real_t TOL=0.0)
Compute the Cholesky factorization of the current matrix.
void LSolve(int m, int n, real_t *X) const
void LMult(int m, int n, real_t *X) const
const Vector & Eigenvector(int i)
~DenseMatrixEigensystem()
DenseMatrixEigensystem(DenseMatrix &m)
DenseMatrix & Eigenvectors()
DenseMatrix & LeftEigenvectors()
Vector & EigenvaluesImagPart()
DenseMatrix & RightEigenvectors()
Vector & EigenvaluesRealPart()
~DenseMatrixGeneralizedEigensystem()
DenseMatrixGeneralizedEigensystem(DenseMatrix &a, DenseMatrix &b, bool left_eigen_vectors=false, bool right_eigen_vectors=false)
real_t EigenvalueRealPart(int i)
real_t EigenvalueImagPart(int i)
void TestInversion()
Print the numerical conditioning of the inversion: ||A^{-1} A - I||.
int Size() const
Get the size of the inverse matrix.
DenseMatrixInverse(bool spd_=false)
Default constructor.
virtual ~DenseMatrixInverse()
Destroys dense inverse matrix.
void Factor()
Factor the current DenseMatrix, *a.
void Mult(const real_t *x, real_t *y) const
Matrix vector multiplication with the inverse of dense matrix.
real_t Det() const
Compute the determinant of the original DenseMatrix using the LU factors.
void GetInverseMatrix(DenseMatrix &Ainv) const
Compute and return the inverse matrix in Ainv.
void Mult(DenseMatrix &X) const
Multiply the inverse matrix by another matrix: X <- A^{-1} X.
virtual void SetOperator(const Operator &op)
Set/update the solver for the given operator.
Class for Singular Value Decomposition of a DenseMatrix.
Vector & Singularvalues()
Return singular values.
DenseMatrix & RightSingularvectors()
Return right singular vectors.
MFEM_DEPRECATED DenseMatrixSVD(DenseMatrix &M, bool left_singular_vectors=false, bool right_singular_vectors=false)
Constructor for the DenseMatrixSVD.
DenseMatrix & LeftSingularvectors()
Return left singular vectors.
real_t Singularvalue(int i)
Return specific singular value.
void Eval(DenseMatrix &M)
Evaluate the SVD.
Data type dense matrix using column-major storage.
void GetDiag(Vector &d) const
Returns the diagonal of the matrix.
void CopyMNDiag(real_t c, int n, int row_offset, int col_offset)
Copy c on the diagonal of size n to *this at row_offset, col_offset.
void AddMult_a(real_t a, const Vector &x, Vector &y) const
y += a * A.x
void Mult(const real_t *x, real_t *y) const
Matrix vector multiplication.
void AddMultTranspose_a(real_t a, const Vector &x, Vector &y) const
y += a * A^t x
void Set(real_t alpha, const real_t *A)
Set the matrix to alpha * A, assuming that A has the same dimensions as the matrix and uses column-ma...
void TestInversion()
Invert and print the numerical conditioning of the inversion.
void CopyExceptMN(const DenseMatrix &A, int m, int n)
Copy All rows and columns except m and n from A.
void CopyCols(const DenseMatrix &A, int col1, int col2)
Copy columns col1 through col2 from A to *this.
void MultTranspose(const real_t *x, real_t *y) const
Multiply a vector with the transpose matrix.
void Transpose()
(*this) = (*this)^t
void AddToVector(int offset, Vector &v) const
Add the matrix 'data' to the Vector 'v' at the given 'offset'.
void Threshold(real_t eps)
Replace small entries, abs(a_ij) <= eps, with zero.
const real_t * HostRead() const
Shortcut for mfem::Read(GetMemory(), TotalSize(), false).
void CalcEigenvalues(real_t *lambda, real_t *vec) const
void Eigenvalues(Vector &ev)
Compute eigenvalues of A x = ev x where A = *this.
DenseMatrix(real_t *d, int h, int w)
Construct a DenseMatrix using an existing data array.
real_t * ReadWrite(bool on_dev=true)
Shortcut for mfem::ReadWrite(GetMemory(), TotalSize(), on_dev).
void RightScaling(const Vector &s)
RightScaling: this = this * diag(s);.
void Norm2(Vector &v) const
Take the 2-norm of the columns of A and store in v.
real_t * HostWrite()
Shortcut for mfem::Write(GetMemory(), TotalSize(), false).
virtual void PrintMatlab(std::ostream &out=mfem::out) const
Prints operator in Matlab format.
void SetRow(int r, const real_t *row)
void SymmetricScaling(const Vector &s)
SymmetricScaling this = diag(sqrt(s)) * this * diag(sqrt(s))
void Getl1Diag(Vector &l) const
Returns the l1 norm of the rows of the matrix v_i = sum_j |a_ij|.
void GetColumnReference(int c, Vector &col)
real_t & operator()(int i, int j)
Returns reference to a_{ij}.
real_t InnerProduct(const real_t *x, const real_t *y) const
Compute y^t A x.
void Eigenvalues(DenseMatrix &b, Vector &ev, DenseMatrix &evect)
Compute generalized eigenvalues of A x = ev B x, where A = *this.
real_t * Data() const
Returns the matrix data array.
const Memory< real_t > & GetMemory() const
void GetSubMatrix(const Array< int > &idx, DenseMatrix &A) const
real_t * GetData() const
Returns the matrix data array.
void Eigensystem(DenseMatrix &b, Vector &ev, DenseMatrix &evect)
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
virtual ~DenseMatrix()
Destroys dense matrix.
virtual void AddMult(const Vector &x, Vector &y, const real_t a=1.0) const
y += a * A.x
void Reset(real_t *d, int h, int w)
Change the data array and the size of the DenseMatrix.
virtual real_t & Elem(int i, int j)
Returns reference to a_{ij}.
void SetCol(int c, const real_t *col)
void Symmetrize()
(*this) = 1/2 ((*this) + (*this)^t)
void Invert()
Replaces the current matrix with its inverse.
DenseMatrix & operator+=(const real_t *m)
void Neg()
(*this) = -(*this)
real_t operator*(const DenseMatrix &m) const
Matrix inner product: tr(A^t B)
void CopyMNt(const DenseMatrix &A, int row_offset, int col_offset)
Copy matrix A^t to the location in *this at row_offset, col_offset.
void AdjustDofDirection(Array< int > &dofs)
void Eigenvalues(Vector &ev, DenseMatrix &evect)
Compute eigenvalues and eigenvectors of A x = ev x where A = *this.
void InvRightScaling(const Vector &s)
InvRightScaling: this = this * diag(1./s);.
const real_t * GetColumn(int col) const
void Eigensystem(Vector &ev, DenseMatrix &evect)
Compute eigenvalues and eigenvectors of A x = ev x where A = *this.
real_t * Write(bool on_dev=true)
Shortcut for mfem::Write(GetMemory(), TotalSize(), on_dev).
virtual MatrixInverse * Inverse() const
Returns a pointer to the inverse matrix.
real_t * HostReadWrite()
Shortcut for mfem::ReadWrite(GetMemory(), TotalSize(), false).
void SingularValues(Vector &sv) const
real_t FNorm() const
Compute the Frobenius norm of the matrix.
void InvLeftScaling(const Vector &s)
InvLeftScaling this = diag(1./s) * this.
DenseMatrix(const T(&values)[M][N])
virtual void Print(std::ostream &out=mfem::out, int width_=4) const
Prints matrix to stream out.
void SetSubMatrix(const Array< int > &idx, const DenseMatrix &A)
Set (*this)(idx[i],idx[j]) = A(i,j)
virtual void PrintT(std::ostream &out=mfem::out, int width_=4) const
Prints the transpose matrix to stream out.
void AddSubMatrix(const Array< int > &idx, const DenseMatrix &A)
(*this)(idx[i],idx[j]) += A(i,j)
real_t Trace() const
Trace of a square matrix.
real_t * GetColumn(int col)
void Diag(real_t c, int n)
Creates n x n diagonal matrix with diagonal elements c.
void SquareRootInverse()
Replaces the current matrix with its square root inverse.
virtual void AddMultTranspose(const Vector &x, Vector &y, const real_t a=1.0) const
y += a * A^t x
DenseMatrix & operator*=(real_t c)
void Swap(DenseMatrix &other)
const real_t * Read(bool on_dev=true) const
Shortcut for mfem::Read( GetMemory(), TotalSize(), on_dev).
bool OwnsData() const
Return the DenseMatrix data (host pointer) ownership flag.
void AddMatrix(DenseMatrix &A, int ro, int co)
Perform (ro+i,co+j)+=A(i,j) for 0<=i.
void GetRowSums(Vector &l) const
Compute the row sums of the DenseMatrix.
void CopyMN(const DenseMatrix &A, int m, int n, int Aro, int Aco)
Copy the m x n submatrix of A at row/col offsets Aro/Aco to *this.
void InvSymmetricScaling(const Vector &s)
InvSymmetricScaling this = diag(sqrt(1./s)) * this * diag(sqrt(1./s))
int Rank(real_t tol) const
void UseExternalData(real_t *d, int h, int w)
Change the data array and the size of the DenseMatrix.
void Add(const real_t c, const DenseMatrix &A)
Adds the matrix A multiplied by the number c to the matrix.
void Clear()
Delete the matrix data array (if owned) and reset the matrix state.
void LeftScaling(const Vector &s)
LeftScaling this = diag(s) * this.
DenseMatrix & operator-=(const DenseMatrix &m)
real_t InnerProduct(const Vector &x, const Vector &y) const
Compute y^t A x.
std::size_t MemoryUsage() const
Memory< real_t > & GetMemory()
real_t CalcSingularvalue(const int i) const
Return the i-th singular value (decreasing order) of NxN matrix, N=1,2,3.
void GradToCurl(DenseMatrix &curl)
void GetColumn(int c, Vector &col) const
void GradToVectorCurl2D(DenseMatrix &curl)
DenseMatrix & operator=(real_t c)
Sets the matrix elements equal to constant c.
void Eigenvalues(DenseMatrix &b, Vector &ev)
real_t MaxMaxNorm() const
Compute the norm ||A|| = max_{ij} |A_{ij}|.
void Norm2(real_t *v) const
Take the 2-norm of the columns of A and store in v.
void GetFromVector(int offset, const Vector &v)
Get the matrix 'data' from the Vector 'v' at the given 'offset'.
int Size() const
For backward compatibility define Size to be synonym of Width()
real_t FNorm2() const
Compute the square of the Frobenius norm of the matrix.
void GetRow(int r, Vector &row) const
void CopyRows(const DenseMatrix &A, int row1, int row2)
Copy rows row1 through row2 from A to *this.
void GradToDiv(Vector &div)
void Set(real_t alpha, const DenseMatrix &A)
Set the matrix to alpha * A.
Rank 3 tensor (array of matrices)
DenseTensor(int i, int j, int k, MemoryType mt)
real_t * HostWrite()
Shortcut for mfem::Write(GetMemory(), TotalSize(), false).
DenseTensor(const DenseTensor &other)
Copy constructor: deep copy.
void SetSize(int i, int j, int k, MemoryType mt_=MemoryType::PRESERVE)
real_t * HostReadWrite()
Shortcut for mfem::ReadWrite(GetMemory(), TotalSize(), false).
real_t & operator()(int i, int j, int k)
Memory< real_t > & GetMemory()
void UseExternalData(real_t *ext_data, int i, int j, int k)
void AddMult(const Table &elem_dof, const Vector &x, Vector &y) const
DenseTensor(real_t *d, int i, int j, int k)
const real_t * Read(bool on_dev=true) const
Shortcut for mfem::Read( GetMemory(), TotalSize(), on_dev).
const real_t & operator()(int i, int j, int k) const
real_t * Write(bool on_dev=true)
Shortcut for mfem::Write(GetMemory(), TotalSize(), on_dev).
std::size_t MemoryUsage() const
const real_t * Data() const
DenseTensor(int i, int j, int k)
real_t * ReadWrite(bool on_dev=true)
Shortcut for mfem::ReadWrite(GetMemory(), TotalSize(), on_dev).
const real_t * HostRead() const
Shortcut for mfem::Read(GetMemory(), TotalSize(), false).
DenseTensor & operator=(real_t c)
Sets the tensor elements equal to constant c.
const DenseMatrix & operator()(int k) const
void Swap(DenseTensor &t)
const real_t * GetData(int k) const
DenseMatrix & operator()(int k)
const Memory< real_t > & GetMemory() const
virtual void GetInverseMatrix(int m, real_t *X) const
virtual real_t Det(int m) const
virtual void Solve(int m, int n, real_t *X) const
virtual bool Factor(int m, real_t TOL=0.0)
A class to initialize the size of a Tensor.
void LSolve(int m, int n, real_t *X) const
static void SubMult(int m, int n, int r, const real_t *A21, const real_t *X1, real_t *X2)
virtual void GetInverseMatrix(int m, real_t *X) const
Assuming L.U = P.A factored data of size (m x m), compute X <- A^{-1}.
void Mult(int m, int n, real_t *X) const
void USolve(int m, int n, real_t *X) const
virtual bool Factor(int m, real_t TOL=0.0)
Compute the LU factorization of the current matrix.
void BlockFactor(int m, int n, real_t *A12, real_t *A21, real_t *A22) const
void BlockForwSolve(int m, int n, int r, const real_t *L21, real_t *B1, real_t *B2) const
void RightSolve(int m, int n, real_t *X) const
LUFactors(real_t *data_, int *ipiv_)
virtual real_t Det(int m) const
virtual void Solve(int m, int n, real_t *X) const
void BlockBackSolve(int m, int n, int r, const real_t *U12, const real_t *X2, real_t *Y1) const
static const int ipiv_base
Abstract data type for matrix inverse.
Abstract data type matrix.
Class used by MFEM to store pointers to host and/or device memory.
int Capacity() const
Return the size of the allocated memory.
bool OwnsHostPtr() const
Return true if the host pointer is owned. Ownership indicates whether the pointer will be deleted by ...
MemoryType GetMemoryType() const
Return a MemoryType that is currently valid. If both the host and the device pointers are currently v...
void CopyFrom(const Memory &src, int size)
Copy size entries from src to *this.
void Reset()
Reset the memory to be empty, ensuring that Delete() will be a no-op.
void Wrap(T *ptr, int size, bool own)
Wrap an externally allocated host pointer, ptr with the current host memory type returned by MemoryMa...
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.
virtual void Mult(const Vector &x, Vector &y) const =0
Operator application: y=A(x).
int Width() const
Get the width (size of input) of the Operator. Synonym with NumCols().
virtual void MultTranspose(const Vector &x, Vector &y) const
Action of the transpose operator: y=A^t(x). The default behavior in class Operator is to generate an ...
void SetDataAndSize(real_t *d, int s)
Set the Vector data and size.
int Size() const
Returns the size of the vector.
real_t * GetData() const
Return a pointer to the beginning of the Vector data.
void CalcOrtho(const DenseMatrix &J, Vector &n)
const T * Read(const Memory< T > &mem, int size, bool on_dev=true)
Get a pointer for read access to mem with the mfem::Device's DeviceMemoryClass, if on_dev = true,...
void Swap(Array< T > &, Array< T > &)
void AddMult_a_ABt(real_t a, const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &ABt)
ABt += a * A * B^t.
void mfem_error(const char *msg)
void Mult(const Table &A, const Table &B, Table &C)
C = A * B (as boolean matrices)
void BatchLUSolve(const DenseTensor &Mlu, const Array< int > &P, Vector &X)
Solve batch linear systems.
void AddMult_a(real_t alpha, const DenseMatrix &b, const DenseMatrix &c, DenseMatrix &a)
Matrix matrix multiplication. A += alpha * B * C.
void CalcAdjugateTranspose(const DenseMatrix &a, DenseMatrix &adjat)
Calculate the transposed adjugate of a matrix (for NxN matrices, N=1,2,3)
void MultVWt(const Vector &v, const Vector &w, DenseMatrix &VWt)
void MultADBt(const DenseMatrix &A, const Vector &D, const DenseMatrix &B, DenseMatrix &ADBt)
ADBt = A D B^t, where D is diagonal.
void AddMultVVt(const Vector &v, DenseMatrix &VVt)
VVt += v v^t.
T * Write(Memory< T > &mem, int size, bool on_dev=true)
Get a pointer for write access to mem with the mfem::Device's DeviceMemoryClass, if on_dev = true,...
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...
void MultADAt(const DenseMatrix &A, const Vector &D, DenseMatrix &ADAt)
ADAt = A D A^t, where D is diagonal.
void MultABt(const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &ABt)
Multiply a matrix A with the transpose of a matrix B: A*Bt.
T * ReadWrite(Memory< T > &mem, int size, bool on_dev=true)
Get a pointer for read+write access to mem with the mfem::Device's DeviceMemoryClass,...
void CalcInverse(const DenseMatrix &a, DenseMatrix &inva)
void AddMult_a_VWt(const real_t a, const Vector &v, const Vector &w, DenseMatrix &VWt)
VWt += a * v w^t.
void RAP(const DenseMatrix &A, const DenseMatrix &P, DenseMatrix &RAP)
void AddMult_a_VVt(const real_t a, const Vector &v, DenseMatrix &VVt)
VVt += a * v v^t.
void BatchLUFactor(DenseTensor &Mlu, Array< int > &P, const real_t TOL)
Compute the LU factorization of a batch of matrices.
void CalcAdjugate(const DenseMatrix &a, DenseMatrix &adja)
void AddMultVWt(const Vector &v, const Vector &w, DenseMatrix &VWt)
VWt += v w^t.
int CheckFinite(const real_t *v, const int n)
void AddMult_a_AtB(real_t a, const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &AtB)
AtB += a * A^t * B.
void MultVVt(const Vector &v, DenseMatrix &vvt)
Make a matrix from a vector V.Vt.
bool LinearSolve(DenseMatrix &A, real_t *X, real_t TOL)
Solves the dense linear system, A * X = B for X
void AddMultABt(const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &ABt)
ABt += A * B^t.
void AddMult_a_AAt(real_t a, const DenseMatrix &A, DenseMatrix &AAt)
AAt += a * A * A^t.
void MultAAt(const DenseMatrix &a, DenseMatrix &aat)
Calculate the matrix A.At.
void CalcInverseTranspose(const DenseMatrix &a, DenseMatrix &inva)
Calculate the inverse transpose of a matrix (for NxN matrices, N=1,2,3)
void AddMultADBt(const DenseMatrix &A, const Vector &D, const DenseMatrix &B, DenseMatrix &ADBt)
ADBt = A D B^t, where D is diagonal.
ComplexDenseMatrix * MultAtB(const ComplexDenseMatrix &A, const ComplexDenseMatrix &B)
Multiply the complex conjugate transpose of a matrix A with a matrix B. A^H*B.
void AddMult(const DenseMatrix &b, const DenseMatrix &c, DenseMatrix &a)
Matrix matrix multiplication. A += B * C.
void AddMultAtB(const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &AtB)
AtB += A^t * B.
MemoryType
Memory types supported by MFEM.
void Mult_a_AAt(real_t a, const DenseMatrix &A, DenseMatrix &AAt)
AAt = a * A * A^t.
void Add(const DenseMatrix &A, const DenseMatrix &B, real_t alpha, DenseMatrix &C)
C = A + alpha*B.
void AddMultADAt(const DenseMatrix &A, const Vector &D, DenseMatrix &ADAt)
ADAt += A D A^t, where D is diagonal.