6#ifndef aglowavElement_hh
7#define aglowavElement_hh
39 virtual ~M() {
delete[] m_;}
47 void mult(
const F* src, F* dst)
const;
54 void mult_T(
const F* src, F* dst)
const;
56 uint
n()
const {
return d;}
58 virtual std::ostream&
info(std::ostream& os)
const;
67 for(uint i = 0; i < d-1; i++) os << m_[i] <<
", ";
77 for(i = 0; i < d; i++) A += m[i];
78 for(i = 0; i < d; i++) m_[i] = sqrt(m[i]/A);
85 dst[0] = m_[0]*src[0] - m_[1]*src[1];
86 dst[1] = m_[1]*src[0] + m_[0]*src[1];
91 inline void M<2>::mult_T<concepts::Real>(
const concepts::Real* src,
93 dst[0] = m_[0]*src[0] + m_[1]*src[1];
94 dst[1] = -m_[1]*src[0] + m_[0]*src[1];
103 template <
class F = concepts::Real, u
int d = 2>
112 Key(uint l, uint j) : l_(l), j_(j) {}
114 int operator==(
const Key&
key) {
115 return l_ ==
key.l() && j_ ==
key.j();
117 int operator<(
const Key&
key) {
118 return l_ <
key.l() || (l_ ==
key.l() && j_ <
key.j());
120 uint l()
const {
return l_;}
121 uint j()
const {
return j_;}
161 template <
class F = concepts::Real>
176 T_((
key.l()==0) ? 2 : 1, (
key.l()==0) ? 2 : 1, idx), lft_(lft),
181 return (!j) ? lft_ : (j == 1) ? rght_ : (
Haar3d000<F>*)0;
205 std::ostream&
info(std::ostream& os)
const;
220 return (!j && !lft_) ? nd_->child(0)->element() :
221 (j==1 && !rght_) ? nd_->child(1)->element() :
227 return (lft_) ? 0 : nd_->child(0)->element();
232 return (rght_) ? 0 : nd_->child(1)->element();
237 os <<
"aglowav::"<<
concepts::typeOf(*
this) <<
"(" << *nd_ <<
", key = (" << this->key().l();
238 os <<
',' << this->key().j() <<
"), " << T_ <<
", ";
239 return os << this->trafoM() <<
")";
concepts::Real radius() const
Radius of the element.
const bem::Constant3d001< F > * element(uint j) const
Returns the j-th leaf of the wavelet.
const bem::Constant3d001< F > * elmright() const
Return the right leaf of the wavelet.
Haar3d000< F > * right() const
Right child of the element.
std::ostream & info(std::ostream &os) const
Information about the element.
Haar3d000< F > * left() const
Left child of the element.
Haar3d000(const typename Haar3dXXX< F, 2 >::Key &key, const concepts::Real *m, const BiClNode00< F > *nd, uint idx[], Haar3d000< F > *lft=0, Haar3d000< F > *rght=0)
Haar3d000< F > * child(uint j) const
j-th child of the element
const bem::Constant3d001< F > * elmleft() const
Returns the left leaf of the wavelet.
const concepts::TMatrixBase< F > & T() const
Global degree of freedom.
const concepts::Real3d & center() const
Center of the element.
virtual concepts::Real radius() const =0
Radius of the element.
virtual const bem::Constant3d001< F > * element(uint j) const =0
Element of the wavelet (if leaf)
Haar3dXXX(const Haar3dXXX< F, d >::Key &key, const concepts::Real *m)
Constructor.
virtual Haar3dXXX< F, d > * child(uint j) const =0
j-th child of the element
virtual ~Haar3dXXX()
Destructor.
const M< d > & trafoM() const
Relation between the supports of parent and child.
virtual const concepts::Real3d & center() const =0
Center of the element.
Key key() const
Key of the element.
uint nchild() const
Maximal number of children.
uint n() const
returns the matrix dimension
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
void mult_T(const F *src, F *dst) const
void mult(const F *src, F *dst) const
M(const concepts::Real *m)
std::string typeOf(const T &t)