From bcf8e81b4f849b2698e645270c82486404e9d516 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Tue, 20 Aug 2013 21:33:01 +0000 Subject: [PATCH] Split vector_tools into several files to speed up compilation. vector_tools_integrate_difference still takes too long. git-svn-id: https://svn.dealii.org/trunk@30361 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/numerics/CMakeLists.txt | 18 +- deal.II/source/numerics/vector_tools.inst.in | 703 ------------------ .../source/numerics/vector_tools_boundary.cc | 25 + .../numerics/vector_tools_boundary.inst.in | 186 +++++ .../numerics/vector_tools_constraints.cc | 25 + .../numerics/vector_tools_constraints.inst.in | 43 ++ .../vector_tools_integrate_difference.cc | 25 + .../vector_tools_integrate_difference.inst.in | 127 ++++ .../numerics/vector_tools_interpolate.cc | 25 + .../numerics/vector_tools_interpolate.inst.in | 199 +++++ .../numerics/vector_tools_mean_value.cc | 25 + .../numerics/vector_tools_mean_value.inst.in | 50 ++ .../numerics/vector_tools_point_value.cc | 25 + .../numerics/vector_tools_point_value.inst.in | 165 ++++ ...ector_tools.cc => vector_tools_project.cc} | 2 +- .../numerics/vector_tools_project.inst.in | 70 ++ deal.II/source/numerics/vector_tools_rhs.cc | 86 +++ .../source/numerics/vector_tools_rhs.inst.in | 108 +++ 18 files changed, 1201 insertions(+), 706 deletions(-) delete mode 100644 deal.II/source/numerics/vector_tools.inst.in create mode 100644 deal.II/source/numerics/vector_tools_boundary.cc create mode 100644 deal.II/source/numerics/vector_tools_boundary.inst.in create mode 100644 deal.II/source/numerics/vector_tools_constraints.cc create mode 100644 deal.II/source/numerics/vector_tools_constraints.inst.in create mode 100644 deal.II/source/numerics/vector_tools_integrate_difference.cc create mode 100644 deal.II/source/numerics/vector_tools_integrate_difference.inst.in create mode 100644 deal.II/source/numerics/vector_tools_interpolate.cc create mode 100644 deal.II/source/numerics/vector_tools_interpolate.inst.in create mode 100644 deal.II/source/numerics/vector_tools_mean_value.cc create mode 100644 deal.II/source/numerics/vector_tools_mean_value.inst.in create mode 100644 deal.II/source/numerics/vector_tools_point_value.cc create mode 100644 deal.II/source/numerics/vector_tools_point_value.inst.in rename deal.II/source/numerics/{vector_tools.cc => vector_tools_project.cc} (95%) create mode 100644 deal.II/source/numerics/vector_tools_project.inst.in create mode 100644 deal.II/source/numerics/vector_tools_rhs.cc create mode 100644 deal.II/source/numerics/vector_tools_rhs.inst.in diff --git a/deal.II/source/numerics/CMakeLists.txt b/deal.II/source/numerics/CMakeLists.txt index 855e2c6777..db675fcd7a 100644 --- a/deal.II/source/numerics/CMakeLists.txt +++ b/deal.II/source/numerics/CMakeLists.txt @@ -36,7 +36,14 @@ SET(_src solution_transfer.cc solution_transfer_inst2.cc time_dependent.cc - vector_tools.cc + vector_tools_boundary.cc + vector_tools_constraints.cc + vector_tools_integrate_difference.cc + vector_tools_interpolate.cc + vector_tools_mean_value.cc + vector_tools_point_value.cc + vector_tools_project.cc + vector_tools_rhs.cc ) SET(_inst @@ -53,7 +60,14 @@ SET(_inst point_value_history.inst.in solution_transfer.inst.in time_dependent.inst.in - vector_tools.inst.in + vector_tools_boundary.inst.in + vector_tools_constraints.inst.in + vector_tools_integrate_difference.inst.in + vector_tools_interpolate.inst.in + vector_tools_mean_value.inst.in + vector_tools_point_value.inst.in + vector_tools_project.inst.in + vector_tools_rhs.inst.in ) DEAL_II_ADD_LIBRARY(obj_numerics OBJECT ${_src} ${_header} ${_inst}) diff --git a/deal.II/source/numerics/vector_tools.inst.in b/deal.II/source/numerics/vector_tools.inst.in deleted file mode 100644 index f7bbff340e..0000000000 --- a/deal.II/source/numerics/vector_tools.inst.in +++ /dev/null @@ -1,703 +0,0 @@ -// --------------------------------------------------------------------- -// $Id$ -// -// Copyright (C) 1998 - 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 (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) - { -#if deal_II_dimension <= deal_II_space_dimension - namespace VectorTools \{ - - template - void integrate_difference, deal_II_space_dimension> - (const DoFHandler&, - const VEC&, - const Function&, - Vector&, - const Quadrature&, - const NormType&, - const Function*, - const double); - - template - void integrate_difference, deal_II_space_dimension > - (const DoFHandler&, - const VEC&, - const Function&, - Vector&, - const Quadrature&, - const NormType&, - const Function*, - const double); - - template - void integrate_difference, deal_II_space_dimension> - (const Mapping&, - const DoFHandler&, - const VEC&, - const Function&, - Vector&, - const Quadrature&, - const NormType&, - const Function*, - const double); - - template - void integrate_difference, deal_II_space_dimension > - (const Mapping&, - const DoFHandler&, - const VEC&, - const Function&, - Vector&, - const Quadrature&, - const NormType&, - const Function*, - const double); - - - - template - double compute_mean_value - (const Mapping&, - const DoFHandler&, - const Quadrature&, - const VEC&, - const unsigned int); - - template - double compute_mean_value - (const DoFHandler&, - const Quadrature&, - const VEC&, - const unsigned int); - - template - void interpolate - (const Mapping&, - const DoFHandler&, - const Function&, - VEC&); - - template - void interpolate - (const DoFHandler&, - const Function&, - VEC&); - - template - void project - (const Mapping &, - const DoFHandler &, - const ConstraintMatrix &, - const Quadrature &, - const Function &, - VEC &, - const bool, - const Quadrature &, - const bool); - - template - void project - (const DoFHandler &, - const ConstraintMatrix &, - const Quadrature &, - const Function &, - VEC &, - const bool, - const Quadrature &, - const bool); - - template - void project - (const hp::MappingCollection &, - const hp::DoFHandler &, - const ConstraintMatrix &, - const hp::QCollection &, - const Function &, - VEC &, - const bool, - const hp::QCollection &, - const bool); - - template - void project - (const hp::DoFHandler &, - const ConstraintMatrix &, - const hp::QCollection &, - const Function &, - VEC &, - const bool, - const hp::QCollection &, - const bool); - \} -#endif - } - - - -//TODO[SP]: replace by -// where applicable and move to codimension cases above also when applicable -for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) - { -#if deal_II_dimension == deal_II_space_dimension - - namespace VectorTools \{ - - template - void point_value ( - const hp::DoFHandler&, - const VEC&, - const Point&, - Vector&); - - template - void interpolate - (const Mapping&, - const hp::DoFHandler&, - const Function&, - VEC&); - template - void interpolate - (const hp::DoFHandler&, - const Function&, - VEC&); - - template - double point_value ( - const hp::DoFHandler&, - const VEC&, - const Point&); - - template - void point_value ( - const hp::MappingCollection&, - const hp::DoFHandler&, - const VEC&, - const Point&, - Vector&); - - template - void interpolate - (const DoFHandler&, - const DoFHandler&, - const FullMatrix&, - const VEC&, - VEC&); - - template - double point_value ( - const hp::MappingCollection&, - const hp::DoFHandler&, - const VEC&, - const Point&); - - template - void integrate_difference - (const hp::DoFHandler&, - const VEC&, - const Function&, - Vector&, - const hp::QCollection&, - const NormType&, - const Function*, - const double); - template - void integrate_difference - (const hp::DoFHandler&, - const VEC&, - const Function&, - Vector&, - const hp::QCollection&, - const NormType&, - const Function*, - const double); - template - void integrate_difference - (const hp::MappingCollection&, - const hp::DoFHandler&, - const VEC&, - const Function&, - Vector&, - const hp::QCollection&, - const NormType&, - const Function*, - const double); - template - void integrate_difference - (const hp::MappingCollection&, - const hp::DoFHandler&, - const VEC&, - const Function&, - Vector&, - const hp::QCollection&, - const NormType&, - const Function*, - const double); - - template - void point_difference ( - const DoFHandler&, - const VEC&, - const Function&, - Vector&, - const Point&); - - template - void point_difference ( - const Mapping&, - const DoFHandler&, - const VEC&, - const Function&, - Vector&, - const Point&); - - template - void point_value ( - const DoFHandler&, - const VEC&, - const Point&, - Vector&); - - template - double point_value ( - const DoFHandler&, - const VEC&, - const Point&); - - template - void point_value ( - const Mapping&, - const DoFHandler&, - const VEC&, - const Point&, - Vector&); - - template - double point_value ( - const Mapping&, - const DoFHandler&, - const VEC&, - const Point&); - - \} -#endif - } - - -for (VEC : SERIAL_VECTORS) -{ - namespace VectorTools \{ - template - void subtract_mean_value(VEC &, const std::vector &); - \} -} - - -for (deal_II_dimension : DIMENSIONS) -{ - namespace VectorTools \{ - template - void interpolate_boundary_values ( - const MGDoFHandler &, - const types::boundary_id, - const Function &, - ConstraintMatrix&, - const ComponentMask &); - - template - void interpolate_boundary_values ( - const MGDoFHandler &, - const types::boundary_id, - const Function &, - std::map &, - const ComponentMask &); - \} -} - - -for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; DH : DOFHANDLER_TEMPLATES) - { -#if deal_II_dimension <= deal_II_space_dimension - namespace VectorTools \{ - template - void interpolate_boundary_values - (const Mapping &, - const DH &, - const FunctionMap::type &, - std::map &, - const ComponentMask &); - - template - void interpolate_boundary_values - (const Mapping &, - const DH &, - const types::boundary_id, - const Function &, - std::map &, - const ComponentMask &); - - template - void interpolate_boundary_values ( - const DH &, - const types::boundary_id, - const Function &, - std::map &, - const ComponentMask &); - - template - void interpolate_boundary_values - (const DH &, - const FunctionMap::type &, - std::map &, - const ComponentMask &); - - template - void interpolate_boundary_values ( - const Mapping &, - const DH &, - const FunctionMap::type &, - ConstraintMatrix &, - const ComponentMask &); - - template - void interpolate_boundary_values - (const Mapping &, - const DH &, - const types::boundary_id, - const Function &, - ConstraintMatrix &, - const ComponentMask &); - - template - void interpolate_boundary_values ( - const DH &, - const types::boundary_id, - const Function &, - ConstraintMatrix &, - const ComponentMask &); - - template - void interpolate_boundary_values ( - const DH &, - const FunctionMap::type &, - ConstraintMatrix &, - const ComponentMask &); - - \} -#endif - } - - -for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) - { -#if deal_II_dimension <= deal_II_space_dimension - namespace VectorTools \{ - template - void create_right_hand_side - (const Mapping &, - const DoFHandler &, - const Quadrature &, - const Function &, - Vector &); - - template - void create_right_hand_side - (const DoFHandler &, - const Quadrature &, - const Function &, - Vector &); - - \} -#endif - } - -//TODO[SP]: replace by -// where applicable and move to codimension cases above also when applicable -for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) - { - namespace VectorTools \{ - -#if deal_II_dimension <= deal_II_space_dimension - template - void project_boundary_values - (const hp::MappingCollection &, - const hp::DoFHandler &, - const FunctionMap::type &, - const hp::QCollection&, - std::map&, - std::vector); - - template - void project_boundary_values - (const hp::DoFHandler &, - const FunctionMap::type &, - const hp::QCollection&, - std::map&, - std::vector); -#endif - -#if deal_II_dimension == deal_II_space_dimension - template - void create_right_hand_side - (const hp::MappingCollection &, - const hp::DoFHandler &, - const hp::QCollection &, - const Function &, - Vector &); - - template - void create_right_hand_side - (const hp::DoFHandler &, - const hp::QCollection &, - const Function &, - Vector &); - - template - void create_point_source_vector - (const Mapping &, - const DoFHandler &, - const Point &, - Vector &); - template - void create_point_source_vector - (const DoFHandler &, - const Point &, - Vector &); - - template - void create_point_source_vector - (const hp::MappingCollection &, - const hp::DoFHandler &, - const Point &, - Vector &); - template - void create_point_source_vector - (const hp::DoFHandler &, - const Point &, - Vector &); - template - void create_point_source_vector - (const Mapping &, - const DoFHandler &, - const Point &, - const Point &, - Vector &); - template - void create_point_source_vector - (const DoFHandler &, - const Point &, - const Point &, - Vector &); - - template - void create_point_source_vector - (const hp::MappingCollection &, - const hp::DoFHandler &, - const Point &, - const Point &, - Vector &); - template - void create_point_source_vector - (const hp::DoFHandler &, - const Point &, - const Point &, - Vector &); - -#if deal_II_dimension > 1 - template - void - create_boundary_right_hand_side - (const Mapping &, - const DoFHandler &, - const Quadrature &, - const Function &, - Vector &, - const std::set &); -#endif - - template - void - create_boundary_right_hand_side - (const DoFHandler &, - const Quadrature &, - const Function &, - Vector &, - const std::set &); - -#if deal_II_dimension > 1 - template - void - create_boundary_right_hand_side - (const hp::MappingCollection &, - const hp::DoFHandler &, - const hp::QCollection &, - const Function &, - Vector &, - const std::set &); -#endif - - template - void - create_boundary_right_hand_side - (const hp::DoFHandler &, - const hp::QCollection &, - const Function &, - Vector &, - const std::set &); - - - - - - template - void project_boundary_values - (const Mapping &, - const DoFHandler &, - const FunctionMap::type &, - const Quadrature&, - std::map&, std::vector); - - template - void project_boundary_values - (const DoFHandler &, - const FunctionMap::type &, - const Quadrature&, - std::map&, - std::vector); - - template - void project_boundary_values - (const Mapping &, - const DoFHandler &, - const FunctionMap::type &, - const Quadrature&, - ConstraintMatrix&, std::vector); - - template - void project_boundary_values - (const DoFHandler &, - const FunctionMap::type &, - const Quadrature&, - ConstraintMatrix&, - std::vector); - - - -#if deal_II_dimension != 1 - template - void project_boundary_values_curl_conforming - (const DoFHandler&, - const unsigned int, - const Function&, - const types::boundary_id, - ConstraintMatrix&, - const Mapping&); - template - void project_boundary_values_curl_conforming - (const hp::DoFHandler&, - const unsigned int, - const Function&, - const types::boundary_id, - ConstraintMatrix&, - const hp::MappingCollection&); - template - void project_boundary_values_div_conforming - (const DoFHandler&, - const unsigned int, - const Function&, - const types::boundary_id, - ConstraintMatrix&, - const Mapping&); - template - void project_boundary_values_div_conforming - (const hp::DoFHandler&, - const unsigned int, - const Function&, - const types::boundary_id, - ConstraintMatrix&, - const hp::MappingCollection&); - template - void - compute_no_normal_flux_constraints (const DoFHandler &dof_handler, - const unsigned int first_vector_component, - const std::set &boundary_ids, - ConstraintMatrix &constraints, - const Mapping &mapping); - template - void - compute_no_normal_flux_constraints (const hp::DoFHandler &dof_handler, - const unsigned int first_vector_component, - const std::set &boundary_ids, - ConstraintMatrix &constraints, - const Mapping &mapping); -#endif -#endif - \} - } - - - -for (deal_II_dimension : DIMENSIONS) -{ - namespace VectorTools \{ - - template - void interpolate_to_different_mesh - (const DoFHandler &, - const Vector &, - const DoFHandler &, - Vector &); - - template - void interpolate_to_different_mesh - (const DoFHandler &, - const Vector &, - const DoFHandler &, - const ConstraintMatrix &, - Vector &); - - template - void interpolate_to_different_mesh - (const InterGridMap > &, - const Vector &, - const ConstraintMatrix &, - Vector &); - - template - void interpolate_to_different_mesh - (const DoFHandler &, - const Vector &, - const DoFHandler &, - Vector &); - - template - void interpolate_to_different_mesh - (const DoFHandler &, - const Vector &, - const DoFHandler &, - const ConstraintMatrix &, - Vector &); - - template - void interpolate_to_different_mesh - (const InterGridMap > &, - const Vector &, - const ConstraintMatrix &, - Vector &); - - \} -} - - diff --git a/deal.II/source/numerics/vector_tools_boundary.cc b/deal.II/source/numerics/vector_tools_boundary.cc new file mode 100644 index 0000000000..6ecf213c9c --- /dev/null +++ b/deal.II/source/numerics/vector_tools_boundary.cc @@ -0,0 +1,25 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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. +// +// --------------------------------------------------------------------- + + +#include + +DEAL_II_NAMESPACE_OPEN + +// ---------------------------- explicit instantiations -------------------- +#include "vector_tools_boundary.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/numerics/vector_tools_boundary.inst.in b/deal.II/source/numerics/vector_tools_boundary.inst.in new file mode 100644 index 0000000000..813f195003 --- /dev/null +++ b/deal.II/source/numerics/vector_tools_boundary.inst.in @@ -0,0 +1,186 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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) +{ + namespace VectorTools \{ + template + void interpolate_boundary_values ( + const MGDoFHandler &, + const types::boundary_id, + const Function &, + ConstraintMatrix&, + const ComponentMask &); + + template + void interpolate_boundary_values ( + const MGDoFHandler &, + const types::boundary_id, + const Function &, + std::map &, + const ComponentMask &); + \} +} + + +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; DH : DOFHANDLER_TEMPLATES) + { +#if deal_II_dimension <= deal_II_space_dimension + namespace VectorTools \{ + template + void interpolate_boundary_values + (const Mapping &, + const DH &, + const FunctionMap::type &, + std::map &, + const ComponentMask &); + + template + void interpolate_boundary_values + (const Mapping &, + const DH &, + const types::boundary_id, + const Function &, + std::map &, + const ComponentMask &); + + template + void interpolate_boundary_values ( + const DH &, + const types::boundary_id, + const Function &, + std::map &, + const ComponentMask &); + + template + void interpolate_boundary_values + (const DH &, + const FunctionMap::type &, + std::map &, + const ComponentMask &); + + template + void interpolate_boundary_values ( + const Mapping &, + const DH &, + const FunctionMap::type &, + ConstraintMatrix &, + const ComponentMask &); + + template + void interpolate_boundary_values + (const Mapping &, + const DH &, + const types::boundary_id, + const Function &, + ConstraintMatrix &, + const ComponentMask &); + + template + void interpolate_boundary_values ( + const DH &, + const types::boundary_id, + const Function &, + ConstraintMatrix &, + const ComponentMask &); + + template + void interpolate_boundary_values ( + const DH &, + const FunctionMap::type &, + ConstraintMatrix &, + const ComponentMask &); + \} +#endif +} + +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) + { + namespace VectorTools \{ +#if deal_II_dimension == deal_II_space_dimension + + template + void project_boundary_values + (const Mapping &, + const DoFHandler &, + const FunctionMap::type &, + const Quadrature&, + std::map&, std::vector); + + template + void project_boundary_values + (const DoFHandler &, + const FunctionMap::type &, + const Quadrature&, + std::map&, + std::vector); + + template + void project_boundary_values + (const Mapping &, + const DoFHandler &, + const FunctionMap::type &, + const Quadrature&, + ConstraintMatrix&, std::vector); + + template + void project_boundary_values + (const DoFHandler &, + const FunctionMap::type &, + const Quadrature&, + ConstraintMatrix&, + std::vector); + + + +#if deal_II_dimension != 1 + template + void project_boundary_values_curl_conforming + (const DoFHandler&, + const unsigned int, + const Function&, + const types::boundary_id, + ConstraintMatrix&, + const Mapping&); + template + void project_boundary_values_curl_conforming + (const hp::DoFHandler&, + const unsigned int, + const Function&, + const types::boundary_id, + ConstraintMatrix&, + const hp::MappingCollection&); + template + void project_boundary_values_div_conforming + (const DoFHandler&, + const unsigned int, + const Function&, + const types::boundary_id, + ConstraintMatrix&, + const Mapping&); + template + void project_boundary_values_div_conforming + (const hp::DoFHandler&, + const unsigned int, + const Function&, + const types::boundary_id, + ConstraintMatrix&, + const hp::MappingCollection&); +#endif +#endif + \} + } diff --git a/deal.II/source/numerics/vector_tools_constraints.cc b/deal.II/source/numerics/vector_tools_constraints.cc new file mode 100644 index 0000000000..1ec77ec3e5 --- /dev/null +++ b/deal.II/source/numerics/vector_tools_constraints.cc @@ -0,0 +1,25 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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. +// +// --------------------------------------------------------------------- + + +#include + +DEAL_II_NAMESPACE_OPEN + +// ---------------------------- explicit instantiations -------------------- +#include "vector_tools_constraints.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/numerics/vector_tools_constraints.inst.in b/deal.II/source/numerics/vector_tools_constraints.inst.in new file mode 100644 index 0000000000..19f2df6728 --- /dev/null +++ b/deal.II/source/numerics/vector_tools_constraints.inst.in @@ -0,0 +1,43 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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. +// +// --------------------------------------------------------------------- + + +//TODO[SP]: replace by +// where applicable and move to codimension cases above also when applicable +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) + { + namespace VectorTools \{ + +#if deal_II_dimension == deal_II_space_dimension +#if deal_II_dimension != 1 + template + void + compute_no_normal_flux_constraints (const DoFHandler &dof_handler, + const unsigned int first_vector_component, + const std::set &boundary_ids, + ConstraintMatrix &constraints, + const Mapping &mapping); + template + void + compute_no_normal_flux_constraints (const hp::DoFHandler &dof_handler, + const unsigned int first_vector_component, + const std::set &boundary_ids, + ConstraintMatrix &constraints, + const Mapping &mapping); +#endif +#endif + \} + } diff --git a/deal.II/source/numerics/vector_tools_integrate_difference.cc b/deal.II/source/numerics/vector_tools_integrate_difference.cc new file mode 100644 index 0000000000..4e6e8e6888 --- /dev/null +++ b/deal.II/source/numerics/vector_tools_integrate_difference.cc @@ -0,0 +1,25 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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. +// +// --------------------------------------------------------------------- + + +#include + +DEAL_II_NAMESPACE_OPEN + +// ---------------------------- explicit instantiations -------------------- +#include "vector_tools_integrate_difference.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/numerics/vector_tools_integrate_difference.inst.in b/deal.II/source/numerics/vector_tools_integrate_difference.inst.in new file mode 100644 index 0000000000..08cf8b9d22 --- /dev/null +++ b/deal.II/source/numerics/vector_tools_integrate_difference.inst.in @@ -0,0 +1,127 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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 (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) + { +#if deal_II_dimension <= deal_II_space_dimension + namespace VectorTools \{ + + template + void integrate_difference, deal_II_space_dimension> + (const DoFHandler&, + const VEC&, + const Function&, + Vector&, + const Quadrature&, + const NormType&, + const Function*, + const double); + + template + void integrate_difference, deal_II_space_dimension > + (const DoFHandler&, + const VEC&, + const Function&, + Vector&, + const Quadrature&, + const NormType&, + const Function*, + const double); + + template + void integrate_difference, deal_II_space_dimension> + (const Mapping&, + const DoFHandler&, + const VEC&, + const Function&, + Vector&, + const Quadrature&, + const NormType&, + const Function*, + const double); + + template + void integrate_difference, deal_II_space_dimension > + (const Mapping&, + const DoFHandler&, + const VEC&, + const Function&, + Vector&, + const Quadrature&, + const NormType&, + const Function*, + const double); + + \} +#endif + } + + + +//TODO[SP]: replace by +// where applicable and move to codimension cases above also when applicable +for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) + { +#if deal_II_dimension == deal_II_space_dimension + + namespace VectorTools \{ + + template + void integrate_difference + (const hp::DoFHandler&, + const VEC&, + const Function&, + Vector&, + const hp::QCollection&, + const NormType&, + const Function*, + const double); + template + void integrate_difference + (const hp::DoFHandler&, + const VEC&, + const Function&, + Vector&, + const hp::QCollection&, + const NormType&, + const Function*, + const double); + template + void integrate_difference + (const hp::MappingCollection&, + const hp::DoFHandler&, + const VEC&, + const Function&, + Vector&, + const hp::QCollection&, + const NormType&, + const Function*, + const double); + template + void integrate_difference + (const hp::MappingCollection&, + const hp::DoFHandler&, + const VEC&, + const Function&, + Vector&, + const hp::QCollection&, + const NormType&, + const Function*, + const double); + \} +#endif + } diff --git a/deal.II/source/numerics/vector_tools_interpolate.cc b/deal.II/source/numerics/vector_tools_interpolate.cc new file mode 100644 index 0000000000..3d57d8890c --- /dev/null +++ b/deal.II/source/numerics/vector_tools_interpolate.cc @@ -0,0 +1,25 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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. +// +// --------------------------------------------------------------------- + + +#include + +DEAL_II_NAMESPACE_OPEN + +// ---------------------------- explicit instantiations -------------------- +#include "vector_tools_interpolate.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/numerics/vector_tools_interpolate.inst.in b/deal.II/source/numerics/vector_tools_interpolate.inst.in new file mode 100644 index 0000000000..5eba56a30f --- /dev/null +++ b/deal.II/source/numerics/vector_tools_interpolate.inst.in @@ -0,0 +1,199 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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 (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) + { +#if deal_II_dimension <= deal_II_space_dimension + namespace VectorTools \{ + + template + void interpolate + (const Mapping&, + const DoFHandler&, + const Function&, + VEC&); + + template + void interpolate + (const DoFHandler&, + const Function&, + VEC&); + \} +#endif + } + + + +//TODO[SP]: replace by +// where applicable and move to codimension cases above also when applicable +for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) + { +#if deal_II_dimension == deal_II_space_dimension + + namespace VectorTools \{ + + template + void interpolate + (const Mapping&, + const hp::DoFHandler&, + const Function&, + VEC&); + template + void interpolate + (const hp::DoFHandler&, + const Function&, + VEC&); + + template + void interpolate + (const DoFHandler&, + const DoFHandler&, + const FullMatrix&, + const VEC&, + VEC&); + \} +#endif + } + + + +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; DH : DOFHANDLER_TEMPLATES) + { +#if deal_II_dimension <= deal_II_space_dimension + namespace VectorTools \{ + template + void interpolate_boundary_values + (const Mapping &, + const DH &, + const FunctionMap::type &, + std::map &, + const ComponentMask &); + + template + void interpolate_boundary_values + (const Mapping &, + const DH &, + const types::boundary_id, + const Function &, + std::map &, + const ComponentMask &); + + template + void interpolate_boundary_values ( + const DH &, + const types::boundary_id, + const Function &, + std::map &, + const ComponentMask &); + + template + void interpolate_boundary_values + (const DH &, + const FunctionMap::type &, + std::map &, + const ComponentMask &); + + template + void interpolate_boundary_values ( + const Mapping &, + const DH &, + const FunctionMap::type &, + ConstraintMatrix &, + const ComponentMask &); + + template + void interpolate_boundary_values + (const Mapping &, + const DH &, + const types::boundary_id, + const Function &, + ConstraintMatrix &, + const ComponentMask &); + + template + void interpolate_boundary_values ( + const DH &, + const types::boundary_id, + const Function &, + ConstraintMatrix &, + const ComponentMask &); + + template + void interpolate_boundary_values ( + const DH &, + const FunctionMap::type &, + ConstraintMatrix &, + const ComponentMask &); + + \} +#endif + } + + + +for (deal_II_dimension : DIMENSIONS) +{ + namespace VectorTools \{ + + template + void interpolate_to_different_mesh + (const DoFHandler &, + const Vector &, + const DoFHandler &, + Vector &); + + template + void interpolate_to_different_mesh + (const DoFHandler &, + const Vector &, + const DoFHandler &, + const ConstraintMatrix &, + Vector &); + + template + void interpolate_to_different_mesh + (const InterGridMap > &, + const Vector &, + const ConstraintMatrix &, + Vector &); + + template + void interpolate_to_different_mesh + (const DoFHandler &, + const Vector &, + const DoFHandler &, + Vector &); + + template + void interpolate_to_different_mesh + (const DoFHandler &, + const Vector &, + const DoFHandler &, + const ConstraintMatrix &, + Vector &); + + template + void interpolate_to_different_mesh + (const InterGridMap > &, + const Vector &, + const ConstraintMatrix &, + Vector &); + + \} +} + + diff --git a/deal.II/source/numerics/vector_tools_mean_value.cc b/deal.II/source/numerics/vector_tools_mean_value.cc new file mode 100644 index 0000000000..a907916a06 --- /dev/null +++ b/deal.II/source/numerics/vector_tools_mean_value.cc @@ -0,0 +1,25 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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. +// +// --------------------------------------------------------------------- + + +#include + +DEAL_II_NAMESPACE_OPEN + +// ---------------------------- explicit instantiations -------------------- +#include "vector_tools_mean_value.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/numerics/vector_tools_mean_value.inst.in b/deal.II/source/numerics/vector_tools_mean_value.inst.in new file mode 100644 index 0000000000..89e5be1545 --- /dev/null +++ b/deal.II/source/numerics/vector_tools_mean_value.inst.in @@ -0,0 +1,50 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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 (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) + { +#if deal_II_dimension <= deal_II_space_dimension + namespace VectorTools \{ + + template + double compute_mean_value + (const Mapping&, + const DoFHandler&, + const Quadrature&, + const VEC&, + const unsigned int); + + template + double compute_mean_value + (const DoFHandler&, + const Quadrature&, + const VEC&, + const unsigned int); + + \} +#endif + } + + + +for (VEC : SERIAL_VECTORS) +{ + namespace VectorTools \{ + template + void subtract_mean_value(VEC &, const std::vector &); + \} +} diff --git a/deal.II/source/numerics/vector_tools_point_value.cc b/deal.II/source/numerics/vector_tools_point_value.cc new file mode 100644 index 0000000000..e5a0c30edd --- /dev/null +++ b/deal.II/source/numerics/vector_tools_point_value.cc @@ -0,0 +1,25 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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. +// +// --------------------------------------------------------------------- + + +#include + +DEAL_II_NAMESPACE_OPEN + +// ---------------------------- explicit instantiations -------------------- +#include "vector_tools_point_value.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/numerics/vector_tools_point_value.inst.in b/deal.II/source/numerics/vector_tools_point_value.inst.in new file mode 100644 index 0000000000..8dd47f73e0 --- /dev/null +++ b/deal.II/source/numerics/vector_tools_point_value.inst.in @@ -0,0 +1,165 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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. +// +// --------------------------------------------------------------------- + + +//TODO[SP]: replace by +// where applicable and move to codimension cases above also when applicable +for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) + { +#if deal_II_dimension == deal_II_space_dimension + + namespace VectorTools \{ + + template + void point_value ( + const hp::DoFHandler&, + const VEC&, + const Point&, + Vector&); + + template + double point_value ( + const hp::DoFHandler&, + const VEC&, + const Point&); + + template + void point_value ( + const hp::MappingCollection&, + const hp::DoFHandler&, + const VEC&, + const Point&, + Vector&); + + template + double point_value ( + const hp::MappingCollection&, + const hp::DoFHandler&, + const VEC&, + const Point&); + + template + void point_difference ( + const DoFHandler&, + const VEC&, + const Function&, + Vector&, + const Point&); + + template + void point_difference ( + const Mapping&, + const DoFHandler&, + const VEC&, + const Function&, + Vector&, + const Point&); + + template + void point_value ( + const DoFHandler&, + const VEC&, + const Point&, + Vector&); + + template + double point_value ( + const DoFHandler&, + const VEC&, + const Point&); + + template + void point_value ( + const Mapping&, + const DoFHandler&, + const VEC&, + const Point&, + Vector&); + + template + double point_value ( + const Mapping&, + const DoFHandler&, + const VEC&, + const Point&); + + \} +#endif + } + + + +//TODO[SP]: replace by +// where applicable and move to codimension cases above also when applicable +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) + { + namespace VectorTools \{ + +#if deal_II_dimension == deal_II_space_dimension + + template + void create_point_source_vector + (const Mapping &, + const DoFHandler &, + const Point &, + Vector &); + template + void create_point_source_vector + (const DoFHandler &, + const Point &, + Vector &); + + template + void create_point_source_vector + (const hp::MappingCollection &, + const hp::DoFHandler &, + const Point &, + Vector &); + template + void create_point_source_vector + (const hp::DoFHandler &, + const Point &, + Vector &); + template + void create_point_source_vector + (const Mapping &, + const DoFHandler &, + const Point &, + const Point &, + Vector &); + template + void create_point_source_vector + (const DoFHandler &, + const Point &, + const Point &, + Vector &); + + template + void create_point_source_vector + (const hp::MappingCollection &, + const hp::DoFHandler &, + const Point &, + const Point &, + Vector &); + template + void create_point_source_vector + (const hp::DoFHandler &, + const Point &, + const Point &, + Vector &); +#endif + \} + } diff --git a/deal.II/source/numerics/vector_tools.cc b/deal.II/source/numerics/vector_tools_project.cc similarity index 95% rename from deal.II/source/numerics/vector_tools.cc rename to deal.II/source/numerics/vector_tools_project.cc index fe9539c1d0..cd5ba6fb7a 100644 --- a/deal.II/source/numerics/vector_tools.cc +++ b/deal.II/source/numerics/vector_tools_project.cc @@ -20,6 +20,6 @@ DEAL_II_NAMESPACE_OPEN // ---------------------------- explicit instantiations -------------------- -#include "vector_tools.inst" +#include "vector_tools_project.inst" DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/numerics/vector_tools_project.inst.in b/deal.II/source/numerics/vector_tools_project.inst.in new file mode 100644 index 0000000000..3dc5d6b3e9 --- /dev/null +++ b/deal.II/source/numerics/vector_tools_project.inst.in @@ -0,0 +1,70 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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 (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) + { +#if deal_II_dimension <= deal_II_space_dimension + namespace VectorTools \{ + + template + void project + (const Mapping &, + const DoFHandler &, + const ConstraintMatrix &, + const Quadrature &, + const Function &, + VEC &, + const bool, + const Quadrature &, + const bool); + + template + void project + (const DoFHandler &, + const ConstraintMatrix &, + const Quadrature &, + const Function &, + VEC &, + const bool, + const Quadrature &, + const bool); + + template + void project + (const hp::MappingCollection &, + const hp::DoFHandler &, + const ConstraintMatrix &, + const hp::QCollection &, + const Function &, + VEC &, + const bool, + const hp::QCollection &, + const bool); + + template + void project + (const hp::DoFHandler &, + const ConstraintMatrix &, + const hp::QCollection &, + const Function &, + VEC &, + const bool, + const hp::QCollection &, + const bool); + \} +#endif + } diff --git a/deal.II/source/numerics/vector_tools_rhs.cc b/deal.II/source/numerics/vector_tools_rhs.cc new file mode 100644 index 0000000000..cb12d608e1 --- /dev/null +++ b/deal.II/source/numerics/vector_tools_rhs.cc @@ -0,0 +1,86 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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. +// +// --------------------------------------------------------------------- + + +#include + +DEAL_II_NAMESPACE_OPEN + + +namespace VectorTools +{ + +// separate implementation for 1D because otherwise we get linker errors since +// (hp::)FEFaceValues<1> is not compiled + template <> + void + create_boundary_right_hand_side (const Mapping<1,1> &, + const DoFHandler<1,1> &, + const Quadrature<0> &, + const Function<1> &, + Vector &, + const std::set &) + { + Assert (false, ExcImpossibleInDim(1)); + } + + + + template <> + void + create_boundary_right_hand_side (const Mapping<1,2> &, + const DoFHandler<1,2> &, + const Quadrature<0> &, + const Function<2> &, + Vector &, + const std::set &) + { + Assert (false, ExcImpossibleInDim(1)); + } + + + + template <> + void + create_boundary_right_hand_side (const hp::MappingCollection<1,1> &, + const hp::DoFHandler<1,1> &, + const hp::QCollection<0> &, + const Function<1> &, + Vector &, + const std::set &) + { + Assert (false, ExcImpossibleInDim(1)); + } + + + + template <> + void + create_boundary_right_hand_side (const hp::MappingCollection<1,2> &, + const hp::DoFHandler<1,2> &, + const hp::QCollection<0> &, + const Function<2> &, + Vector &, + const std::set &) + { + Assert (false, ExcImpossibleInDim(1)); + } +} + +// ---------------------------- explicit instantiations -------------------- +#include "vector_tools_rhs.inst" + +DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/numerics/vector_tools_rhs.inst.in b/deal.II/source/numerics/vector_tools_rhs.inst.in new file mode 100644 index 0000000000..aed42a76ec --- /dev/null +++ b/deal.II/source/numerics/vector_tools_rhs.inst.in @@ -0,0 +1,108 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 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 + namespace VectorTools \{ + template + void create_right_hand_side + (const Mapping &, + const DoFHandler &, + const Quadrature &, + const Function &, + Vector &); + + template + void create_right_hand_side + (const DoFHandler &, + const Quadrature &, + const Function &, + Vector &); + + \} +#endif + } + +//TODO[SP]: replace by +// where applicable and move to codimension cases above also when applicable +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) + { + namespace VectorTools \{ + +#if deal_II_dimension == deal_II_space_dimension + template + void create_right_hand_side + (const hp::MappingCollection &, + const hp::DoFHandler &, + const hp::QCollection &, + const Function &, + Vector &); + + template + void create_right_hand_side + (const hp::DoFHandler &, + const hp::QCollection &, + const Function &, + Vector &); + +#if deal_II_dimension > 1 + template + void + create_boundary_right_hand_side + (const Mapping &, + const DoFHandler &, + const Quadrature &, + const Function &, + Vector &, + const std::set &); +#endif + + template + void + create_boundary_right_hand_side + (const DoFHandler &, + const Quadrature &, + const Function &, + Vector &, + const std::set &); + +#if deal_II_dimension > 1 + template + void + create_boundary_right_hand_side + (const hp::MappingCollection &, + const hp::DoFHandler &, + const hp::QCollection &, + const Function &, + Vector &, + const std::set &); +#endif + + template + void + create_boundary_right_hand_side + (const hp::DoFHandler &, + const hp::QCollection &, + const Function &, + Vector &, + const std::set &); + + +#endif + \} + } -- 2.39.5