Abstract class for an operator. More...
#include <matrix.hh>


Public Types | |
| typedef Cmplxtype< F >::type | c_type |
| Real type of data type. | |
| typedef _Matrix_iterator< F, const F &, const F * > | const_iterator |
| typedef _Matrix_iterator< F, F &, F * > | iterator |
| typedef Realtype< F >::type | r_type |
| Real type of data type. | |
| typedef F | type |
| Type of data, e.g. matrix entries. | |
| typedef F | value_type |
Public Member Functions | |
| iterator | begin (uint r=0) |
| Iterator over the elements, standing at position (r,0). | |
| const_iterator | begin (uint r=0) const |
| Constant iterator over the elements, standing at position (r,0) | |
| virtual const uint | dimX () const |
| Returns the size of the image space of the operator (number of rows of the corresponding matrix) | |
| virtual const uint | dimY () const |
| Returns the size of the source space of the operator (number of columns of the corresponding matrix) | |
| iterator | end () |
| Iterator, standing behind last element. | |
| const_iterator | end () const |
| Constant iterator, standing behind last element. | |
| Matrix (uint nofRows, uint nofCols) | |
| const uint | nofCols () const |
| Number of columns. | |
| const uint | nofRows () const |
| Number of rows. | |
| virtual F & | operator() (const uint i, const uint j)=0 |
Returns and allows access to entry with indices i and j. | |
| virtual void | operator() (const Function< c_type > &fncY, Function< c_type > &fncX)=0 |
Application operator for complex function fncY. | |
| virtual void | operator() (const Function< r_type > &fncY, Function< F > &fncX)=0 |
Computes fncX = A(fncY) where A is this matrix. | |
| virtual F | operator() (const uint i, const uint j) const =0 |
Returns entry with indices i and j. | |
| virtual bool | operator== (const Matrix< F > &otherMat) const |
| virtual void | transpMult (const Vector< r_type > &fncY, Vector< F > &fncX)=0 |
Computes fncX = AT fncY where A is this matrix. | |
| virtual void | transpMult (const Vector< c_type > &fncY, Vector< c_type > &fncX)=0 |
Static Public Member Functions | |
| template<class G > | |
| static void | assembly (Matrix< F > &dest, const Space< G > &spc, BilinearForm< F, G > &bf, const Real threshold=0.0) |
Assembly operator for dest using the bilinear form bf. | |
| template<class G > | |
| static void | assembly (Matrix< F > &dest, BilinearForm< F, G > &bf, const ElementPairList< G > &pairs) |
Assembly operator for dest using the bilinear form bf. | |
| template<class G > | |
| static void | assembly (Matrix< F > &dest, const Space< G > &spcX, const Space< G > &spcY, BilinearForm< F, G > &bf, const Real threshold=0.0) |
Assembly operator for dest using the bilinear form bf. | |
Timing Interface | |
These functions are used to get timings from class internal computations. The values are stored in a user defined concepts::InOutParameters structure in different arrays (see concepts::ResultsTable table; table.addMap(concepts::ResultsTable::DOUBLE, "jacobian", output); table.addMap(concepts::ResultsTable::DOUBLE, "whole_sumfact", output); std::ofstream ofs("table.gnuplot"); ofs << std::setprecision(20); table.print<concepts::ResultsTable::GNUPLOT>(ofs); | |
| static void | setTimings (InOutParameters *timings) |
| Sets the class to store the timing values in. | |
| static bool | timings () |
| Returns true if the class is able to do timings. | |
Protected Member Functions | |
| virtual std::ostream & | info (std::ostream &os) const |
| Returns information in an output stream. | |
Protected Attributes | |
| uint | dimX_ |
| Dimension of image space and the source space. | |
| uint | dimY_ |
Static Private Attributes | |
| static uint | timeCntr_ |
| Counter for timing table. | |
| static InOutParameters * | timings_ |
| Place to store timing values. | |
Abstract class for an operator.
This class is equiped with an interface to get timings of internal computations if compiled accordingly (see bilinearForm.cc file), see setTimings() and timings().
| typedef Cmplxtype<F>::type concepts::Matrix< F >::c_type |
Real type of data type.
Reimplemented from concepts::Operator< F >.
Reimplemented in concepts::DenseMatrix< F >, concepts::DiagonalMatrix< F >, concepts::Permutation< F >, concepts::SparseMatrix< F >, concepts::SubMatrixN< F >, concepts::Transpose< F >, concepts::DenseMatrix< Cmplx >, concepts::DenseMatrix< Real >, concepts::DiagonalMatrix< Real >, concepts::Permutation< Real >, concepts::SparseMatrix< concepts::Real >, concepts::SparseMatrix< FX >, concepts::SparseMatrix< T >, concepts::SparseMatrix< Cmplx >, and concepts::SparseMatrix< Real >.
| typedef _Matrix_iterator<F, const F&, const F*> concepts::Matrix< F >::const_iterator |
| typedef _Matrix_iterator<F, F&, F*> concepts::Matrix< F >::iterator |
| typedef Realtype<F>::type concepts::Matrix< F >::r_type |
Real type of data type.
Reimplemented from concepts::Operator< F >.
Reimplemented in concepts::DenseMatrix< F >, concepts::DiagonalMatrix< F >, concepts::Permutation< F >, concepts::SparseMatrix< F >, concepts::SubMatrixN< F >, concepts::Transpose< F >, concepts::DenseMatrix< Cmplx >, concepts::DenseMatrix< Real >, concepts::DiagonalMatrix< Real >, concepts::Permutation< Real >, concepts::SparseMatrix< concepts::Real >, concepts::SparseMatrix< FX >, concepts::SparseMatrix< T >, concepts::SparseMatrix< Cmplx >, and concepts::SparseMatrix< Real >.
typedef F concepts::Operator< F >::type [inherited] |
Type of data, e.g. matrix entries.
Reimplemented in concepts::AfterIteration< F >, and concepts::SubMatrixN< F >.
Definition at line 43 of file compositions.hh.
| typedef F concepts::Matrix< F >::value_type |
| concepts::Matrix< F >::Matrix | ( | uint | nofRows, |
| uint | nofCols | ||
| ) | [inline] |
| static void concepts::Matrix< F >::assembly | ( | Matrix< F > & | dest, |
| const Space< G > & | spc, | ||
| BilinearForm< F, G > & | bf, | ||
| const Real | threshold = 0.0 |
||
| ) | [static] |
Assembly operator for dest using the bilinear form bf.
This assembly operator does not compute element matrices for two different elements. The elements are taken from the space spc.
| static void concepts::Matrix< F >::assembly | ( | Matrix< F > & | dest, |
| const Space< G > & | spcX, | ||
| const Space< G > & | spcY, | ||
| BilinearForm< F, G > & | bf, | ||
| const Real | threshold = 0.0 |
||
| ) | [static] |
Assembly operator for dest using the bilinear form bf.
This assembly operator computes also the element matrices for two different elements (coming from spcX and spcY).
| static void concepts::Matrix< F >::assembly | ( | Matrix< F > & | dest, |
| BilinearForm< F, G > & | bf, | ||
| const ElementPairList< G > & | pairs | ||
| ) | [static] |
Assembly operator for dest using the bilinear form bf.
This assembly operator uses the element pairs taken from pairs. For every two elements found in a ElementPair in pairs, the bilinear form is evaluated and the result assembled into dest.
| const_iterator concepts::Matrix< F >::begin | ( | uint | r = 0 | ) | const [inline] |
Constant iterator over the elements, standing at position (r,0)
Might be implemented differently for derived classes.
Reimplemented in concepts::SparseMatrix< F >, concepts::SubMatrixN< F >, concepts::SparseMatrix< concepts::Real >, concepts::SparseMatrix< FX >, concepts::SparseMatrix< T >, concepts::SparseMatrix< Cmplx >, and concepts::SparseMatrix< Real >.
| iterator concepts::Matrix< F >::begin | ( | uint | r = 0 | ) | [inline] |
Iterator over the elements, standing at position (r,0).
Might be implemented differently for derived classes.
Reimplemented in concepts::SparseMatrix< F >, concepts::SubMatrixN< F >, concepts::SparseMatrix< concepts::Real >, concepts::SparseMatrix< FX >, concepts::SparseMatrix< T >, concepts::SparseMatrix< Cmplx >, and concepts::SparseMatrix< Real >.
| virtual const uint concepts::Operator< F >::dimX | ( | ) | const [inline, virtual, inherited] |
Returns the size of the image space of the operator (number of rows of the corresponding matrix)
Definition at line 87 of file compositions.hh.
| virtual const uint concepts::Operator< F >::dimY | ( | ) | const [inline, virtual, inherited] |
Returns the size of the source space of the operator (number of columns of the corresponding matrix)
Definition at line 92 of file compositions.hh.
| iterator concepts::Matrix< F >::end | ( | ) | [inline] |
| const_iterator concepts::Matrix< F >::end | ( | ) | const [inline] |
Constant iterator, standing behind last element.
Reimplemented in concepts::SparseMatrix< F >, concepts::SubMatrixN< F >, concepts::SparseMatrix< concepts::Real >, concepts::SparseMatrix< FX >, concepts::SparseMatrix< T >, concepts::SparseMatrix< Cmplx >, and concepts::SparseMatrix< Real >.
| virtual std::ostream& concepts::Operator< F >::info | ( | std::ostream & | os | ) | const [protected, virtual, inherited] |
Returns information in an output stream.
Reimplemented from concepts::OutputOperator.
Reimplemented in aglowav::C2W< F >, aglowav::W2C< F >, aglowav::C2_tl2< F >, aglowav::C2tl2< F >, aglowav::CGt2< F >, aglowav::ComposeN< F >, aglowav2::Operator00< F >, aglowav2::C2W< F >, aglowav2::W2C< F >, EquivalentStress2d, Advection< NumFlux >, bem::D< F >, bem::D_1< F >, cluster::Operator01< NodeX, NodeY >, cluster::Operator02< NodeX, NodeY >, hp3D::SpaceTransition, concepts::AfterIteration< F >, concepts::BiCGStab< F, G >, concepts::CG< F >, concepts::VecOperator< F >, concepts::Compose< F, H >, concepts::Multiple< F >, concepts::LiCoI< F >, concepts::LiCo< F >, concepts::Constrained, concepts::DenseMatrix< F >, concepts::DiagonalMatrix< F >, concepts::DiagonalSolver< F >, concepts::DDSolver< F, G >, concepts::GMRes< F >, concepts::LapackChol, concepts::NRLSolver, concepts::Pardiso, concepts::Permutation< F >, concepts::TrivExtendRestrict< F >, concepts::PETSc, concepts::PETScMat, concepts::SparseMatrix< F >, concepts::Spooles, concepts::SubMatrixN< F >, concepts::SuperLU< F >, concepts::Transpose< F >, concepts::Umfpack, sparseqr::Driver, sparseqr::GivensRotations< F >, vectorial::BlockOperator< F >, vectorial::BramblePasciak, vectorial::CGUzawa, concepts::VecOperator< Real >, concepts::Compose< F >, concepts::DenseMatrix< Cmplx >, concepts::DenseMatrix< Real >, concepts::DiagonalMatrix< Real >, concepts::Permutation< Real >, concepts::TrivExtendRestrict< Real >, concepts::SparseMatrix< concepts::Real >, concepts::SparseMatrix< FX >, concepts::SparseMatrix< T >, concepts::SparseMatrix< Cmplx >, concepts::SparseMatrix< Real >, and sparseqr::GivensRotations< Real >.
| const uint concepts::Matrix< F >::nofCols | ( | ) | const [inline] |
| const uint concepts::Matrix< F >::nofRows | ( | ) | const [inline] |
| virtual void concepts::Matrix< F >::operator() | ( | const Function< c_type > & | fncY, |
| Function< c_type > & | fncX | ||
| ) | [pure virtual] |
Application operator for complex function fncY.
Computes fncX = A(fncY) where A is this operator. fncX becomes complex.
In derived classes its enough to implement the operator() for complex Operator's. If a real counterpart is not implemented, the function fncY is splitted into real and imaginary part and the application operator for real functions is called for each. Then the result is combined.
If in a derived class the operator() for complex Operator's is not implemented, a exception is thrown from here.
Reimplemented from concepts::Operator< F >.
Implemented in concepts::DenseMatrix< F >, concepts::DiagonalMatrix< F >, concepts::Permutation< F >, concepts::SparseMatrix< F >, concepts::SubMatrixN< F >, concepts::Transpose< F >, concepts::DenseMatrix< Cmplx >, concepts::DenseMatrix< Real >, concepts::DiagonalMatrix< Real >, concepts::Permutation< Real >, concepts::SparseMatrix< concepts::Real >, concepts::SparseMatrix< FX >, concepts::SparseMatrix< T >, concepts::SparseMatrix< Cmplx >, and concepts::SparseMatrix< Real >.
| virtual F concepts::Matrix< F >::operator() | ( | const uint | i, |
| const uint | j | ||
| ) | const [pure virtual] |
Returns entry with indices i and j.
Implemented in concepts::DenseMatrix< F >, concepts::DiagonalMatrix< F >, concepts::Permutation< F >, concepts::PETScMat, concepts::SparseMatrix< F >, concepts::SubMatrixN< F >, concepts::Transpose< F >, concepts::DenseMatrix< Cmplx >, concepts::DenseMatrix< Real >, concepts::DiagonalMatrix< Real >, concepts::Permutation< Real >, concepts::SparseMatrix< concepts::Real >, concepts::SparseMatrix< FX >, concepts::SparseMatrix< T >, concepts::SparseMatrix< Cmplx >, and concepts::SparseMatrix< Real >.
| virtual F& concepts::Matrix< F >::operator() | ( | const uint | i, |
| const uint | j | ||
| ) | [pure virtual] |
Returns and allows access to entry with indices i and j.
Implemented in concepts::DenseMatrix< F >, concepts::DiagonalMatrix< F >, concepts::Permutation< F >, concepts::PETScMat, concepts::SparseMatrix< F >, concepts::SubMatrixN< F >, concepts::Transpose< F >, concepts::DenseMatrix< Cmplx >, concepts::DenseMatrix< Real >, concepts::DiagonalMatrix< Real >, concepts::Permutation< Real >, concepts::SparseMatrix< concepts::Real >, concepts::SparseMatrix< FX >, concepts::SparseMatrix< T >, concepts::SparseMatrix< Cmplx >, and concepts::SparseMatrix< Real >.
| virtual void concepts::Matrix< F >::operator() | ( | const Function< r_type > & | fncY, |
| Function< F > & | fncX | ||
| ) | [pure virtual] |
Computes fncX = A(fncY) where A is this matrix.
Reimplemented from concepts::Operator< F >.
Implemented in concepts::DenseMatrix< F >, concepts::DiagonalMatrix< F >, concepts::Permutation< F >, concepts::SparseMatrix< F >, concepts::SubMatrixN< F >, concepts::Transpose< F >, concepts::DenseMatrix< Cmplx >, concepts::DenseMatrix< Real >, concepts::DiagonalMatrix< Real >, concepts::Permutation< Real >, concepts::SparseMatrix< concepts::Real >, concepts::SparseMatrix< FX >, concepts::SparseMatrix< T >, concepts::SparseMatrix< Cmplx >, and concepts::SparseMatrix< Real >.
| virtual bool concepts::Matrix< F >::operator== | ( | const Matrix< F > & | otherMat | ) | const [inline, virtual] |
| static void concepts::Matrix< F >::setTimings | ( | InOutParameters * | timings | ) | [static] |
Sets the class to store the timing values in.
Additionally, the timeCntr_ is reset to 0. This counter is used to fill in the values into the arrays listed below in subsequent calls. The following timings are taken and stored in timings:
bilinear_form tmatrix_apply global_assembly | static bool concepts::Matrix< F >::timings | ( | ) | [static] |
Returns true if the class is able to do timings.
The ability to do timings depends on a compiler switch in matrix.cc file.
| virtual void concepts::Matrix< F >::transpMult | ( | const Vector< r_type > & | fncY, |
| Vector< F > & | fncX | ||
| ) | [pure virtual] |
Computes fncX = AT fncY where A is this matrix.
Implemented in concepts::DenseMatrix< F >, concepts::DiagonalMatrix< F >, concepts::Permutation< F >, concepts::SparseMatrix< F >, concepts::SubMatrixN< F >, concepts::Transpose< F >, concepts::DenseMatrix< Cmplx >, concepts::DenseMatrix< Real >, concepts::DiagonalMatrix< Real >, concepts::Permutation< Real >, concepts::SparseMatrix< concepts::Real >, concepts::SparseMatrix< FX >, concepts::SparseMatrix< T >, concepts::SparseMatrix< Cmplx >, and concepts::SparseMatrix< Real >.
| virtual void concepts::Matrix< F >::transpMult | ( | const Vector< c_type > & | fncY, |
| Vector< c_type > & | fncX | ||
| ) | [pure virtual] |
Implemented in concepts::DenseMatrix< F >, concepts::DiagonalMatrix< F >, concepts::Permutation< F >, concepts::SparseMatrix< F >, concepts::SubMatrixN< F >, concepts::Transpose< F >, concepts::DenseMatrix< Cmplx >, concepts::DenseMatrix< Real >, concepts::DiagonalMatrix< Real >, concepts::Permutation< Real >, concepts::SparseMatrix< concepts::Real >, concepts::SparseMatrix< FX >, concepts::SparseMatrix< T >, concepts::SparseMatrix< Cmplx >, and concepts::SparseMatrix< Real >.
uint concepts::Operator< F >::dimX_ [protected, inherited] |
Dimension of image space and the source space.
Definition at line 96 of file compositions.hh.
uint concepts::Operator< F >::dimY_ [protected, inherited] |
Definition at line 96 of file compositions.hh.
uint concepts::Matrix< F >::timeCntr_ [static, private] |
InOutParameters* concepts::Matrix< F >::timings_ [static, private] |