#include <element.hh>
Public Types | |
typedef F | value_type |
Public Member Functions | |
ElementMatrix (const uint m=0, const uint n=0) | |
ElementMatrix (const uint m, const uint n, const F *data) | |
ElementMatrix< F > & | operator= (const ElementMatrixBase< F > &A) |
Assignement operator. | |
void | add (const ElementMatrix< F > &A, uint offm=0, uint offn=0) |
Addition of another element matrix with possible offset. | |
const F & | operator() (const uint i, const uint j) const |
Returns element (i, j) | |
F & | operator() (const uint i, const uint j) |
template<class G > | |
ElementMatrix< F > & | operator= (const ElementMatrix< G > &other) |
virtual ElementMatrix< F > & | operator= (const F &v) |
virtual void | resize (uint m, uint n) |
template<uint dim> | |
void | writeColumn (uint col, const Point< F, dim > &val) |
Writes a vector to a column in case of m() >= dim. | |
void | writeColumn (uint col, const Array< F > &val) |
Writes an array to a column. | |
void | writeColumn (uint col, const F val) |
Writes a value to a column in case of m() >= 1. | |
bool | transpose () |
void | setTranspose (bool t) |
int | getIndex () const |
void | setIndex (int i) |
void | zeros () |
Fills the matrix with zeros. | |
operator F* () | |
Returns a pointer to the data array. | |
ElementMatrix< F > & | operator*= (const F n) |
Scaling operator. | |
uint | row () const |
Returns current row. | |
uint | col () const |
Returns current column. | |
void | compress (const Real threshold=EPS) |
std::ostream & | info (std::ostream &os) const |
uint | m () const |
Returns the number of rows. | |
uint | n () const |
Returns the number of columns. | |
uint | size () const |
Returns the number of entries in the matrix. | |
operator const F * () const | |
Returns a pointer to the data array. | |
const Array< F > & | getData () const |
Returns the data array | |
bool | isTranspose () const |
bool | storeMatlab (const std::string filename, std::string name="", bool append=false) const |
Protected Attributes | |
Array< F > | data_ |
Data. | |
uint | m_ |
Number of rows. | |
uint | n_ |
Number of columns. | |
bool | t_ |
Transpose. | |
Element matrix. This class stores the element matrix computed by a bilinear form. These matrices are assembled in a later step.
Definition at line 206 of file element.hh.
typedef F concepts::ElementMatrix< F >::value_type |
Definition at line 208 of file element.hh.
|
inlinevirtual |
Definition at line 214 of file element.hh.
|
inline |
Returns current column.
Definition at line 309 of file element.hh.
void concepts::ElementMatrix< F >::compress | ( | const Real | threshold = EPS | ) |
Compresses the matrix by dropping small entries. All matrix entries which are smaller than a certain threshold
times the largest entry of the matrix are deleted from the matrix.
|
inlineinherited |
Returns the data array
Definition at line 172 of file element.hh.
|
inline |
Definition at line 289 of file element.hh.
|
inlineinherited |
Returns true if the matrix is internally stored as transposed (column-major).
Definition at line 177 of file element.hh.
|
inlineinherited |
Returns the number of rows.
Definition at line 151 of file element.hh.
|
inlineinherited |
Returns the number of columns.
Definition at line 153 of file element.hh.
|
inlineinherited |
Returns a pointer to the data array.
Definition at line 169 of file element.hh.
|
inline |
Returns a pointer to the data array.
Definition at line 298 of file element.hh.
|
inline |
Definition at line 225 of file element.hh.
|
inline |
Returns element (i, j)
Definition at line 222 of file element.hh.
|
inline |
Scaling operator.
Definition at line 301 of file element.hh.
|
inline |
can be used to upcast ElementMatrix<Real> to ElementMatrix<Cmplx>
Definition at line 236 of file element.hh.
|
inlinevirtual |
Definition at line 246 of file element.hh.
Sets a new size.
Previous data might be lost. The internal storage is set to the default row-major order.
Reimplemented in concepts::DenseMatrix< F >.
|
inline |
Returns current row.
Definition at line 307 of file element.hh.
|
inline |
Definition at line 292 of file element.hh.
|
inline |
Sets the transpose status to t
.
This does not anything if the matrix had the transpose status already. Otherwise, the dimensions are interchanged and the internal storage changes from row-major two column-major order or vice-versa.
Definition at line 286 of file element.hh.
|
inlineinherited |
Returns the number of entries in the matrix.
Definition at line 166 of file element.hh.
|
inherited |
Stores the matrix in a Matlab matrix
filename | name of the matlab file, with ending '.m' |
name | name of the variable, e.g. "A" |
append | if false, create new file, otherwise append to it |
|
inline |
Transposes the matrix.
Only the dimensions are interchanged, the data is not touched, but the internal storage changes from row-major two column-major order or vice-versa.
Definition at line 277 of file element.hh.
void concepts::ElementMatrix< F >::writeColumn | ( | uint | col, |
const Point< F, dim > & | val | ||
) |
Writes a vector to a column in case of m() >= dim.
Definition at line 326 of file element.hh.
|
inline |
Fills the matrix with zeros.
Definition at line 295 of file element.hh.
|
protectedinherited |
Data.
Definition at line 189 of file element.hh.
|
protectedinherited |
Number of rows.
Definition at line 191 of file element.hh.
|
protectedinherited |
Number of columns.
Definition at line 193 of file element.hh.
|
protectedinherited |
Definition at line 195 of file element.hh.