]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Do not instantiate stuff for dim=4. This has been an old wart, and one we need not...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 24 Sep 2013 02:41:13 +0000 (02:41 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 24 Sep 2013 02:41:13 +0000 (02:41 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30904 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/base/CMakeLists.txt
deal.II/source/base/data_out_base.cc
deal.II/source/base/data_out_base.inst.in [new file with mode: 0644]
deal.II/source/numerics/data_out_dof_data.inst.in
deal.II/source/numerics/data_out_rotation.inst.in
deal.II/source/numerics/data_out_stack.inst.in

index 892456ad8922e8301af412a629e85dfe703cfc08..ab491a5e57e1aa7556f93a1f8e55df86c4747ccc 100644 (file)
@@ -66,10 +66,15 @@ SET(_src
   utilities.cc
   )
 
+SET(_inst
+  data_out_base.inst.in
+  )
+
 FILE(GLOB _header
   ${CMAKE_SOURCE_DIR}/include/deal.II/base/*.h
   )
 
-DEAL_II_ADD_LIBRARY(obj_base OBJECT ${_src} ${_header}
+DEAL_II_ADD_LIBRARY(obj_base OBJECT ${_src} ${_header} ${_inst}
   ${CMAKE_BINARY_DIR}/include/deal.II/base/config.h
   )
+EXPAND_INSTANTIATIONS(obj_base "${_inst}")
index edb10d95e5ba436f012d162f7f3a57ddb9f32136..498b9136cd17740c305143277afd101b575c75fe 100644 (file)
@@ -5935,7 +5935,7 @@ void DataOutBase::write_svg (const std::vector<Patch<dim,spacedim> > &patches,
             }
         }
     }
-  
+
 
 // write the svg file
   if (width==0)
@@ -7894,28 +7894,6 @@ operator >> (std::istream                     &in,
 
 
 // explicit instantiations
-#define INSTANTIATE(dim,spacedim) \
-  template class DataOutInterface<dim,spacedim>;                \
-  template class DataOutReader<dim,spacedim>;                   \
-  template struct DataOutBase::Patch<dim,spacedim>;              \
-  template                                                      \
-  std::ostream &                                                \
-  operator << (std::ostream                           &out,     \
-               const DataOutBase::Patch<dim,spacedim> &patch);  \
-  template                                                      \
-  std::istream &                                                \
-  operator >> (std::istream                     &in,            \
-               DataOutBase::Patch<dim,spacedim> &patch)
-
-INSTANTIATE(1,1);
-INSTANTIATE(2,2);
-INSTANTIATE(3,3);
-INSTANTIATE(4,4);
-INSTANTIATE(1,2);
-INSTANTIATE(1,3);
-INSTANTIATE(2,3);
-INSTANTIATE(3,4);
-
-#undef INSTANTIATE
+#include "data_out_base.inst"
 
 DEAL_II_NAMESPACE_CLOSE
diff --git a/deal.II/source/base/data_out_base.inst.in b/deal.II/source/base/data_out_base.inst.in
new file mode 100644 (file)
index 0000000..e9a094d
--- /dev/null
@@ -0,0 +1,35 @@
+// ---------------------------------------------------------------------
+// $Id$
+//
+// Copyright (C) 2013 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS)
+{
+#if deal_II_dimension <= deal_II_space_dimension
+  template class DataOutInterface<deal_II_dimension, deal_II_space_dimension>;
+  template class DataOutReader<deal_II_dimension, deal_II_space_dimension>;
+  template struct DataOutBase::Patch<deal_II_dimension, deal_II_space_dimension>;
+
+  template
+  std::ostream &
+  operator << (std::ostream                           &out,
+               const DataOutBase::Patch<deal_II_dimension, deal_II_space_dimension> &patch);
+
+  template
+  std::istream &
+  operator >> (std::istream                     &in,
+               DataOutBase::Patch<deal_II_dimension, deal_II_space_dimension> &patch);
+#endif
+}
index 08ee60879bbce8aabd7028bc81be701f7603b2d4..ea420b3519074833d292475919a813a26f0075b6 100644 (file)
@@ -105,6 +105,7 @@ for (VEC : SERIAL_VECTORS; DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENS
 
 // things for DataOutRotation
 
+#if deal_II_dimension < 3
   template void
   DataOut_DoFData<DH<deal_II_dimension,deal_II_dimension>,deal_II_dimension+1,deal_II_dimension+1>::
   add_data_vector<VEC> (const VEC            &,
@@ -143,12 +144,12 @@ for (VEC : SERIAL_VECTORS; DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENS
   add_data_vector<VEC> (const DH<deal_II_dimension,deal_II_dimension> &,
                         const VEC                 &,
                         const DataPostprocessor<DH<deal_II_dimension,deal_II_dimension>::space_dimension> &);
-
+#endif
 
 
 // codim 1
 
-  #if deal_II_dimension < 3
+#if deal_II_dimension < 3
   template void
   DataOut_DoFData<DH<deal_II_dimension,deal_II_dimension+1>,deal_II_dimension,deal_II_dimension+1>::
   add_data_vector<VEC> (const VEC            &,
@@ -187,7 +188,7 @@ for (VEC : SERIAL_VECTORS; DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENS
   add_data_vector<VEC> (const DH<deal_II_dimension,deal_II_dimension+1> &,
                         const VEC                 &,
                         const DataPostprocessor<DH<deal_II_dimension,deal_II_dimension+1>::space_dimension> &);
-  #endif
+#endif
 
 
 
@@ -315,6 +316,7 @@ for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS)
 
 // things for DataOutRotation
 
+#if deal_II_dimension < 3
   template void
   DataOut_DoFData<DH<deal_II_dimension,deal_II_dimension>,deal_II_dimension+1,deal_II_dimension+1>::
   add_data_vector<IndexSet> (const IndexSet            &,
@@ -348,10 +350,11 @@ for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS)
                              const IndexSet                       &,
                              const std::vector<std::string> &,
                              const std::vector<DataComponentInterpretation::DataComponentInterpretation> &);
+#endif
 
 // codim 1
 
-  #if deal_II_dimension < 3
+#if deal_II_dimension < 3
   template void
   DataOut_DoFData<DH<deal_II_dimension,deal_II_dimension+1>,deal_II_dimension,deal_II_dimension+1>::
   add_data_vector<IndexSet> (const IndexSet            &,
@@ -370,7 +373,7 @@ for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS)
   DataOut_DoFData<DH<deal_II_dimension,deal_II_dimension+1>,deal_II_dimension,deal_II_dimension+1>::
   add_data_vector<IndexSet> (const IndexSet                 &,
                       const DataPostprocessor<DH<deal_II_dimension,deal_II_dimension+1>::space_dimension> &);
-  #endif
+#endif
 
 }
 
@@ -379,21 +382,21 @@ for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS)
 for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS)
 {
   template class DataOut_DoFData<DH<deal_II_dimension>,deal_II_dimension>;
-  template class DataOut_DoFData<DH<deal_II_dimension>,deal_II_dimension+1>;
 
-  #if deal_II_dimension < 3
+#if deal_II_dimension < 3
+  template class DataOut_DoFData<DH<deal_II_dimension>,deal_II_dimension+1>;
   template class DataOut_DoFData<DH<deal_II_dimension>,deal_II_dimension,deal_II_dimension+1>;
   template class DataOut_DoFData<DH<deal_II_dimension,deal_II_dimension+1>,deal_II_dimension,deal_II_dimension+1>;
-  #endif
+#endif
 
-  #if deal_II_dimension >= 2
+#if deal_II_dimension >= 2
   template class DataOut_DoFData<DH<deal_II_dimension>,deal_II_dimension-1,deal_II_dimension>;
-  #endif
+#endif
 
-  #if deal_II_dimension == 3
+#if deal_II_dimension == 3
      template class DataOut_DoFData<DH<1>,1,3>;
      template class DataOut_DoFData<DH<1,3>,1,3>;
-  #endif
+#endif
 
 }
 
@@ -416,7 +419,7 @@ for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS; deal_II_space_di
     namespace DataOut \{
 #if deal_II_dimension <= deal_II_space_dimension
       template
-      void 
+      void
       ParallelDataBase<deal_II_dimension,deal_II_space_dimension>::
       reinit_all_fe_values<dealii::DH<deal_II_dimension,deal_II_space_dimension> >
       (std::vector<std_cxx1x::shared_ptr<DataEntryBase<dealii::DH<deal_II_dimension,deal_II_space_dimension> > > > &dof_data,
index a44a7c69f8205a2157ee340b81ad3d02f4dc5047..87c868bf7c603e1f5b0bd1b2f32c2ff5386990bc 100644 (file)
@@ -17,5 +17,7 @@
 
 for (deal_II_dimension : DIMENSIONS)
 {
+#if deal_II_dimension < 3
   template class DataOutRotation<deal_II_dimension, DoFHandler<deal_II_dimension> >;
+#endif
 }
index 67a6ccc773e24b0dbf4d759f2b5aea8d36866206..b3f3bb27ff30dcc6be20084c4c963cce5e04c59f 100644 (file)
@@ -17,6 +17,7 @@
 
 for (deal_II_dimension : DIMENSIONS)
 {
+#if deal_II_dimension < 3
 template class DataOutStack<deal_II_dimension,deal_II_dimension,DoFHandler<deal_II_dimension> >;
 
 template void DataOutStack<deal_II_dimension,deal_II_dimension,DoFHandler<deal_II_dimension> >::
@@ -34,4 +35,5 @@ add_data_vector<double> (const Vector<double> &vec,
 template void DataOutStack<deal_II_dimension,deal_II_dimension,hp::DoFHandler<deal_II_dimension> >::
 add_data_vector<float> (const Vector<float>  &vec,
                         const std::string    &name);
+#endif
 }

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.