]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
split up solution_transfer and fe_values instantiations into two files each to reduce...
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 7 Feb 2013 22:02:38 +0000 (22:02 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 7 Feb 2013 22:02:38 +0000 (22:02 +0000)
git-svn-id: https://svn.dealii.org/trunk@28270 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/fe/fe_values.cc
deal.II/source/fe/fe_values.inst.in
deal.II/source/fe/fe_values_inst2.cc [new file with mode: 0644]
deal.II/source/numerics/solution_transfer.cc
deal.II/source/numerics/solution_transfer.inst.in
deal.II/source/numerics/solution_transfer_inst2.cc [new file with mode: 0644]

index 05bc1281f6bb91f9c407d455f094b2409fcfbe31..44769ce659aaaa380ac7f3168deecc512a58c776 100644 (file)
@@ -3620,6 +3620,13 @@ void FESubfaceValues<dim,spacedim>::do_reinit (const unsigned int face_no,
 
 
 /*------------------------------- Explicit Instantiations -------------*/
+#ifdef FE_VALUES_INSTANTIATE_PART_TWO
+#define DIM_A 3
+#define DIM_B 3
+#else
+#define DIM_A 1
+#define DIM_B 2
+#endif
 #include "fe_values.inst"
 
 DEAL_II_NAMESPACE_CLOSE
index e63f835c9da8844e3366f0b6ef9697c399618b1b..111b81394a62cc4a6ba4e211c9da9e540ad503e5 100644 (file)
@@ -18,6 +18,7 @@
 for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS)
   {
 #if deal_II_dimension <= deal_II_space_dimension
+#if (deal_II_space_dimension == DIM_A) || (deal_II_space_dimension == DIM_B)
 
     template class FEValuesData<deal_II_dimension,deal_II_space_dimension>;
     template class FEValuesBase<deal_II_dimension,deal_II_space_dimension>;
@@ -36,6 +37,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS
       template class Vector<deal_II_dimension, deal_II_space_dimension>;
       template class SymmetricTensor<2, deal_II_dimension, deal_II_space_dimension>;
       \}
+#endif
 #endif
   }
 
@@ -43,6 +45,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS
 for (dof_handler : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS; lda : BOOL)
   {
 #if deal_II_dimension <= deal_II_space_dimension
+#if (deal_II_space_dimension == DIM_A) || (deal_II_space_dimension == DIM_B)
 
     template void FEValues<deal_II_dimension,deal_II_space_dimension>::reinit(
     TriaIterator<DoFCellAccessor<dof_handler<deal_II_dimension,deal_II_space_dimension>, lda> >);
@@ -50,6 +53,7 @@ for (dof_handler : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS; deal_II
     TriaIterator<DoFCellAccessor<dof_handler<deal_II_dimension,deal_II_space_dimension>, lda> >, unsigned int);
     template void FESubfaceValues<deal_II_dimension,deal_II_space_dimension>::reinit(
     TriaIterator<DoFCellAccessor<dof_handler<deal_II_dimension,deal_II_space_dimension>, lda> >, unsigned int, unsigned int);
+#endif
 #endif
   }
 
