Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

aglowav2/bform.hh
Go to the documentation of this file.
00001 /* Bilinear form for the agglomerated wavelets.
00002  */
00003 
00004 #ifndef aglowav2bform_hh
00005 #define aglowav2bform_hh
00006 
00007 #ifdef __GUNG__
00008 #pragma interface
00009 #endif
00010 
00011 #include "operator/bilinearForm.hh"
00012 #include "aglowav2/xfy.hh"
00013 
00014 namespace aglowav2 {
00015 
00016   // *********************************************************** AglowavBF00 **
00017 
00026   template<class F = concepts::Real>
00027   class AglowavBF00 : public concepts::BilinearForm<F> {
00028   private:
00030     typedef struct Nfld {
00032       struct Nfld*        lnk;
00034       const Haar3d000<F>* elm;
00036       F*                  valXY;
00038       F*                  valYX;
00039     } Nfld;
00040 
00042     struct Cell {
00043       F* mtsttrl;
00044       F* mtrltst;
00045 
00046       const Haar3d000<F>* elm;
00047 
00048       Cell() : mtsttrl(0), mtrltst(0), elm(0) {}
00049     };
00050 
00051     virtual AglowavBF00* clone() const { return new AglowavBF00(bf_, XFY_); }
00052   public:
00058     AglowavBF00(concepts::BilinearForm<F>& bf, F00<F>& XFY);
00059     ~AglowavBF00();
00060 
00061     void operator()(const concepts::Element<F>& elmX,
00062         const concepts::Element<F>& elmY,
00063         concepts::ElementMatrix<F>& em);
00064     void operator()(const Haar3d000<F>& elmX, const Haar3d000<F>& elmY,
00065         concepts::ElementMatrix<F>& em);
00066 
00067     uint memory() const {return mem_;}
00068 
00069   private:
00079     void nearfield_(const Haar3d000<F>& elmX, const Haar3d000<F>& elmY,
00080         F* valXY, uint ldXY, F* valYX, uint ldYX);
00081 
00091     void updateChld_(const Haar3d000<F>& tst, const Haar3d000<F>& trl,
00092          F* valtsttrl, uint ldtsttrl, F* valtrltst, uint ldtrltst);
00093 
00103     void updateElm_(const Haar3d000<F>& tst, const Haar3d000<F>& trl,
00104         F* valtsttrl, uint ldtsttrl, F* valtrltst, uint ldtrltst);
00105 
00107     concepts::BilinearForm<F>& bf_;
00109     F00<F>& XFY_;
00111     Nfld** nfld_;
00113     uint mem_;
00114 
00118     Nfld*** nfldLast_;
00119 
00121     F* valXY_;
00122     F* vXY_;
00123     F* valYX_;
00124     F* vYX_;
00125     F* foo_;
00126 
00128     Cell* cache_;
00130     Cell* buf_;
00132     bool reuse_;
00133   };
00134 
00135   // *********************************************************** WavIdentity **
00136 
00140   template<class F = concepts::Real>
00141   class WavIdentity : public concepts::BilinearForm<F> {
00142   public:
00143     void operator()(const concepts::Element<F>& elmX,
00144         const concepts::Element<F>& elmY,
00145         concepts::ElementMatrix<F>& em);
00146     void operator()(const Haar3d000<F>& elmX, const Haar3d000<F>& elmY,
00147         concepts::ElementMatrix<F>& em);
00148     virtual WavIdentity* clone() const { return new WavIdentity(); }
00149   };
00150 
00151 } // namespace aglowav2
00152 
00153 #endif // aglowav2bform_hh

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)