Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Public Types | Public Member Functions | Protected Attributes | Private Attributes
concepts::ElementMatrix< F > Class Template Reference

Element matrix. More...

#include <element.hh>

Inheritance diagram for concepts::ElementMatrix< F >:
Inheritance graph
[legend]
Collaboration diagram for concepts::ElementMatrix< F >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef F value_type

Public Member Functions

void add (const ElementMatrix< F > &A, uint offm=0, uint offn=0)
 Addition of another element matrix with possible offset.
uint col () const
 Returns current column.
void compress (const Real threshold=EPS)
 Compresses the matrix by dropping small entries.
 ElementMatrix (const uint m, const uint n, const F *data)
 ElementMatrix (const uint m=0, const uint n=0)
const Array< F > & getData () const
 Returns the data array.
int getIndex () const
std::ostream & info (std::ostream &os) const
bool isTranspose () const
 Returns true if the matrix is transposed.
uint m () const
 Returns the number of rows.
uint n () const
 Returns the number of columns.
 operator const F * () const
 Returns a pointer to the data array.
 operator F * ()
 Returns a pointer to the data array.
operator() (const uint i, const uint j) const
 Returns element (i, j)
F & operator() (const uint i, const uint j)
ElementMatrix< F > & operator*= (const F n)
 Scaling operator.
template<class G >
ElementMatrix< F > & operator= (const ElementMatrix< G > &other)
 can be used to upcast ElementMatrix<Real> to ElementMatrix<Cmplx>
ElementMatrix< F > & operator= (const ElementMatrixBase< F > &A)
 Assignement operator.
void resize (uint m, uint n)
 Sets a new size.
uint row () const
 Returns current row.
void setIndex (int i)
void setTranspose (bool t)
uint size () const
 Returns the number of entries in the matrix.
bool storeMatlab (const std::string filename, std::string name="", bool append=false) const
 Stores the matrix in a Matlab matrix.
bool transpose ()
 Transposes the matrix.
void zeros ()
 Fills the matrix with zeros.

Protected Attributes

Array< F > data_
 Data.
uint m_
 Number of rows.
uint n_
 Number of columns.
bool t_
 Transpose.

Private Attributes

uint i_
 Entrance in Array definded by index.

Detailed Description

template<class F>
class concepts::ElementMatrix< F >

Element matrix.

This class stores the element matrix computed by a bilinear form. These matrices are assembled in a later step.

Author:
Philipp Frauenfelder, 2001

Definition at line 193 of file element.hh.


Member Typedef Documentation

template<class F>
typedef F concepts::ElementMatrix< F >::value_type

Reimplemented from concepts::ElementMatrixBase< F >.

Definition at line 195 of file element.hh.


Constructor & Destructor Documentation

template<class F>
concepts::ElementMatrix< F >::ElementMatrix ( const uint  m = 0,
const uint  n = 0 
)
template<class F>
concepts::ElementMatrix< F >::ElementMatrix ( const uint  m,
const uint  n,
const F *  data 
)

Member Function Documentation

template<class F>
void concepts::ElementMatrix< F >::add ( const ElementMatrix< F > &  A,
uint  offm = 0,
uint  offn = 0 
)

Addition of another element matrix with possible offset.

template<class F>
uint concepts::ElementMatrix< F >::col ( ) const [inline]

Returns current column.

Definition at line 262 of file element.hh.

template<class F>
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.

template<class F>
const Array<F>& concepts::ElementMatrixBase< F >::getData ( ) const [inline, inherited]

Returns the data array.

Definition at line 161 of file element.hh.

template<class F>
int concepts::ElementMatrix< F >::getIndex ( ) const [inline]
Deprecated:
: FIXME: what the heck is this even for?

Definition at line 242 of file element.hh.

template<class F>
std::ostream& concepts::ElementMatrix< F >::info ( std::ostream &  os) const
template<class F>
bool concepts::ElementMatrixBase< F >::isTranspose ( ) const [inline, inherited]

Returns true if the matrix is transposed.

Definition at line 164 of file element.hh.

template<class F>
uint concepts::ElementMatrixBase< F >::m ( ) const [inline, inherited]