@@ -58,6 +62,7 @@ for (dof_handler : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS; deal_II
 for (VEC : SERIAL_VECTORS; deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS)
   {
 #if deal_II_dimension <= deal_II_space_dimension
+#if (deal_II_space_dimension == DIM_A) || (deal_II_space_dimension == DIM_B)
     template
       void FEValuesViews::Scalar<deal_II_dimension, deal_II_space_dimension>
       ::get_function_values<dealii::VEC>
@@ -112,7 +117,7 @@ for (VEC : SERIAL_VECTORS; deal_II_dimension : DIMENSIONS; deal_II_space_dimensi
       void FEValuesViews::SymmetricTensor<2, deal_II_dimension, deal_II_space_dimension>
       ::get_function_divergences<dealii::VEC>
       (const dealii::VEC&, std::vector<Tensor<1,deal_II_space_dimension> >&) const;
-
+#endif
 #endif
   }
 
@@ -121,6 +126,7 @@ for (VEC : SERIAL_VECTORS; deal_II_dimension : DIMENSIONS; deal_II_space_dimensi
 for (VEC : SERIAL_VECTORS; deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS)
   {
 #if deal_II_dimension <= deal_II_space_dimension
+#if (deal_II_space_dimension == DIM_A) || (deal_II_space_dimension == DIM_B)
 
     template
       void FEValuesBase<deal_II_dimension,deal_II_space_dimension>::get_function_values<VEC>
@@ -230,6 +236,7 @@ for (VEC : SERIAL_VECTORS; deal_II_dimension : DIMENSIONS; deal_II_space_dimensi
       (const VEC&, const VectorSlice<const std::vector<unsigned int> >&,
        std::vector<std::vector<float> > &, bool) const;
 
+#endif
 #endif
   }
 
@@ -238,6 +245,7 @@ for (VEC : SERIAL_VECTORS; deal_II_dimension : DIMENSIONS; deal_II_space_dimensi
 
 for (deal_II_dimension : DIMENSIONS)
   {
+#if (deal_II_dimension == DIM_A) || (deal_II_dimension == DIM_B)
     template
        void FEValuesViews::Scalar<deal_II_dimension>::get_function_values<dealii::IndexSet>
        (const dealii::IndexSet&, std::vector<double>&) const;
@@ -334,7 +342,7 @@ for (deal_II_dimension : DIMENSIONS)
        (const dealii::IndexSet&, std::vector<Tensor<1,deal_II_dimension+1> >&) const;
 
 #endif
-
+#endif
   }
 
 
@@ -343,6 +351,7 @@ for (deal_II_dimension : DIMENSIONS)
 
 for (deal_II_dimension : DIMENSIONS)
   {
+#if (deal_II_dimension == DIM_A) || (deal_II_dimension == DIM_B)
     template
        void FEValuesBase<deal_II_dimension>::get_function_values<IndexSet>
       (const IndexSet&, std::vector<double>&) const;
@@ -562,7 +571,7 @@ for (deal_II_dimension : DIMENSIONS)
       (const IndexSet&, const VectorSlice<const std::vector<unsigned int> >&,
        std::vector<std::vector<float> > &, bool) const;
 
-
+#endif
 #endif
 
   }
diff --git a/deal.II/source/fe/fe_values_inst2.cc b/deal.II/source/fe/fe_values_inst2.cc
new file mode 100644 (file)
index 0000000..69ae580
--- /dev/null
@@ -0,0 +1,20 @@
+//---------------------------------------------------------------------------
+//    $Id:  $
+//    Version: $Name$
+//
+//    Copyright (C) 2013 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//---------------------------------------------------------------------------
+
+
+// This file compiles the second half of the instantiations from fe_values.cc
+// to get the memory consumption below 1.5gb with gcc.
+
+#define FE_VALUES_INSTANTIATE_PART_TWO
+
+#include "fe_values.cc"
index a36bb8ab1a71f26dd39df9130b835c163c79f165..d10e394da6ba257cdaeac26935bf1f9dca23e732 100644 (file)
@@ -721,6 +721,14 @@ SolutionTransfer<dim, VECTOR, DH>::Pointerstruct::memory_consumption () const
 
 
 /*-------------- Explicit Instantiations -------------------------------*/
+#ifdef SOLUTION_TRANSFER_INSTANTIATE_PART_TWO
+#define DIM_A 3
+#define DIM_B 3
+#else
+#define DIM_A 1
+#define DIM_B 2
+#endif
+
 #include "solution_transfer.inst"
 
 DEAL_II_NAMESPACE_CLOSE
index 10bd981e4f8bc2b8fd8f27aa073ea4ad436da127..5d8ec479d6b8116e05e80a662f3eefd76b649118 100644 (file)
 for (VEC : SERIAL_VECTORS; deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS)
   {
 #if deal_II_dimension <= deal_II_space_dimension
+#if (deal_II_space_dimension == DIM_A) || (deal_II_space_dimension == DIM_B)
+
     template class SolutionTransfer<deal_II_dimension, VEC, DoFHandler<deal_II_dimension, deal_II_space_dimension> >;
     template class SolutionTransfer<deal_II_dimension, VEC, hp::DoFHandler<deal_II_dimension, deal_II_space_dimension> >;
 #endif
+#endif
 }
+
+
+
diff --git a/deal.II/source/numerics/solution_transfer_inst2.cc b/deal.II/source/numerics/solution_transfer_inst2.cc
new file mode 100644 (file)
index 0000000..e903f04
--- /dev/null
@@ -0,0 +1,20 @@
+//---------------------------------------------------------------------------
+//    $Id:  $
+//    Version: $Name$
+//
+//    Copyright (C) 2013 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//---------------------------------------------------------------------------
+
+
+// This file compiles the second half of the instantiations from solution_transfer.cc
+// to get the memory consumption below 1.5gb with gcc (if compiling with PETSc and Trilinos).
+
+#define SOLUTION_TRANSFER_INSTANTIATE_PART_TWO
+
+#include "solution_transfer.cc"

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.