Class documentation of Concepts

Loading...
Searching...
No Matches
xfy.hh
Go to the documentation of this file.
1
6#ifndef aglowav2xy_hh
7#define aglowav2xy_hh
8
10#include "aglowav2/space.hh"
11
12namespace aglowav2 {
13
14 // ****************************************************************** XY00 **
15
19 template<class F = concepts::Real>
20 class XY00 {
21 public:
29 XY00(const Haar3d0<F>& spc, const cluster::ExpansionXY<F>& exp,
30 const cluster::ExpansionXY<F>* shftExp = 0);
32 virtual ~XY00();
33
34 inline const Haar3d0<F>& space() const {return spc_;}
36 cluster::XYColExpPtr* operator[](uint i) const {return elmptr_[i];}
38 inline uint memory() const;
39
40 private:
47 void constructor_(cluster::XYColReal* xy,
48 const cluster::ExpansionXY<F>* shftExp);
49
50 protected:
53
54 private:
56 const Haar3d0<F>& spc_;
58 cluster::XYColExpPtr** elmptr_;
61 };
62
63 template<class F>
65 for(uint i = 0; i < spc_.nelm(); i++) delete elmptr_[i];
66 delete[] elmptr_;
67 delete xy_;
68 }
69
70 template<class F>
71 uint XY00<F>::memory() const {
72 return sizeof(XY00<F>) + spc_.nelm()*sizeof(elmptr_[0]) + xy_->memory();
73 }
74
75 // ******************************************************************* Y00 **
76
80 template<class F = concepts::Real>
81 class Y00 : private XY00<F> {
82 public:
87 inline Y00(const cluster::ExpansionXY<F>& exp, const Haar3d0<F>& spc);
88
90 inline const Haar3d0<F>& space() const {return XY00<F>::space();}
92 inline cluster::XYColExpPtr* operator[](uint i) const;
94 inline uint memory() const {return XY00<F>::memory();}
95 };
96
97 template<class F>
99 : XY00<F>(spc, exp, 0) {}
100
101 template<class F>
103 return XY00<F>::operator[](i);
104 }
105
106 // ******************************************************************* X00 **
107
111 template<class F = concepts::Real>
112 class X00 : protected XY00<F> {
113 public:
119 inline X00(const cluster::ExpansionXY<F>& exp,
120 const cluster::ExpansionXY<F>& shftExp, const Haar3d0<F>& spc);
121
123 inline const Haar3d0<F>& space() const {return XY00<F>::space();}
125 inline cluster::XYColExpPtr* operator[](uint i) const;
127 inline uint memory() const {return XY00<F>::memory();}
129 inline void apply(cluster::XYColExpPtr* x, const F* src, F* dst) const;
130 };
131
132 template<class F>
134 const cluster::ExpansionXY<F>& shftExp, const Haar3d0<F>& spc)
135 : XY00<F>(spc, exp, &shftExp) {}
136
137 template<class F>
139 return XY00<F>::operator[](i);
140 }
141
142 template<class F>
143 void X00<F>::apply(cluster::XYColExpPtr* x, const F* src, F* dst) const {
144 this->exp_.apply(x, src, dst);
145 }
146
147 // ******************************************************************* F00 **
148
152 template<class F = concepts::Real>
153 class F00 {
154 public:
161 F00(const X00<F>& X, const Y00<F>& Y, const cluster::ExpansionF<F>& exp,
162 concepts::Real eta);
164 ~F00() {delete foo_; delete[] fee_;}
165
166 inline const Haar3d0<F>& space() const {return X_.space();}
168 inline bool admissible(const Haar3dXXX<F>& elmX,
169 const Haar3dXXX<F>& elmY);
179 void operator()(uint idxX, uint idxY, F* valXY,
180 uint dx, uint dy, uint nx, uint ny);
191 void operator()(uint idxX, uint idxY, F* valXY, F* valYX, uint dx, uint dy,
192 uint nx, uint ny);
193
194 private:
195 const X00<F>& X_;
196 const Y00<F>& Y_;
197 const cluster::ExpansionF<F>& exp_;
199 uint m_;
201 concepts::Real eta_;
202
204 F* fee_;
205 cluster::FColExp* foo_;
208 };
209
210 template<class F>
211 F00<F>::F00(const X00<F>& X, const Y00<F>& Y,
213 : X_(X), Y_(Y), exp_(exp), m_(exp.m()), eta_(eta) {
214
215 if (&X_.space() != &Y_.space())
217 MissingFeature("Different spaces not supported"));
218
219 fee_ = new F[exp.blksz(m_)];
220 foo_ = exp.getCol(exp.blksz(m_));
221 }
222
223 template<class F>
225 const Haar3dXXX<F>& elmY) {
226 z_ = elmY.center();
227 z_ -= elmX.center();
228 return (elmX.radius() + elmY.radius() < eta_*z_.l2());
229 }
230
231} // namespace aglowav2
232
233#endif // aglowav2xy_hh
#define conceptsException(exc)
void operator()(uint idxX, uint idxY, F *valXY, F *valYX, uint dx, uint dy, uint nx, uint ny)
bool admissible(const Haar3dXXX< F > &elmX, const Haar3dXXX< F > &elmY)
Admissibility condition (true if elmX and elmY in the far field)
Definition xfy.hh:224
F00(const X00< F > &X, const Y00< F > &Y, const cluster::ExpansionF< F > &exp, concepts::Real eta)
Definition xfy.hh:211
void operator()(uint idxX, uint idxY, F *valXY, uint dx, uint dy, uint nx, uint ny)
~F00()
destructor
Definition xfy.hh:164
concepts::Real radius() const
Radius of the element.
Definition element.hh:66
const concepts::Real3d & center() const
Center of the element.
Definition element.hh:64
uint memory() const
Memory used.
Definition xfy.hh:127
X00(const cluster::ExpansionXY< F > &exp, const cluster::ExpansionXY< F > &shftExp, const Haar3d0< F > &spc)
Definition xfy.hh:133
cluster::XYColExpPtr * operator[](uint i) const
Pointer to the far field values of element i.
Definition xfy.hh:138
const Haar3d0< F > & space() const
Agglomerated wavelet space.
Definition xfy.hh:123
void apply(cluster::XYColExpPtr *x, const F *src, F *dst) const
Application of the expansion.
Definition xfy.hh:143
XY00(const Haar3d0< F > &spc, const cluster::ExpansionXY< F > &exp, const cluster::ExpansionXY< F > *shftExp=0)
virtual ~XY00()
Destructor.
Definition xfy.hh:64
const cluster::ExpansionXY< F > & exp_
Expansion used for evaluation and application.
Definition xfy.hh:52
cluster::XYColExpPtr * operator[](uint i) const
Pointer to the far field values of element i.
Definition xfy.hh:36
uint memory() const
Memory used.
Definition xfy.hh:71
Y00(const cluster::ExpansionXY< F > &exp, const Haar3d0< F > &spc)
Definition xfy.hh:98
cluster::XYColExpPtr * operator[](uint i) const
Pointer to the far field values of element i.
Definition xfy.hh:102
uint memory() const
Memory used.
Definition xfy.hh:94
const Haar3d0< F > & space() const
Agglomerated wavelet space.
Definition xfy.hh:90
virtual uint blksz(uint m) const =0
virtual FColExp * getCol(uint blksz) const =0
double Real
Definition typedefs.hh:39