MFEM
v4.2.0
Finite element discretization library
|
Matrix coefficient defined by a matrix of scalar coefficients. Coefficients that are not set will evaluate to zero in the vector. The coefficient is stored as a flat Array with indexing (i,j) -> i*width+j. More...
#include <coefficient.hpp>
Public Member Functions | |
MatrixArrayCoefficient (int dim) | |
Construct a coefficient matrix of dimensions dim * dim. The actual coefficients still need to be added with Set(). More... | |
Coefficient * | GetCoeff (int i, int j) |
Get the coefficient located at (i,j) in the matrix. More... | |
void | Set (int i, int j, Coefficient *c, bool own=true) |
Set the coefficient located at (i,j) in the matrix. By default by default this will take ownership of the Coefficient passed in, but this can be overridden with the own parameter. More... | |
double | Eval (int i, int j, ElementTransformation &T, const IntegrationPoint &ip) |
virtual void | Eval (DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip) |
Evaluate the matrix coefficient ip. More... | |
virtual | ~MatrixArrayCoefficient () |
Public Member Functions inherited from mfem::MatrixCoefficient | |
MatrixCoefficient (int dim, bool symm=false) | |
Construct a dim x dim matrix coefficient. More... | |
MatrixCoefficient (int h, int w, bool symm=false) | |
Construct a h x w matrix coefficient. More... | |
void | SetTime (double t) |
Set the time for time dependent coefficients. More... | |
double | GetTime () |
Get the time for time dependent coefficients. More... | |
int | GetHeight () const |
Get the height of the matrix. More... | |
int | GetWidth () const |
Get the width of the matrix. More... | |
int | GetVDim () const |
For backward compatibility get the width of the matrix. More... | |
bool | IsSymmetric () const |
virtual void | EvalSymmetric (Vector &K, ElementTransformation &T, const IntegrationPoint &ip) |
Evaluate the upper triangular entries of the matrix coefficient in the symmetric case, similarly to Eval. Matrix entry (i,j) is stored in K[j - i + os_i] for 0 <= i <= j < width, os_0 = 0, os_{i+1} = os_i + width - i. That is, K = {M(0,0), ..., M(0,w-1), M(1,1), ..., M(1,w-1), ..., M(w-1,w-1) with w = width. More... | |
virtual | ~MatrixCoefficient () |
Additional Inherited Members | |
Protected Attributes inherited from mfem::MatrixCoefficient | |
int | height |
int | width |
double | time |
bool | symmetric |
Matrix coefficient defined by a matrix of scalar coefficients. Coefficients that are not set will evaluate to zero in the vector. The coefficient is stored as a flat Array with indexing (i,j) -> i*width+j.
Definition at line 831 of file coefficient.hpp.
|
explicit |
Construct a coefficient matrix of dimensions dim * dim. The actual coefficients still need to be added with Set().
Definition at line 374 of file coefficient.cpp.
|
virtual |
Definition at line 393 of file coefficient.cpp.
|
inline |
Evaluate coefficient located at (i,j) in the matrix using integration point ip.
Definition at line 852 of file coefficient.hpp.
|
virtual |
Evaluate the matrix coefficient ip.
Implements mfem::MatrixCoefficient.
Definition at line 401 of file coefficient.cpp.
|
inline |
Get the coefficient located at (i,j) in the matrix.
Definition at line 843 of file coefficient.hpp.
void mfem::MatrixArrayCoefficient::Set | ( | int | i, |
int | j, | ||
Coefficient * | c, | ||
bool | own = true |
||
) |
Set the coefficient located at (i,j) in the matrix. By default by default this will take ownership of the Coefficient passed in, but this can be overridden with the own parameter.
Definition at line 386 of file coefficient.cpp.