]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Check that at least a single thread is going to run
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 31 Jul 2006 21:24:54 +0000 (21:24 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 31 Jul 2006 21:24:54 +0000 (21:24 +0000)
git-svn-id: https://svn.dealii.org/trunk@13551 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/numerics/data_out.cc
deal.II/deal.II/source/numerics/data_out_faces.cc
deal.II/deal.II/source/numerics/data_out_rotation.cc
deal.II/doc/news/changes.html

index 1620a513cded50295c46541a305dbed71c97d991..657904c23734a24979ed849045cf5f2854547adc 100644 (file)
@@ -557,7 +557,8 @@ template <int dim, class DH>
 void DataOut<dim,DH>::build_patches (const unsigned int n_subdivisions,
                                     const unsigned int n_threads_) 
 {
-  build_patches (StaticMappingQ1<DH::dimension>::mapping, n_subdivisions, n_threads_);
+  build_patches (StaticMappingQ1<DH::dimension>::mapping,
+                n_subdivisions, n_threads_);
 }
 
 
@@ -576,6 +577,9 @@ void DataOut<dim,DH>::build_patches (const Mapping<DH::dimension> &mapping,
   typedef DataOut_DoFData<DH, DH::dimension> BaseClass;
   Assert (this->dofs != 0, typename BaseClass::ExcNoDoFHandlerSelected());
 
+  Assert (!DEAL_II_USE_MT || (n_threads_ >= 1),
+         ExcMessage ("Must run with at least one thread!"));
+  
   const unsigned int n_threads = (DEAL_II_USE_MT ? n_threads_ : 1);
 
                                   // before we start the loop:
index 1b85abb56b7e7f2392b68616aa82e1877f7db3f5..7db06d6390c390b4e631494b48920c19730fd7a5 100644 (file)
@@ -163,6 +163,8 @@ void DataOutFaces<dim,DH>::build_patches (const unsigned int nnnn_subdivisions,
   typedef DataOut_DoFData<DH,DH::dimension+1> BaseClass;
   Assert (this->dofs != 0, typename BaseClass::ExcNoDoFHandlerSelected());
 
+  Assert (!DEAL_II_USE_MT || (n_threads_ >= 1),
+         ExcMessage ("Must run with at least one thread!"));
   const unsigned int n_threads = (DEAL_II_USE_MT ? n_threads_ : 1);
 
                                   // before we start the loop:
index aec4a9626f776204972bcf91b806312bc63ef9cc..8b375a3658d48aabd5faac80af1022e2feba7e67 100644 (file)
@@ -336,6 +336,8 @@ void DataOutRotation<dim,DH>::build_patches (
   typedef DataOut_DoFData<DH,DH::dimension+1> BaseClass;
   Assert (this->dofs != 0, typename BaseClass::ExcNoDoFHandlerSelected());
 
+  Assert (!DEAL_II_USE_MT || (n_threads_ >= 1),
+         ExcMessage ("Must run with at least one thread!"));
   const unsigned int n_threads = (DEAL_II_USE_MT ? n_threads_ : 1);
 
                                   // before we start the loop:
index 1d98958f8b982f346e18916ffd452c3f40b4459a..a0fa92c332f69d8ad19e0b5a90ec7c6f1e6476e6 100644 (file)
@@ -741,6 +741,17 @@ inconvenience this causes.
 <h3>deal.II</h3>
 
 <ol>
+  <li> <p>
+       Fixed: The <code 
+                class="member">DataOut::build_patches</code> and similar
+       functions in the related <code>DataOut*</code> classes allowed to pass
+       zero as the second argument (denoting the number of threads to use if
+       multithreading is enabled). This led to no output being created at
+       all. This is now fixed by throwing an exception in this case.
+       <br> 
+       (WB 2006/07/31)
+       </p>
+
   <li> <p>
        New: The new function <code class="class">FiniteElementBase</code>::<code
        class="member">n_dofs_per_object</code> returns either

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.