Go to the documentation of this file.
6 #ifndef aglowav2Element_hh
7 #define aglowav2Element_hh
25 template<
class F = concepts::Real>
42 return l_ < k.
l() || (
l_ == k.
l() &&
j_ < k.
j());
44 inline uint&
l() {
return l_;}
45 inline uint
l()
const {
return l_;}
46 inline uint&
j() {
return j_;}
47 inline uint
j()
const {
return j_;}
61 inline const Key&
key()
const {
return key_;}
85 : cntr_(cntr), rd_(rd), key_(key), sz_(sz) {
94 template<
class F = concepts::Real>
103 inline Matrix(uint n, uint m, F* val,
bool row)
146 uint
n = 0, uint m = 0)
const;
155 uint
n = 0, uint m = 0)
const;
167 void mult_T(
const F* src, F* dst,
const uint s,
const uint t)
const;
173 inline uint
n()
const {
return n_;}
184 const F* sv = src.
source();
191 for(uint i = 0; i < dst.
nrow(); i++) {
193 for(uint j = 0; j < dst.
ncol(); j++) {
195 const F* svj = sv + j;
196 for(uint k = 0; k < src.
nrow(); k++) {
197 *dv += *svj * matrow[k]; svj += src.
ncol();
206 for(uint i = 0; i < dst.
ncol(); i++) {
207 for(uint j = 0; j < dst.
nrow(); j++) {
210 const F* svi = sv + i;
211 for(uint k = 0; k < src.
nrow(); k++) {
212 *dv += *svi * matrow[k]; svi += src.
ncol();
223 for(uint i = 0; i < dst.
nrow(); i++) {
225 for(uint j = 0; j < dst.
ncol(); j++) {
227 const F* svj = sv + j*src.
nrow();
228 for(uint k = 0; k < src.
nrow(); k++) {
229 *dv += *svj++ * matrow[k];
238 for(uint i = 0; i < dst.
ncol(); i++) {
239 for(uint j = 0; j < dst.
nrow(); j++) {
242 const F* svi = sv + i*src.
nrow();
243 for(uint k = 0; k < src.
nrow(); k++) {
244 *dv += *svi++ * matrow[k];
256 uint n, uint m)
const {
257 const F* sv = src.
source();
264 for(uint i = 0; i < dst.
nrow(); i++) {
265 for(uint j = 0; j < dst.
ncol(); j++) {
268 const F* svj = sv + j;
269 for(uint k = 0; k < src.
nrow(); k++) {
270 *dv += *svj * *matrow; svj += src.
ncol(); matrow +=
n_;
279 for(uint i = 0; i < dst.
ncol(); i++) {
280 for(uint j = 0; j < dst.
nrow(); j++) {
283 const F* svi = sv + i;
284 for(uint k = 0; k < src.
nrow(); k++) {
285 *dv += *svi * *matrow; svi += src.
ncol(); matrow +=
n_;
296 for(uint i = 0; i < dst.
nrow(); i++) {
297 for(uint j = 0; j < dst.
ncol(); j++) {
300 const F* svj = sv + j*src.
nrow();
301 for(uint k = 0; k < src.
nrow(); k++) {
302 *dv += *svj++ * *matrow; matrow +=
n_;
311 for(uint i = 0; i < dst.
ncol(); i++) {
312 for(uint j = 0; j < dst.
nrow(); j++) {
315 const F* svi = sv + i*src.
nrow();
316 for(uint k = 0; k < src.
nrow(); k++) {
317 *dv += *svi++ * *matrow; matrow +=
n_;
328 void M000::mult_T(
const F* src, F* dst,
const uint s,
const uint t)
const {
329 for(uint i = 0; i < t; i++) {
330 for(uint j = 0; j < s; j++) {
332 const F* sj = src + j;
334 for(uint k = 0; k <
n_; k++, mi +=
n_, sj += s) *dst += *sj * *mi;
345 template<
class F = concepts::Real>
394 std::ostream&
info(std::ostream& os)
const;
426 lnk_(0), chld_(chld), nelm_(nelm), gamma_(1), idx_(index_++) {
432 std::memcpy(
elm_, elm,
nelm_*
sizeof(elm[0]));
450 #endif //aglowav2Element_hh
uint nelm_
Number of elements in elm_.
Matrix class to convert an array to a matrix without copying.
const concepts::TIndex< F > * T_
Global degree of freedom.
An abstract class for an element of a space.
const concepts::Real & operator()(uint i, uint j) const
returns the matrix element
const concepts::TMatrixBase< F > & T() const
Global degree of freedom.
M000(const concepts::Real *m, uint n)
Constructor.
concepts::Real size() const
Size of the support.
Local transformation matrix (square matrix, row wise)
void replaceT(uint idx[], uint idxn)
Replace the T matrix (used for the sparsity pattern of the operator)
Key of a wavelet element.
Haar3d000 * lnk_
Wavelets on the same level.
Haar3d000 * chld_
Wavelets on the next finer level.
uint index() const
Index defined and used by some operators.
Abstract wavelet space element.
uint idx_
Index defined and used by some operators.
Matrix(uint n, uint m, F *val, bool row)
Constructor.
Haar3d000< F > * link() const
Elements on the same level.
virtual ~Haar3dXXX()
Destructor.
Key(uint l, uint j)
Constructor.
concepts::Real * m_
matrix entries
void mult(const Matrix< F > &src, Matrix< F > &dst, uint n=0, uint m=0) const
Multiplication of src with a part of to dst.
const bem::Constant3d002< F > * element(uint j) const
-th element of the wavelet
const bem::Constant3d002< F > ** elm_
Elements belonging to the support.
void mult_T(const Matrix< F > &src, Matrix< F > &dst, uint n=0, uint m=0) const
Multiplication of src with a part of to dst.
Haar3d000(const concepts::Real3d &cntr, concepts::Real rd, const concepts::Real *m, uint n, uint idx[], uint idxn, concepts::Real sz, Haar3d000< F > *chld, const bem::Constant3d002< F > **elm, uint nelm)
Constructor.
virtual Haar3dXXX< F > * link() const =0
elements on the same level
const concepts::Real3d & center() const
Center of the element.
Used for the aglowav2 classes for the boundary element method.
const Key & key() const
Key of the element.
Space element for the agglomerated wavelets.
Haar3d000< F > * child() const
Children.
Binary space element for the agglomerated wavelets.
std::ostream & info(std::ostream &os) const
Information about the element.
uint n() const
returns the matrix dimension
uint gamma() const
Multiplication of the number of children of the elements on the coarser levels (used to approxiamte t...
Haar3d000< F > *& link()
elements on the same level
virtual Haar3dXXX< F > * child() const =0
children of the element
An abstract class for a T matrix.
Constant triangular element with normed basis function.
concepts::Real radius() const
Radius of the element.
friend std::ostream & operator<<(std::ostream &os, const M000 &m)
M000 M_
Local transformation matrix.
uint nelement() const
Number of elements.
int operator==(const Key &k) const
int operator<(const Key &k) const
const M000 & trafoM() const
Local transformation matrix.
concepts::Real sz_
Support size of the element.
Haar3dXXX(const concepts::Real3d &cntr, concepts::Real rd, concepts::Real sz, const Key &key=Key())
Constructor.
double Real
Type normally used for a floating point number.
T matrix for linear and regular elements.
uint gamma_
Multiplication of the number of children of elements on coarser levels.