]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix fe_field_function_03 5629/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 15 Dec 2017 16:17:58 +0000 (17:17 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 15 Dec 2017 16:21:21 +0000 (17:21 +0100)
include/deal.II/numerics/fe_field_function.templates.h
tests/mpi/fe_field_function_03.cc

index e26d997d1ef4c6928c13a973faafb4cc8f1fbc37..0071ed6ba5d0a48b93b0cf6627ae6f39fbb2d52b 100644 (file)
@@ -283,6 +283,8 @@ namespace Functions
     // Now gather all the informations we need
     for (unsigned int i=0; i<n_cells; ++i)
       {
+        AssertThrow (!cells[i]->is_artificial(),
+                     VectorTools::ExcPointNotAvailableHere());
         fe_v.reinit(cells[i], i, 0);
         const unsigned int nq = qpoints[i].size();
         std::vector< Vector<typename VectorType::value_type> > vvalues (nq, Vector<typename VectorType::value_type>(this->n_components));
@@ -344,6 +346,8 @@ namespace Functions
     // Now gather all the informations we need
     for (unsigned int i=0; i<n_cells; ++i)
       {
+        AssertThrow (!cells[i]->is_artificial(),
+                     VectorTools::ExcPointNotAvailableHere());
         fe_v.reinit(cells[i], i, 0);
         const unsigned int nq = qpoints[i].size();
         std::vector< std::vector<Tensor<1,dim,typename VectorType::value_type> > >
@@ -409,6 +413,8 @@ namespace Functions
     // Now gather all the informations we need
     for (unsigned int i=0; i<n_cells; ++i)
       {
+        AssertThrow (!cells[i]->is_artificial(),
+                     VectorTools::ExcPointNotAvailableHere());
         fe_v.reinit(cells[i], i, 0);
         const unsigned int nq = qpoints[i].size();
         std::vector< Vector<typename VectorType::value_type> > vvalues (nq, Vector<typename VectorType::value_type>(this->n_components));
index bf4bd61c3969262febc7dbef83b85ede027d532f..1c8a5a019553ea9693dcddde1259c2121d5a6a68 100644 (file)
@@ -188,6 +188,10 @@ void test()
         {
           deallog << "  ExcPointNotAvailableHere" << std::endl;
         }
+      catch (std::exception &exc)
+        {
+          deallog << exc.what() << std::endl;
+        }
       catch (...)
         {
           deallog << "  Oh no! Some other error that we shouldn't get." << std::endl;

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.