concepts::ElementMatrix< F > Class Template Reference

Element matrix. More...

#include <linearForm.hh>

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. More...
 
uint col () const
 Returns current column. More...
 
void compress (const Real threshold=EPS)
 Compresses the matrix by dropping small entries. More...
 
 ElementMatrix (const uint m, const uint n, const F *data)
 
 ElementMatrix (const uint m=0, const uint n=0)
 
int getIndex () const
 
std::ostream & info (std::ostream &os) const
 
 operator F* ()
 Returns a pointer to the data array. More...
 
F & operator() (const uint i, const uint j)
 
const F & operator() (const uint i, const uint j) const
 Returns element (i, j) More...
 
ElementMatrix< F > & operator*= (const F n)
 Scaling operator. More...
 
template<class G >
ElementMatrix< F > & operator= (const ElementMatrix< G > &other)
 can be used to upcast ElementMatrix<Real> to ElementMatrix<Cmplx> More...
 
ElementMatrix< F > & operator= (const ElementMatrixBase< F > &A)
 Assignement operator. More...
 
virtual ElementMatrix< F > & operator= (const F &v)
 
virtual void resize (uint m, uint n)
 Sets a new size. More...
 
uint row () const
 Returns current row. More...
 
void setIndex (int i)
 
void setTranspose (bool t)
 Sets the transpose status to t. More...
 
bool transpose ()
 Transposes the matrix. More...
 
void writeColumn (uint col, const Array< F > &val)
 Writes an array to a column. More...
 
void writeColumn (uint col, const F val)
 Writes a value to a column in case of m() >= 1. More...
 
template<uint dim>
void writeColumn (uint col, const Point< F, dim > &val)
 Writes a vector to a column in case of m() >= dim. More...
 
void zeros ()
 Fills the matrix with zeros. More...
 
virtual ~ElementMatrix ()
 

Private Attributes

uint i_
 Entrance in Array definded by index. More...
 

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 18 of file linearForm.hh.

Member Typedef Documentation

◆ value_type

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

Definition at line 208 of file element.hh.

Constructor & Destructor Documentation

◆ ElementMatrix() [1/2]

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

◆ ElementMatrix() [2/2]

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

◆ ~ElementMatrix()

template<class F >
virtual concepts::ElementMatrix< F >::~ElementMatrix ( )
inlinevirtual

Definition at line 214 of file element.hh.

Member Function Documentation

◆ add()

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.

◆ col()

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

Returns current column.

Definition at line 309 of file element.hh.

◆ compress()

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.

◆ getIndex()

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

Definition at line 289 of file element.hh.

◆ info()

template<class F >
std::ostream& concepts::ElementMatrix< F >::info ( std::ostream &  os) const

◆ operator F*()

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

Returns a pointer to the data array.

Definition at line 298 of file element.hh.

◆ operator()() [1/2]

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

Definition at line 225 of file element.hh.

◆ operator()() [2/2]

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

Returns element (i, j)

Definition at line 222 of file element.hh.

◆ operator*=()

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

Scaling operator.

Definition at line 301 of file element.hh.

◆ operator=() [1/3]

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 236 of file element.hh.

◆ operator=() [2/3]

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

Assignement operator.

◆ operator=() [3/3]

template<class F >
virtual ElementMatrix<F>& concepts::ElementMatrix< F >::operator= ( const F &  v)
inlinevirtual

Definition at line 246 of file element.hh.

◆ resize()

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

Sets a new size.

Previous data might be lost. The internal storage is set to the default row-major order.

◆ row()

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

Returns current row.

Definition at line 307 of file element.hh.

◆ setIndex()

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

Definition at line 292 of file element.hh.

◆ setTranspose()

template<class F >
void concepts::ElementMatrix< F >::setTranspose ( bool  t)
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.

◆ transpose()

template<class F >
bool concepts::ElementMatrix< F >::transpose ( )
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.

Deprecated:
use isTranspose() and setTranspose()

Definition at line 277 of file element.hh.

◆ writeColumn() [1/3]

template<class F >
void concepts::ElementMatrix< F >::writeColumn ( uint  col,
const Array< F > &  val 
)

Writes an array to a column.

◆ writeColumn() [2/3]

template<class F >
void concepts::ElementMatrix< F >::writeColumn ( uint  col,
const F  val 
)

Writes a value to a column in case of m() >= 1.

◆ writeColumn() [3/3]

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

◆ zeros()

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

Fills the matrix with zeros.

Definition at line 295 of file element.hh.

Member Data Documentation

◆ i_

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

Entrance in Array definded by index.

Definition at line 321 of file element.hh.


The documentation for this class was generated from the following files:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich