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

app-cwinkelm/bilinearForm.hh
Go to the documentation of this file.
00001 // Bilinear forms for linear DG FEM in 2D
00002 
00003 #ifndef linDG2DelasticBilinearForm_hh
00004 #define linDG2DelasticBilinearForm_hh
00005 
00006 #include "basics/typedefs.hh"
00007 #include "operator/bilinearForm.hh"
00008 #include "geometry/boundaryConditions.hh"
00009 
00010 using concepts::Real;
00011 
00012 // ******************************************************** DGElasticVolBf2d **
00013 
00019 class DGElasticVolBf2d : public concepts::BilinearForm<Real> {
00020 public:
00024   DGElasticVolBf2d(const concepts::Mapping<Real, 2> m) 
00025     : submapping_(m) { }
00027   virtual void operator()(const concepts::Element<Real>& elmV,
00028                           const concepts::Element<Real>& elmU,
00029                           concepts::ElementMatrix<Real>& em);
00030   virtual DGElasticVolBf2d* clone() const {
00031     return new DGElasticVolBf2d(submapping_); }
00032 private:
00034   const concepts::Mapping<Real, 2> submapping_;
00035 };
00036 
00037 // ******************************************************* DGElasticFluxBf2d **
00038 
00044 class DGElasticFluxBf2d : public concepts::BilinearForm<Real> {
00045 public:
00050   DGElasticFluxBf2d(const concepts::Mapping<Real, 2> m,
00051                     concepts::BoundaryConditions* bc) 
00052     : bc_(bc), submapping_(m) { }
00054   virtual void operator()(const concepts::Element<Real>& elmV,
00055                           const concepts::Element<Real>& elmU,
00056                           concepts::ElementMatrix<Real>& em) {
00057     conceptsAssert(false, concepts::Assertion());
00058   }
00060   virtual void operator()(const concepts::Element<Real>& elmV,
00061                           const concepts::Element<Real>& elmU,
00062                           concepts::ElementMatrix<Real>& em,
00063                           const concepts::ElementPair<Real>& ep);
00064   virtual DGElasticFluxBf2d* clone() const {
00065     return new DGElasticFluxBf2d(submapping_, bc_); }
00066 private:
00068   concepts::BoundaryConditions* bc_;
00070   const concepts::Mapping<Real, 2> submapping_;
00071 };
00072 
00073 // ******************************************************* DGElasticStabBf2d **
00074 
00081 class DGElasticStabBf2d : public concepts::BilinearForm<Real> {
00082 public:
00087   DGElasticStabBf2d(Real omega, concepts::BoundaryConditions* bc)
00088     : omega_(omega), bc_(bc) {}
00090   virtual void operator()(const concepts::Element<Real>& elmV,
00091                           const concepts::Element<Real>& elmU,
00092                           concepts::ElementMatrix<Real>& em) {
00093     conceptsAssert(false, concepts::Assertion());
00094   }
00096   virtual void operator()(const concepts::Element<Real>& elmV,
00097                           const concepts::Element<Real>& elmU,
00098                           concepts::ElementMatrix<Real>& em,
00099                           const concepts::ElementPair<Real>& ep);
00100   virtual DGElasticStabBf2d* clone() const {
00101     return new DGElasticStabBf2d(omega_, bc_); }
00102 private:
00104   const Real omega_;
00106   concepts::BoundaryConditions* bc_;
00107 };
00108 
00109 // ************************************************* DGElasticNormalStabBf2d **
00110 
00118 class DGElasticNormalStabBf2d : public concepts::BilinearForm<Real> {
00119 public:
00126   DGElasticNormalStabBf2d(const Real omega, const uint dV,
00127                           const uint dU, concepts::BoundaryConditions* bc)
00128     : omega_(omega), dV_(dV), dU_(dU), bc_(bc) { }
00130   virtual void operator()(const concepts::Element<Real>& elmV,
00131                           const concepts::Element<Real>& elmU,
00132                           concepts::ElementMatrix<Real>& em) {
00133     conceptsAssert(false, concepts::Assertion());
00134   }
00136   virtual void operator()(const concepts::Element<Real>& elmV,
00137                           const concepts::Element<Real>& elmU,
00138                           concepts::ElementMatrix<Real>& em,
00139                           const concepts::ElementPair<Real>& ep);
00140   virtual DGElasticNormalStabBf2d* clone() const {
00141     return new DGElasticNormalStabBf2d(omega_, dV_, dU_, bc_); }
00142 private:
00144   const Real omega_;
00146   const uint dV_;
00148   const uint dU_;
00150   concepts::BoundaryConditions* bc_;
00151 };
00152 
00153 // ***************************************************** DGElasticDivVolBf2d **
00154 
00160 class DGElasticDivVolBf2d : public concepts::BilinearForm<Real> {
00161 public:
00166   DGElasticDivVolBf2d(const uint dV, Real scale = 1.0)
00167     : dV_(dV), scale_(scale) { }
00172   virtual void operator()(const concepts::Element<Real>& elmV,
00173                           const concepts::Element<Real>& elmP,
00174                           concepts::ElementMatrix<Real>& em) {
00175     conceptsAssert(false, concepts::Assertion());
00176   }
00178   virtual void operator()(const concepts::Element<Real>& elmV,
00179                           const concepts::Element<Real>& elmP,
00180                           concepts::ElementMatrix<Real>& em,
00181                           const concepts::ElementPair<Real>& ep);
00182   virtual DGElasticDivVolBf2d* clone() const {
00183     return new DGElasticDivVolBf2d(dV_, scale_); }
00184 private:
00186   const uint dV_;
00188   const Real scale_;
00189 };
00190 
00191 // **************************************************** DGElasticDivFluxBf2d **
00192 
00198 class DGElasticDivFluxBf2d : public concepts::BilinearForm<Real> {
00199 public:
00205   DGElasticDivFluxBf2d(const uint dV, concepts::BoundaryConditions* bc,
00206                        Real scale = 1.0)
00207     : dV_(dV), bc_(bc) , scale_(scale) { }
00209   virtual void operator()(const concepts::Element<Real>& elmV,
00210                           const concepts::Element<Real>& elmP,
00211                           concepts::ElementMatrix<Real>& em) {
00212     conceptsAssert(false, concepts::Assertion());
00213   }
00215   virtual void operator()(const concepts::Element<Real>& elmV,
00216                           const concepts::Element<Real>& elmP,
00217                           concepts::ElementMatrix<Real>& em,
00218                           const concepts::ElementPair<Real>& ep);
00219   virtual DGElasticDivFluxBf2d* clone() const {
00220     return new DGElasticDivFluxBf2d(dV_, bc_, scale_); }
00221 private:
00223   const uint dV_;
00225   concepts::BoundaryConditions* bc_;
00227   const Real scale_;
00228 };
00229 
00230 // ******************************************************* DGElasticCompBf2d **
00231 
00237 class DGElasticCompBf2d : public concepts::BilinearForm<Real> {
00238 public:
00242   DGElasticCompBf2d(Real lambda) : lambda_(lambda) { }
00244   virtual void operator()(const concepts::Element<Real>& elmQ,
00245                           const concepts::Element<Real>& elmP,
00246                           concepts::ElementMatrix<Real>& em);
00247   virtual DGElasticCompBf2d* clone() const {
00248     return new DGElasticCompBf2d(lambda_); }
00249 private:
00250   Real lambda_;
00251 };
00252 
00253 #endif // linDG2DelasticBilinearForm_hh

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