]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix test of exception in FE_Q at degree 0 2563/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 28 Apr 2016 21:09:57 +0000 (23:09 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 28 Apr 2016 21:09:57 +0000 (23:09 +0200)
source/fe/fe_q.cc
source/fe/fe_q_base.cc
tests/fe/fe_q_01.output

index 343d5f58397d9f96340cdf24af6cfecfe55721fd..b1ad9218e5c73acda0c82af443ce0e9868197904 100644 (file)
@@ -25,7 +25,6 @@ DEAL_II_NAMESPACE_OPEN
 
 namespace
 {
-  template <int dim, int spacedim>
   std::vector<Point<1> >
   get_QGaussLobatto_points (const unsigned int degree)
   {
@@ -33,7 +32,7 @@ namespace
       return QGaussLobatto<1>(degree+1).get_points();
     else
       {
-        typedef FE_Q_Base<TensorProductPolynomials<dim>, dim, spacedim> FEQ;
+        typedef FE_Q_Base<TensorProductPolynomials<1>, 1, 1> FEQ;
         AssertThrow(false, typename FEQ::ExcFEQCannotHaveDegree0());
       }
     return std::vector<Point<1> >();
@@ -46,13 +45,13 @@ template <int dim, int spacedim>
 FE_Q<dim,spacedim>::FE_Q (const unsigned int degree)
   :
   FE_Q_Base<TensorProductPolynomials<dim>, dim, spacedim>
-  (TensorProductPolynomials<dim>(Polynomials::generate_complete_Lagrange_basis(get_QGaussLobatto_points<dim,spacedim>(degree))),
+  (TensorProductPolynomials<dim>(Polynomials::generate_complete_Lagrange_basis(get_QGaussLobatto_points(degree))),
    FiniteElementData<dim>(this->get_dpo_vector(degree),
                           1, degree,
                           FiniteElementData<dim>::H1),
    std::vector<bool> (1, false))
 {
-  this->initialize(get_QGaussLobatto_points<dim,spacedim>(degree));
+  this->initialize(get_QGaussLobatto_points(degree));
 }
 
 
index dcb28803f227ded9d8eec8e9aff45d52b974d722..f8f9e641947a881e10155730768bed6020401168 100644 (file)
@@ -1120,7 +1120,8 @@ template <class PolynomialType, int dim, int spacedim>
 std::vector<unsigned int>
 FE_Q_Base<PolynomialType,dim,spacedim>::get_dpo_vector(const unsigned int degree)
 {
-  AssertThrow(degree>0, ExcFEQCannotHaveDegree0());
+  typedef FE_Q_Base<PolynomialType,dim,spacedim> FEQ;
+  AssertThrow(degree>0, typename FEQ::ExcFEQCannotHaveDegree0());
   std::vector<unsigned int> dpo(dim+1, 1U);
   for (unsigned int i=1; i<dpo.size(); ++i)
     dpo[i]=dpo[i-1]*(degree-1);
index 158d3d7463c8f210b019a2c578ad4e337ed5d971..e6fb08a7c4872eed691c6d3d287df6bcf29eb65d 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL::ExcFEQCannotHaveDegree0()
+DEAL::typename FEQ::ExcFEQCannotHaveDegree0()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.