concepts::DenseMatrix< F > Class Template Reference
Dense matrix. More...
#include <compositions.hh>
Public Types | |
typedef Cmplxtype< F >::type | c_type |
Complex type of data type. More... | |
typedef std::conditional< std::is_same< typename Realtype< F >::type, F >::value, typename Realtype< F >::type, typename Cmplxtype< F >::type >::type | d_type |
Data type, depending if F is real or complex. More... | |
typedef Realtype< F >::type | r_type |
Real type of data type. More... | |
Public Member Functions | |
void | addInto (Matrix< F > &dest, const F fact, const uint rowoffset=0, const uint coloffset=0) const |
This matrix is added into to the given matrix. More... | |
template<class T > | |
void | addInto (Matrix< T > &dest, const T fact, const uint rowoffset=0, const uint coloffset=0) const |
allows to add a Real Matrix to a complex one. More... | |
template<class T > | |
void | addIntoT (Matrix< T > &dest, const T fact, const uint rowoffset=0, const uint coloffset=0) const |
allows to add a Real Matrix to a complex one. More... | |
DenseMatrix (const Compose< F > &L) | |
Constructor. More... | |
DenseMatrix (const DenseMatrix< F > &m) | |
Copy constructor. More... | |
DenseMatrix (const LiCo< F > &L) | |
Constructor. More... | |
DenseMatrix (const Matrix< F > &m, bool t=false) | |
Copy constructor. More... | |
template<class G > | |
DenseMatrix (const Space< G > &spc, const BilinearForm< F, G > &bf) | |
Constructor. More... | |
template<class G > | |
DenseMatrix (const Space< G > &spc, const BilinearForm< F, G > &bf, const Sequence< ElementWithCell< G > * > &seq) | |
Constructor. More... | |
template<class G > | |
DenseMatrix (const Space< G > &spcX, const Space< G > &spcY) | |
Constructor for an empty matrix. More... | |
template<class G > | |
DenseMatrix (const Space< G > &spcX, const Space< G > &spcY, const BilinearForm< F, G > &bf, const bool single=true) | |
Constructor. More... | |
DenseMatrix (const Vector< F > &v, bool t=false) | |
Transformation constructor from a vector of length n. More... | |
DenseMatrix (int m=0, int n=0, bool transpose=false) | |
Constructor for an empty matrix. More... | |
virtual void | operator() (const Function< c_type > &fncY, Function< c_type > &fncX) |
virtual void | operator() (const Function< r_type > &fncY, Function< F > &fncX) |
virtual F & | operator() (const uint i, const uint j) |
virtual F | operator() (const uint i, const uint j) const |
template<class H , class I > | |
void | operator() (const Vector< H > &fncY, Vector< I > &fncX) |
virtual DenseMatrix< F > & | operator= (const F &v) |
virtual void | resize (uint m, uint n) |
Resize to m rows and n columns. More... | |
virtual void | setTranspose (bool t) |
virtual void | transpMult (const Vector< c_type > &fncY, Vector< c_type > &fncX) |
virtual void | transpMult (const Vector< r_type > &fncY, Vector< F > &fncX) |
Protected Member Functions | |
virtual std::ostream & | info (std::ostream &os) const |
Detailed Description
template<class F>
class concepts::DenseMatrix< F >
Dense matrix.
The matrix has the size where m is the dimension of the image space (spaceX
) and n is the dimension of the source space (spaceY
).
The matrix is setup and assembled in the constructor. It calls the bilinear form on every element of the space and uses the T matrices of the elements to assemble the element matrices into the global matrix.
There are quite a few solver which can be used to solve the system.
- See also
- TMatrixBase
- CG
- GMRes
- Examples
- hpFEM2d.cc, and matfileTutorial.cc.
Definition at line 28 of file compositions.hh.
Member Typedef Documentation
◆ c_type
typedef Cmplxtype<F>::type concepts::DenseMatrix< F >::c_type |
Complex type of data type.
Definition at line 49 of file denseMatrix.hh.
◆ d_type
typedef std::conditional<std::is_same<typename Realtype<F>::type, F>::value , typename Realtype<F>::type, typename Cmplxtype<F>::type >::type concepts::DenseMatrix< F >::d_type |
Data type, depending if F is real or complex.
Definition at line 52 of file denseMatrix.hh.
◆ r_type
typedef Realtype<F>::type concepts::DenseMatrix< F >::r_type |
Real type of data type.
Definition at line 47 of file denseMatrix.hh.
Constructor & Destructor Documentation
◆ DenseMatrix() [1/10]
concepts::DenseMatrix< F >::DenseMatrix | ( | const Space< G > & | spcX, |
const Space< G > & | spcY, | ||
const BilinearForm< F, G > & | bf, | ||
const bool | single = true |
||
) |
Constructor.
Computes the global matrix by assembling the element matrices.
This constructor features a double loop over the elements of the image and the source space. On each combination, the bilinear form is called.
Using this constructor, if spcX
!= spcY
or if you have local matrices which express the interaction of the two elements. You can force this constructor to execute the double loop in such a way that only for diagonal combinations of the elements in both space the integration and assembling is executed. Use single
and set it to true
.
In non-symmetric FEM (eg. DGFEM), one has to solve AT u = f. This constructor computes A and not AT.
- Parameters
-
spcX Image space spcY Source space bf Bilinear form
◆ DenseMatrix() [2/10]
concepts::DenseMatrix< F >::DenseMatrix | ( | const Space< G > & | spc, |
const BilinearForm< F, G > & | bf | ||
) |
Constructor.
Computes the global matrix by assembling the element matrices.
This constructor features a single loop over the elements of the space. On each element, the bilinear form is called.
Use the constructor, if spcX == spcY and there is no special element interaction. This is the case for standard FEM.
- Parameters
-
spc Image and source space bf Bilinear form
◆ DenseMatrix() [3/10]
concepts::DenseMatrix< F >::DenseMatrix | ( | const Space< G > & | spc, |
const BilinearForm< F, G > & | bf, | ||
const Sequence< ElementWithCell< G > * > & | seq | ||
) |
Constructor.
Computes the partial matrix by assembling the element matrices on a given subdomain
This constructor features a single loop over the elements of the sequence. On each element, the bilinear form is called.
- Parameters
-
spc Image and source space bf Bilinear form seq Sequence of elements to take into account
◆ DenseMatrix() [4/10]
concepts::DenseMatrix< F >::DenseMatrix | ( | const Space< G > & | spcX, |
const Space< G > & | spcY | ||
) |
Constructor for an empty matrix.
- Parameters
-
spcX Image space spcY Source space
◆ DenseMatrix() [5/10]
|
inline |
Constructor for an empty matrix.
- Parameters
-
m Number of rows n Number of columns transpose The matrix will be stored in transposed format
Definition at line 121 of file denseMatrix.hh.
◆ DenseMatrix() [6/10]
concepts::DenseMatrix< F >::DenseMatrix | ( | const LiCo< F > & | L | ) |
Constructor.
Evaluates a linear combination and stores the result in the matrix.
◆ DenseMatrix() [7/10]
concepts::DenseMatrix< F >::DenseMatrix | ( | const Compose< F > & | L | ) |
Constructor.
Evaluates a composition and stores the result in the matrix.
◆ DenseMatrix() [8/10]
concepts::DenseMatrix< F >::DenseMatrix | ( | const DenseMatrix< F > & | m | ) |
Copy constructor.
◆ DenseMatrix() [9/10]
concepts::DenseMatrix< F >::DenseMatrix | ( | const Matrix< F > & | m, |
bool | t = false |
||
) |
Copy constructor.
If t
is set to true, the matrix is transposed during the copy process
◆ DenseMatrix() [10/10]
concepts::DenseMatrix< F >::DenseMatrix | ( | const Vector< F > & | v, |
bool | t = false |
||
) |
Transformation constructor from a vector of length n.
If t
is set to true, the matrix is a 1xn, otherwise nx1.
Member Function Documentation
◆ addInto() [1/2]
void concepts::DenseMatrix< F >::addInto | ( | Matrix< F > & | dest, |
const F | fact, | ||
const uint | rowoffset = 0 , |
||
const uint | coloffset = 0 |
||
) | const |
This matrix is added into to the given matrix.
- Parameters
-
dest Matrix into which this matrix should be added. fact Factor by which this matrix should be multiplied.
- Examples
- hpFEM2d.cc.
◆ addInto() [2/2]
|
inline |
allows to add a Real Matrix to a complex one.
Definition at line 196 of file denseMatrix.hh.
◆ addIntoT()
|
inline |
allows to add a Real Matrix to a complex one.
Definition at line 212 of file denseMatrix.hh.
◆ info()
|
protectedvirtual |
◆ operator()() [1/5]
|
virtual |
◆ operator()() [2/5]
|
virtual |
◆ operator()() [3/5]
|
inlinevirtual |
Definition at line 165 of file denseMatrix.hh.
◆ operator()() [4/5]
|
inlinevirtual |
Definition at line 161 of file denseMatrix.hh.
◆ operator()() [5/5]
void concepts::DenseMatrix< F >::operator() | ( | const Vector< H > & | fncY, |
Vector< I > & | fncX | ||
) |
Definition at line 231 of file denseMatrix.hh.
◆ operator=()
|
inlinevirtual |
Definition at line 169 of file denseMatrix.hh.
◆ resize()
|
inlinevirtual |
Resize to m
rows and n
columns.
Be aware that data might be lost.
Definition at line 178 of file denseMatrix.hh.
◆ setTranspose()
|
inlinevirtual |
Definition at line 182 of file denseMatrix.hh.
◆ transpMult() [1/2]
|
virtual |
◆ transpMult() [2/2]
|
virtual |
The documentation for this class was generated from the following files:
- operator/compositions.hh
- operator/denseMatrix.hh