From e2453756e34d5c7f77e55f8730f6d60ef7835688 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Tue, 12 Mar 2013 13:39:51 +0000 Subject: [PATCH] Generalize two more instantiations. git-svn-id: https://svn.dealii.org/trunk@28868 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/fe/fe_tools.cc | 1 + deal.II/source/fe/fe_tools.inst.in | 331 ++++------------------------- deal.II/source/lac/CMakeLists.txt | 1 + deal.II/source/lac/solver.cc | 20 +- deal.II/source/lac/solver.inst.in | 18 ++ 5 files changed, 65 insertions(+), 306 deletions(-) create mode 100644 deal.II/source/lac/solver.inst.in diff --git a/deal.II/source/fe/fe_tools.cc b/deal.II/source/fe/fe_tools.cc index 0c6e2c73c9..5347869b82 100644 --- a/deal.II/source/fe/fe_tools.cc +++ b/deal.II/source/fe/fe_tools.cc @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/deal.II/source/fe/fe_tools.inst.in b/deal.II/source/fe/fe_tools.inst.in index b78de54520..ab7eafa183 100644 --- a/deal.II/source/fe/fe_tools.inst.in +++ b/deal.II/source/fe/fe_tools.inst.in @@ -147,296 +147,6 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS (const FiniteElement &, FullMatrix (&)[GeometryInfo::max_children_per_face], unsigned int, unsigned int); - template - void back_interpolate - (const DoFHandler &, const Vector &, - const FiniteElement &, Vector &); - template - void back_interpolate - (const DoFHandler &, const ConstraintMatrix &, - const Vector &, - const DoFHandler &, const ConstraintMatrix &, - Vector &); - template - void interpolation_difference - (const DoFHandler &, const Vector &, - const FiniteElement &, Vector &); - template - void interpolation_difference - (const DoFHandler &, const ConstraintMatrix &, - const Vector &, - const DoFHandler &, const ConstraintMatrix &, - Vector &); - template - void project_dg - (const DoFHandler &, const Vector &, - const DoFHandler &, Vector &); - template - void extrapolate - (const DoFHandler &, const Vector &, - const DoFHandler &, Vector &); - template - void extrapolate - (const DoFHandler &, const Vector &, - const DoFHandler &, const ConstraintMatrix &, - Vector &); - - - template - void back_interpolate - (const DoFHandler &, const Vector &, - const FiniteElement &, Vector &); - template - void back_interpolate - (const DoFHandler &, const ConstraintMatrix &, - const Vector &, - const DoFHandler &, const ConstraintMatrix &, - Vector &); - template - void interpolation_difference - (const DoFHandler &, const Vector &, - const FiniteElement &, Vector &); - template - void interpolation_difference - (const DoFHandler &, const ConstraintMatrix &, - const Vector &, - const DoFHandler &, const ConstraintMatrix &, - Vector &); - template - void project_dg - (const DoFHandler &, const Vector &, - const DoFHandler &, Vector &); - template - void extrapolate - (const DoFHandler &, const Vector &, - const DoFHandler &, Vector &); - template - void extrapolate - (const DoFHandler &, const Vector &, - const DoFHandler &, const ConstraintMatrix &, - Vector &); - - -#ifdef DEAL_II_WITH_PETSC - - template - void interpolate - (const DoFHandler &, const PETScWrappers::MPI::Vector &, - const DoFHandler &, PETScWrappers::MPI::Vector &); - template - void interpolate - (const DoFHandler &, const PETScWrappers::MPI::Vector &, - const DoFHandler &, const ConstraintMatrix &, - PETScWrappers::MPI::Vector &); - template - void back_interpolate - (const DoFHandler &, const PETScWrappers::MPI::Vector &, - const FiniteElement &, PETScWrappers::MPI::Vector &); - template - void back_interpolate - (const DoFHandler &, const ConstraintMatrix &, - const PETScWrappers::MPI::Vector &, - const DoFHandler &, const ConstraintMatrix &, - PETScWrappers::MPI::Vector &); - template - void interpolation_difference - (const DoFHandler &, const PETScWrappers::MPI::Vector &, - const FiniteElement &, PETScWrappers::MPI::Vector &); - template - void interpolation_difference - (const DoFHandler &, const ConstraintMatrix &, - const PETScWrappers::MPI::Vector &, - const DoFHandler &, const ConstraintMatrix &, - PETScWrappers::MPI::Vector &); - -#endif - - -#ifdef DEAL_II_WITH_TRILINOS - - template - void interpolate - (const DoFHandler &, const TrilinosWrappers::Vector &, - const DoFHandler &, TrilinosWrappers::Vector &); - template - void interpolate - (const DoFHandler &, const TrilinosWrappers::Vector &, - const DoFHandler &, const ConstraintMatrix &, - TrilinosWrappers::Vector &); - template - void back_interpolate - (const DoFHandler &, const TrilinosWrappers::Vector &, - const FiniteElement &, TrilinosWrappers::Vector &); - template - void back_interpolate - (const DoFHandler &, const ConstraintMatrix &, - const TrilinosWrappers::Vector &, - const DoFHandler &, const ConstraintMatrix &, - TrilinosWrappers::Vector &); - template - void interpolation_difference - (const DoFHandler &, const TrilinosWrappers::Vector &, - const FiniteElement &, TrilinosWrappers::Vector &); - template - void interpolation_difference - (const DoFHandler &, const ConstraintMatrix &, - const TrilinosWrappers::Vector &, - const DoFHandler &, const ConstraintMatrix &, - TrilinosWrappers::Vector &); - template - void project_dg - (const DoFHandler &, const TrilinosWrappers::Vector &, - const DoFHandler &, TrilinosWrappers::Vector &); - template - void extrapolate - (const DoFHandler &, const TrilinosWrappers::Vector &, - const DoFHandler &, TrilinosWrappers::Vector &); - template - void extrapolate - (const DoFHandler &, const TrilinosWrappers::Vector &, - const DoFHandler &, const ConstraintMatrix &, - TrilinosWrappers::Vector &); - -#endif - - - - template - void back_interpolate - (const DoFHandler &, const BlockVector &, - const FiniteElement &, BlockVector &); - template - void back_interpolate - (const DoFHandler &, const ConstraintMatrix &, - const BlockVector &, - const DoFHandler &, const ConstraintMatrix &, - BlockVector &); - template - void interpolation_difference - (const DoFHandler &, const BlockVector &, - const FiniteElement &, BlockVector &); - template - void interpolation_difference - (const DoFHandler &, const ConstraintMatrix &, - const BlockVector &, - const DoFHandler &, const ConstraintMatrix &, - BlockVector &); - template - void project_dg - (const DoFHandler &, const BlockVector &, - const DoFHandler &, BlockVector &); - template - void extrapolate - (const DoFHandler &, const BlockVector &, - const DoFHandler &, BlockVector &); - template - void extrapolate - (const DoFHandler &, const BlockVector &, - const DoFHandler &, const ConstraintMatrix &, - BlockVector &); - template - void extrapolate - (const DoFHandler &, const BlockVector &, - const DoFHandler &, Vector &); - template - void extrapolate - (const DoFHandler &, const BlockVector &, - const DoFHandler &, const ConstraintMatrix &, - Vector &); - - - template - void back_interpolate - (const DoFHandler &, const BlockVector &, - const FiniteElement &, BlockVector &); - template - void back_interpolate - (const DoFHandler &, const ConstraintMatrix &, - const BlockVector &, - const DoFHandler &, const ConstraintMatrix &, - BlockVector &); - template - void interpolation_difference - (const DoFHandler &, const BlockVector &, - const FiniteElement &, BlockVector &); - template - void interpolation_difference - (const DoFHandler &, const ConstraintMatrix &, - const BlockVector &, - const DoFHandler &, const ConstraintMatrix &, - BlockVector &); - template - void project_dg - (const DoFHandler &, const BlockVector &, - const DoFHandler &, BlockVector &); - template - void extrapolate - (const DoFHandler &, const BlockVector &, - const DoFHandler &, BlockVector &); - template - void extrapolate - (const DoFHandler &, const BlockVector &, - const DoFHandler &, const ConstraintMatrix &, - BlockVector &); - template - void extrapolate - (const DoFHandler &, const BlockVector &, - const DoFHandler &, Vector &); - template - void extrapolate - (const DoFHandler &, const BlockVector &, - const DoFHandler &, const ConstraintMatrix &, - Vector &); - - -#ifdef DEAL_II_WITH_TRILINOS - - template - void interpolate - (const DoFHandler &, const TrilinosWrappers::BlockVector &, - const DoFHandler &, TrilinosWrappers::BlockVector &); - template - void interpolate - (const DoFHandler &, const TrilinosWrappers::BlockVector &, - const DoFHandler &, const ConstraintMatrix &, - TrilinosWrappers::BlockVector &); - template - void back_interpolate - (const DoFHandler &, const TrilinosWrappers::BlockVector &, - const FiniteElement &, TrilinosWrappers::BlockVector &); - template - void back_interpolate - (const DoFHandler &, const ConstraintMatrix &, - const TrilinosWrappers::BlockVector &, - const DoFHandler &, const ConstraintMatrix &, - TrilinosWrappers::BlockVector &); - template - void interpolation_difference - (const DoFHandler &, const TrilinosWrappers::BlockVector &, - const FiniteElement &, TrilinosWrappers::BlockVector &); - template - void interpolation_difference - (const DoFHandler &, const ConstraintMatrix &, - const TrilinosWrappers::BlockVector &, - const DoFHandler &, const ConstraintMatrix &, - TrilinosWrappers::BlockVector &); - template - void project_dg - (const DoFHandler &, const TrilinosWrappers::BlockVector &, - const DoFHandler &, TrilinosWrappers::BlockVector &); - template - void extrapolate - (const DoFHandler &, const TrilinosWrappers::BlockVector &, - const DoFHandler &, TrilinosWrappers::BlockVector &); - template - void extrapolate - (const DoFHandler &, const TrilinosWrappers::BlockVector &, - const DoFHandler &, const ConstraintMatrix &, - TrilinosWrappers::BlockVector &); - -#endif - - template void interpolate (const hp::DoFHandler &, const Vector &, @@ -528,3 +238,44 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; VEC : SERIAL_VECTORS) + { + namespace FETools + \{ +#if deal_II_dimension == deal_II_space_dimension + template + void back_interpolate + (const DoFHandler &, const VEC &, + const FiniteElement &, VEC &); + template + void back_interpolate + (const DoFHandler &, const ConstraintMatrix &, + const VEC &, + const DoFHandler &, const ConstraintMatrix &, + VEC &); + template + void interpolation_difference + (const DoFHandler &, const VEC &, + const FiniteElement &, VEC &); + template + void interpolation_difference + (const DoFHandler &, const ConstraintMatrix &, + const VEC &, + const DoFHandler &, const ConstraintMatrix &, + VEC &); + template + void project_dg + (const DoFHandler &, const VEC &, + const DoFHandler &, VEC &); + template + void extrapolate + (const DoFHandler &, const VEC &, + const DoFHandler &, VEC &); + template + void extrapolate + (const DoFHandler &, const VEC &, + const DoFHandler &, const ConstraintMatrix &, + VEC &); +#endif + \} + } diff --git a/deal.II/source/lac/CMakeLists.txt b/deal.II/source/lac/CMakeLists.txt index b460e66faa..3c82807cd6 100644 --- a/deal.II/source/lac/CMakeLists.txt +++ b/deal.II/source/lac/CMakeLists.txt @@ -86,6 +86,7 @@ SET(inst_in_files parallel_vector.inst.in precondition_block.inst.in relaxation_block.inst.in + solver.inst.in sparse_matrix_ez.inst.in sparse_matrix.inst.in trilinos_sparse_matrix.inst.in diff --git a/deal.II/source/lac/solver.cc b/deal.II/source/lac/solver.cc index 88e1e0ee78..a5dd8a6384 100644 --- a/deal.II/source/lac/solver.cc +++ b/deal.II/source/lac/solver.cc @@ -17,26 +17,14 @@ #include #include #include +#include +#include #include +#include DEAL_II_NAMESPACE_OPEN - -// a few instantiations of static members. Hope that we catch all that -// are required - -template class Solver >; -template class Solver >; -template class Solver >; - -template class Solver >; -template class Solver >; -template class Solver >; - -#ifdef DEAL_II_WITH_PETSC -template class Solver; -template class Solver; -#endif +#include "solver.inst" DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/lac/solver.inst.in b/deal.II/source/lac/solver.inst.in new file mode 100644 index 0000000000..f01301a37e --- /dev/null +++ b/deal.II/source/lac/solver.inst.in @@ -0,0 +1,18 @@ +//--------------------------------------------------------------------------- +// $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. +// +//--------------------------------------------------------------------------- + + +for (S : SERIAL_VECTORS) + { + template class Solver; + } -- 2.39.5