11# define EPS DBL_EPSILON
14# define EPS std::numeric_limits<double>::epsilon()
28#define ElementMatrixAppl_D 0
34 class ElementGraphics;
122 virtual std::ostream&
info(std::ostream&
os)
const {
141 typedef F value_type;
157 DEBUGL(ElementMatrixAppl_D,
'(' << (
t_ ?
n_ :
m_) <<
'x'
158 << (
t_ ?
m_ :
n_) <<
") - " << (
t_ ? j : i) <<
", "
169 operator const F*()
const {
return (
const F*)
data_; }
185 bool storeMatlab(
const std::string filename, std::string name =
"",
186 bool append =
false)
const;
208 typedef F value_type;
226 DEBUGL(ElementMatrixAppl_D,
'(' << this->
m() <<
'x' << this->
n() <<
") - "
227 << (this->
t_ ? j : i) <<
", " << (
this->
t_ ? i : j));
230 return this->
t_ ? this->
data_[j * this->
n_ + i]
231 : this->
data_[i * this->
n_ + j];
239 i_ =
other.getIndex();
298 operator F*() {
return (F*)this->
data_; }
318 std::ostream& info(std::ostream&
os)
const;
329 for(
uint i = 0; i < dim; ++i)
330 (*
this)(i, col) = val[i];
virtual Real3d elemMap(const Real coord_local) const
Element map from point local coordinates in 1D.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
uint k
number of the edge in the underlying element
const F * elm
underlying 2D element
const F & operator()(const uint i, const uint j) const
Returns element (i, j)
const Array< F > & getData() const
Returns the data array
uint n() const
Returns the number of columns.
uint m() const
Returns the number of rows.
bool storeMatlab(const std::string filename, std::string name="", bool append=false) const
uint n_
Number of columns.
uint size() const
Returns the number of entries in the matrix.
void writeColumn(uint col, const Point< F, dim > &val)
Writes a vector to a column in case of m() >= dim.
const F & operator()(const uint i, const uint j) const
Returns element (i, j)
ElementMatrix< F > & operator=(const ElementMatrix< G > &other)
void writeColumn(uint col, const F val)
Writes a value to a column in case of m() >= 1.
void zeros()
Fills the matrix with zeros.
void add(const ElementMatrix< F > &A, uint offm=0, uint offn=0)
Addition of another element matrix with possible offset.
void writeColumn(uint col, const Array< F > &val)
Writes an array to a column.
ElementMatrix< F > & operator*=(const F n)
Scaling operator.
virtual void resize(uint m, uint n)
uint row() const
Returns current row.
void compress(const Real threshold=EPS)
ElementMatrix< F > & operator=(const ElementMatrixBase< F > &A)
Assignement operator.
void setTranspose(bool t)
uint col() const
Returns current column.
virtual const Cell & cell() const =0
Returns the cell on which the element is built.
virtual const TMatrixBase< F > & T() const =0
Returns the T matrix of the element.
uint & tag()
Returns the tag.
Element()
Default constructor.
virtual const TMatrixBase< F > & T() const =0
Returns the T matrix of the element.
#define conceptsAssert(cond, exc)
#define DEBUGL(doit, msg)
std::string typeOf(const T &t)
Set< F > makeSet(uint n, const F &first,...)