00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _FRAMETL_AGGREGATED_FRAME_H
00011 #define _FRAMETL_AGGREGATED_FRAME_H
00012
00013 #include <list>
00014
00015 #include <geometry/chart.h>
00016 #include <cube/mapped_cube_basis.h>
00017 #include <geometry/atlas.h>
00018 #include <utils/fixed_array1d.h>
00019 #include <utils/array1d.h>
00020 #include <frame_index.h>
00021 #include <frame_support.h>
00022
00023 using std::list;
00024
00025 using WaveletTL::MappedCubeBasis;
00026 using MathTL::Atlas;
00027 using MathTL::Array1D;
00028 using MathTL::FixedArray1D;
00029
00030
00031
00032 namespace FrameTL
00033 {
00034
00035 template<class IBASIS, unsigned int DIM_d, unsigned int DIM_m>
00036 class FrameIndex;
00037
00059 template<class IBASIS, unsigned int DIM_d, unsigned int DIM_m = DIM_d>
00060 class AggregatedFrame
00061 {
00062 public:
00063
00067 ~AggregatedFrame();
00068
00085 AggregatedFrame(const Atlas<DIM_d, DIM_m>* a,
00086 const Array1D<FixedArray1D<int,2*DIM_d> >& bc,
00087 const Array1D<FixedArray1D<int,2*DIM_d> >& bcT,
00088 const int jmax);
00089
00094 AggregatedFrame(const Atlas<DIM_d, DIM_m>*,
00095 const Array1D<FixedArray1D<int,2*DIM_d> >&,
00096 const int);
00097
00101 typedef FrameIndex<IBASIS, DIM_d, DIM_m> Index;
00102
00103
00107 typedef IBASIS IntervalBasis;
00108
00109
00113 const Array1D<MappedCubeBasis<IBASIS, DIM_d, DIM_m>* > bases() const
00114 {
00115 return lifted_bases;
00116 }
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00139 typedef struct {
00140 int j;
00141 Point<DIM_d> a;
00142 Point<DIM_d> b;
00143 } Support;
00144
00145
00149 const int j0() const { return j0_; }
00150
00154 const int n_p() const { return lifted_bases.size(); }
00155
00159 const Atlas<DIM_d, DIM_m>* atlas() const { return atlas_; }
00160
00166 const Array1D<Array1D<Index> >* get_full_collection_levelwise() const { return &full_collection_levelwise; }
00167
00173 const Array1D<Index>* get_full_collection() const { return &full_collection; }
00174
00178 static double primal_regularity() { return IBASIS::primal_regularity(); }
00179
00183 static unsigned int primal_vanishing_moments() { return IBASIS::primal_vanishing_moments(); }
00184
00188 static unsigned int dual_vanishing_moments() { return IBASIS::dual_vanishing_moments(); }
00189
00190
00197 const inline Index* get_wavelet (const int number) const {
00198 return &full_collection[number];
00199 }
00200
00204 void set_jmax(const int jmax) { jmax_ = jmax; }
00205
00207 const int degrees_of_freedom() const { return full_collection.size(); };
00208
00212 double evaluate(const Index& lambda, const Point<DIM_m>& x) const;
00213
00217 void evaluate_gradient(const Index& lambda, const Point<DIM_d>& x, Vector<double>& values) const;
00218
00219
00221 Index first_generator(const int j) const;
00222
00224 Index last_generator(const int j) const;
00225
00227 Index first_wavelet(const int j) const;
00228
00230 Index last_wavelet(const int j) const;
00231
00232
00238 Array1D<typename WaveletTL::CubeBasis<IBASIS,DIM_d>::Support> all_supports;
00239
00244 Array1D<Support> all_patch_supports;
00245
00246
00247 protected:
00249 const Atlas<DIM_d, DIM_m>* atlas_;
00250
00252 Array1D<FixedArray1D<int,2*DIM_d> > bc_;
00253
00255 Array1D<FixedArray1D<int,2*DIM_d> > bcT_;
00256
00262 Array1D<Array1D<Index> > full_collection_levelwise;
00263
00265 Array1D<Index> full_collection;
00266
00267 private:
00271 Array1D<MappedCubeBasis<IBASIS, DIM_d, DIM_m>* > lifted_bases;
00272
00273
00275 int j0_;
00276
00278 int jmax_;
00279
00280
00281 };
00282
00286 template <class IBASIS, unsigned int DIM_d, unsigned int DIM_m>
00287 std::ostream& operator << (std::ostream&,
00288 const AggregatedFrame<IBASIS, DIM_d, DIM_m>&);
00289
00290 }
00291
00292 #include "aggregated_frame.cpp"
00293
00294 #endif