Returns the number of rows.

Definition at line 140 of file element.hh.

template<class F>
uint concepts::ElementMatrixBase< F >::n ( ) const [inline, inherited]

Returns the number of columns.

Definition at line 142 of file element.hh.

template<class F>
concepts::ElementMatrixBase< F >::operator const F * ( ) const [inline, inherited]

Returns a pointer to the data array.

Definition at line 158 of file element.hh.

template<class F>
concepts::ElementMatrix< F >::operator F * ( ) [inline]

Returns a pointer to the data array.

Definition at line 251 of file element.hh.

template<class F>
F& concepts::ElementMatrix< F >::operator() ( const uint  i,
const uint  j 
) [inline]
template<class F>
F concepts::ElementMatrix< F >::operator() ( const uint  i,
const uint  j 
) const [inline]

Returns element (i, j)

Reimplemented from concepts::ElementMatrixBase< F >.

Reimplemented in concepts::DenseMatrix< F >, concepts::DenseMatrix< Cmplx >, and concepts::DenseMatrix< Real >.

Definition at line 207 of file element.hh.

template<class F>
ElementMatrix<F>& concepts::ElementMatrix< F >::operator*= ( const F  n) [inline]

Scaling operator.

Definition at line 254 of file element.hh.

template<class F>
ElementMatrix<F>& concepts::ElementMatrix< F >::operator= ( const ElementMatrixBase< F > &  A)

Assignement operator.

template<class F>
template<class G >
ElementMatrix<F>& concepts::ElementMatrix< F >::operator= ( const ElementMatrix< G > &  other) [inline]

can be used to upcast ElementMatrix<Real> to ElementMatrix<Cmplx>

Definition at line 221 of file element.hh.

template<class F>
void concepts::ElementMatrix< F >::resize ( uint  m,
uint  n 
)

Sets a new size.

template<class F>
uint concepts::ElementMatrix< F >::row ( ) const [inline]

Returns current row.

Definition at line 260 of file element.hh.

template<class F>
void concepts::ElementMatrix< F >::setIndex ( int  i) [inline]
Deprecated:
: FIXME: what the heck is this even for?

Definition at line 245 of file element.hh.

template<class F>
void concepts::ElementMatrix< F >::setTranspose ( bool  t) [inline]

Definition at line 239 of file element.hh.

template<class F>
uint concepts::ElementMatrixBase< F >::size ( ) const [inline, inherited]

Returns the number of entries in the matrix.

Definition at line 155 of file element.hh.

template<class F>
bool concepts::ElementMatrixBase< F >::storeMatlab ( const std::string  filename,
std::string  name = "",
bool  append = false 
) const [inherited]

Stores the matrix in a Matlab matrix.

Parameters:
filenamename of the matlab file, with ending '.m'
namename of the variable, e.g. "A"
appendif false, create new file, otherwise append to it
Returns:
true if the writes was successfull
template<class F>
bool concepts::ElementMatrix< F >::transpose ( ) [inline]

Transposes the matrix.

Deprecated:
use isTranspose() and setTranspose()

Definition at line 237 of file element.hh.

template<class F>
void concepts::ElementMatrix< F >::zeros ( ) [inline]

Fills the matrix with zeros.

Definition at line 248 of file element.hh.


Member Data Documentation

template<class F>
Array<F> concepts::ElementMatrixBase< F >::data_ [protected, inherited]

Data.

Definition at line 176 of file element.hh.

template<class F>
uint concepts::ElementMatrix< F >::i_ [private]

Entrance in Array definded by index.

Definition at line 274 of file element.hh.

template<class F>
uint concepts::ElementMatrixBase< F >::m_ [protected, inherited]

Number of rows.

Definition at line 178 of file element.hh.

template<class F>
uint concepts::ElementMatrixBase< F >::n_ [protected, inherited]

Number of columns.

Definition at line 180 of file element.hh.

template<class F>
bool concepts::ElementMatrixBase< F >::t_ [protected, inherited]

Transpose.

Definition at line 182 of file element.hh.


The documentation for this class was generated from the following file:

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)