From: heister Date: Thu, 7 Feb 2013 22:02:38 +0000 (+0000) Subject: split up solution_transfer and fe_values instantiations into two files each to reduce... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5821da5bf814a5bcb29c0c4f49e87095a76c451;p=dealii-svn.git split up solution_transfer and fe_values instantiations into two files each to reduce the amount of memory required during compilation. git-svn-id: https://svn.dealii.org/trunk@28270 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/fe/fe_values.cc b/deal.II/source/fe/fe_values.cc index 05bc1281f6..44769ce659 100644 --- a/deal.II/source/fe/fe_values.cc +++ b/deal.II/source/fe/fe_values.cc @@ -3620,6 +3620,13 @@ void FESubfaceValues::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 diff --git a/deal.II/source/fe/fe_values.inst.in b/deal.II/source/fe/fe_values.inst.in index e63f835c9d..111b81394a 100644 --- a/deal.II/source/fe/fe_values.inst.in +++ b/deal.II/source/fe/fe_values.inst.in @@ -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; template class FEValuesBase; @@ -36,6 +37,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS template class Vector; 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::reinit( TriaIterator, lda> >); @@ -50,6 +53,7 @@ for (dof_handler : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS; deal_II TriaIterator, lda> >, unsigned int); template void FESubfaceValues::reinit( TriaIterator, 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 ::get_function_values @@ -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 (const dealii::VEC&, std::vector >&) 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::get_function_values @@ -230,6 +236,7 @@ for (VEC : SERIAL_VECTORS; deal_II_dimension : DIMENSIONS; deal_II_space_dimensi (const VEC&, const VectorSlice >&, std::vector > &, 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::get_function_values (const dealii::IndexSet&, std::vector&) const; @@ -334,7 +342,7 @@ for (deal_II_dimension : DIMENSIONS) (const dealii::IndexSet&, std::vector >&) 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::get_function_values (const IndexSet&, std::vector&) const; @@ -562,7 +571,7 @@ for (deal_II_dimension : DIMENSIONS) (const IndexSet&, const VectorSlice >&, std::vector > &, 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 index 0000000000..69ae580b8a --- /dev/null +++ b/deal.II/source/fe/fe_values_inst2.cc @@ -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" diff --git a/deal.II/source/numerics/solution_transfer.cc b/deal.II/source/numerics/solution_transfer.cc index a36bb8ab1a..d10e394da6 100644 --- a/deal.II/source/numerics/solution_transfer.cc +++ b/deal.II/source/numerics/solution_transfer.cc @@ -721,6 +721,14 @@ SolutionTransfer::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 diff --git a/deal.II/source/numerics/solution_transfer.inst.in b/deal.II/source/numerics/solution_transfer.inst.in index 10bd981e4f..5d8ec479d6 100644 --- a/deal.II/source/numerics/solution_transfer.inst.in +++ b/deal.II/source/numerics/solution_transfer.inst.in @@ -14,7 +14,13 @@ 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 >; template class SolutionTransfer >; #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 index 0000000000..e903f04353 --- /dev/null +++ b/deal.II/source/numerics/solution_transfer_inst2.cc @@ -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"