trafo.hh

Go to the documentation of this file.
1 
6 #ifndef aglowav2trafo_hh
7 #define aglowav2trafo_hh
8 
9 #ifdef __GUNG__
10 #pragma interface
11 #endif
12 
13 #include "aglowav2/space.hh"
14 #include "operator/compositions.hh"
15 #include "basics/output.hh"
16 
17 namespace aglowav2 {
18 
19  // ******************************************************************* C2W **
20 
24  template<class F = concepts::Real>
25  class C2W : public concepts::Operator<F> {
26  public:
28  C2W(const Haar3d0<F>& wavspc);
30  ~C2W() {delete[] leven_; delete[] lodd_;}
31 
36  concepts::Function<F>& fncW);
37  void operator()(const concepts::Vector<F>& fncC,
38  concepts::Vector<F>& fncW);
40  const Haar3d0<F>& spaceX() const {return wavspc_;}
41  const concepts::Space<F>& spaceY() const {return wavspc_.space();}
42 
43  protected:
45  std::ostream& info(std::ostream& os) const;
46 
47  private:
49 
51  F* leven_;
52  F* lodd_;
53  };
54 
55  template<class F>
56  C2W<F>::C2W(const Haar3d0<F>& wavspc)
57  : concepts::Operator<F>(wavspc.dim(), wavspc.space().dim())
58  , wavspc_(wavspc)
59  {
60  leven_ = new F[wavspc_.dim()];
61  lodd_ = new F[wavspc_.dim()];
62  }
63 
64  template<class F>
65  std::ostream& C2W<F>::info(std::ostream& os) const {
66  os << "aglowav2::" << concepts::typeOf(*this) << "(" << wavspc_.space() << " --> ";
67  return os << wavspc_ << ')';
68  }
69 
70  // ******************************************************************* W2C **
71 
75  template<class F = concepts::Real>
76  class W2C : public concepts::Operator<F> {
77  public:
79  W2C(const Haar3d0<F>& wavspc);
81  ~W2C() {delete[] ptrs_; delete[] data_; delete[] locdata_;}
82 
87  concepts::Function<F>& fncC);
88  void operator()(const concepts::Vector<F>& fncW,
89  concepts::Vector<F>& fncC);
91  const concepts::Space<F>& spaceX() const {return wavspc_.space();}
92  const Haar3d0<F>& spaceY() const {return wavspc_;}
93 
94  protected:
96  std::ostream& info(std::ostream& os) const;
97 
98  private:
100 
102  uint maxdim_;
104  uint nlvl_;
105 
107  F** ptrs_;
108  F* data_;
110  };
111 
112  template<class F>
113  W2C<F>::W2C(const Haar3d0<F>& wavspc)
114  : concepts::Operator<F>(wavspc.space().dim(), wavspc.dim())
115  , wavspc_(wavspc), maxdim_(wavspc_.maxLocDim()), nlvl_(wavspc_.nlvl() + 1)
116  {
117  ptrs_ = new F*[nlvl_];
118  data_ = new F[maxdim_ * nlvl_];
119  locdata_ = new F[maxdim_];
120  }
121 
122  template<class F>
123  std::ostream& W2C<F>::info(std::ostream& os) const {
124  os << "aglowav2::" <<concepts::typeOf(*this)<<"(" << wavspc_ << " --> ";
125  return os << wavspc_.space() << ')';
126  }
127 
128 } // namespace aglowav
129 
130 #endif // aglowav2trafo_hh
131 
F ** ptrs_
Auxiliary vectors.
Definition: trafo.hh:107
const Haar3d0< F > & wavspc_
Definition: trafo.hh:99
Abstract class for a space.
Abstract class for a function.
Definition: basis.hh:21
Agglomerated wavelet space.
Definition: space.hh:153
const Haar3d0< F > & spaceY() const
Definition: trafo.hh:92
Transformation operator from the constant one scale space to the agglomerated wavelet space (without ...
Definition: trafo.hh:25
F * leven_
Auxiliary vectors.
Definition: trafo.hh:51
uint nlvl_
Maximal level.
Definition: trafo.hh:104
const Haar3d0< F > & spaceX() const
Spaces of the transformation.
Definition: trafo.hh:40
std::ostream & info(std::ostream &os) const
Information about the operator.
Definition: trafo.hh:65
void operator()(const concepts::Vector< F > &fncC, concepts::Vector< F > &fncW)
Used for the aglowav2 classes for the boundary element method.
Definition: bform.hh:16
void operator()(const concepts::Vector< F > &fncW, concepts::Vector< F > &fncC)
std::ostream & info(std::ostream &os) const
Information about the operator.
Definition: trafo.hh:123
Abstract class for an operator.
Definition: ARPACK.hh:16
void operator()(const concepts::Function< F > &fncW, concepts::Function< F > &fncC)
Transformation from fncW to fncC.
void operator()(const concepts::Function< F > &fncC, concepts::Function< F > &fncW)
Transformation from fncC to fncW.
const Haar3d0< F > & wavspc_
Definition: trafo.hh:48
const concepts::Space< F > & spaceX() const
Spaces of the transformation.
Definition: trafo.hh:91
uint maxdim_
Maximal local dimension.
Definition: trafo.hh:102
Transformation operator from the agglomerated wavelet space to the constant one scale space (without ...
Definition: trafo.hh:76
F * lodd_
Definition: trafo.hh:52
F * locdata_
Definition: trafo.hh:109
~W2C()
Destructor.
Definition: trafo.hh:81
~C2W()
Destructor.
Definition: trafo.hh:30
C2W(const Haar3d0< F > &wavspc)
Constructor.
Definition: trafo.hh:56
std::string typeOf(const T &t)
Return the typeid name of a class object.
Definition: output.hh:43
const concepts::Space< F > & spaceY() const
Definition: trafo.hh:41
W2C(const Haar3d0< F > &wavspc)
Constructor.
Definition: trafo.hh:113
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich