From: Wolfgang Bangerth Date: Wed, 23 Aug 2017 02:15:10 +0000 (-0600) Subject: Consistently use 'template <...' with a space. X-Git-Tag: v9.0.0-rc1~1184^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4936%2Fhead;p=dealii.git Consistently use 'template <...' with a space. --- diff --git a/include/deal.II/base/function.h b/include/deal.II/base/function.h index b0b82a1992..0d4db6aaec 100644 --- a/include/deal.II/base/function.h +++ b/include/deal.II/base/function.h @@ -454,7 +454,7 @@ namespace Functions * * @deprecated use Functions::ConstantFunction instead. */ -template +template using ConstantFunction DEAL_II_DEPRECATED = Functions::ConstantFunction; /** @@ -462,7 +462,7 @@ using ConstantFunction DEAL_II_DEPRECATED = Functions::ConstantFunction +template using ZeroFunction DEAL_II_DEPRECATED = Functions::ZeroFunction; diff --git a/include/deal.II/base/mg_level_object.h b/include/deal.II/base/mg_level_object.h index b0ec4232f5..f92c39ea56 100644 --- a/include/deal.II/base/mg_level_object.h +++ b/include/deal.II/base/mg_level_object.h @@ -263,7 +263,7 @@ MGLevelObject::max_level () const return minlevel + objects.size() - 1; } -template +template template void MGLevelObject::apply (ActionFunctionObjectType action) diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index a0e5a6eb95..18f17d1855 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -62,7 +62,7 @@ namespace internal * Compute the inverse of a symmetric tensor of a * generic @p rank, @p dim and @p Number type. */ - template + template struct Inverse; } @@ -568,7 +568,7 @@ public: * symmetrize function first. If you aren't sure, it is good * practice to check before calling symmetrize. */ - template + template explicit SymmetricTensor (const Tensor<2,dim,OtherNumber> &t); @@ -684,7 +684,7 @@ public: * as this operator, but rather than returning the result as a return value, * they write it into the first argument to the function. */ - template + template typename internal::SymmetricTensorAccessors::double_contraction_result::type operator * (const SymmetricTensor<2,dim,OtherNumber> &s) const; @@ -692,7 +692,7 @@ public: * Contraction over two indices of the present object with the rank-4 * symmetric tensor given as argument. */ - template + template typename internal::SymmetricTensorAccessors::double_contraction_result::type operator * (const SymmetricTensor<4,dim,OtherNumber> &s) const; @@ -948,7 +948,7 @@ SymmetricTensor::SymmetricTensor () template -template +template inline SymmetricTensor::SymmetricTensor (const Tensor<2,dim,OtherNumber> &t) { @@ -1094,7 +1094,7 @@ namespace internal } - template + template struct Inverse<2,1,Number> { static inline dealii::SymmetricTensor<2,1,Number> @@ -1109,7 +1109,7 @@ namespace internal }; - template + template struct Inverse<2,2,Number> { static inline dealii::SymmetricTensor<2,2,Number> @@ -1136,7 +1136,7 @@ namespace internal }; - template + template struct Inverse<2,3,Number> { static dealii::SymmetricTensor<2,3,Number> @@ -1179,7 +1179,7 @@ namespace internal }; - template + template struct Inverse<4,1,Number> { static inline dealii::SymmetricTensor<4,1,Number> @@ -1192,7 +1192,7 @@ namespace internal }; - template + template struct Inverse<4,2,Number> { static inline dealii::SymmetricTensor<4,2,Number> @@ -1254,7 +1254,7 @@ namespace internal }; - template + template struct Inverse<4,3,Number> { static dealii::SymmetricTensor<4,3,Number> @@ -1596,7 +1596,7 @@ namespace internal template -template +template inline typename internal::SymmetricTensorAccessors::double_contraction_result::type SymmetricTensor::operator * (const SymmetricTensor<2,dim,OtherNumber> &s) const @@ -1611,7 +1611,7 @@ SymmetricTensor::operator * (const SymmetricTensor<2,dim,OtherN template -template +template inline typename internal::SymmetricTensorAccessors::double_contraction_result::type SymmetricTensor::operator * (const SymmetricTensor<4,dim,OtherNumber> &s) const @@ -2956,7 +2956,7 @@ namespace internal * A struct that is used to sort arrays of pairs of eign=envalues and * eigenvectors. Sorting is performed in in descending order of eigenvalue. */ - template + template struct SortEigenValuesVectors { typedef std::pair > EigValsVecs; diff --git a/include/deal.II/base/template_constraints.h b/include/deal.II/base/template_constraints.h index 908d85e12d..6171fd5ab3 100644 --- a/include/deal.II/base/template_constraints.h +++ b/include/deal.II/base/template_constraints.h @@ -28,7 +28,7 @@ DEAL_II_NAMESPACE_OPEN namespace { // helper struct for is_base_of_all - template struct BoolStorage; + template struct BoolStorage; } /** @@ -37,7 +37,7 @@ namespace * classes have Base as base class or are Base itself. The result * is stored in the member variable value. */ -template +template struct is_base_of_all { static constexpr bool value = diff --git a/include/deal.II/hp/fe_collection.h b/include/deal.II/hp/fe_collection.h index abde512ee2..d913b137fc 100644 --- a/include/deal.II/hp/fe_collection.h +++ b/include/deal.II/hp/fe_collection.h @@ -72,7 +72,7 @@ namespace hp * Constructor. This constructor creates a FECollection from more than * one finite element. */ - template + template explicit FECollection (const FETypes &... fes); /** diff --git a/include/deal.II/lac/full_matrix.templates.h b/include/deal.II/lac/full_matrix.templates.h index 9b205ff226..a12020cf4b 100644 --- a/include/deal.II/lac/full_matrix.templates.h +++ b/include/deal.II/lac/full_matrix.templates.h @@ -1171,7 +1171,7 @@ namespace internal { // LAPACKFullMatrix is not implemented for // complex numbers or long doubles - template + template struct Determinant { static number value (const FullMatrix &) @@ -1184,7 +1184,7 @@ namespace internal // LAPACKFullMatrix is only implemented for // floats and doubles - template + template struct Determinant::value || std::is_same::value diff --git a/include/deal.II/lac/solver_fire.h b/include/deal.II/lac/solver_fire.h index 99873e4c21..6a822847e1 100644 --- a/include/deal.II/lac/solver_fire.h +++ b/include/deal.II/lac/solver_fire.h @@ -85,7 +85,7 @@ DEAL_II_NAMESPACE_OPEN * * @author Vishal Boddu, Denis Davydov, 2017 */ -template > +template > class SolverFIRE : public Solver { @@ -151,7 +151,7 @@ public: * passed in as first argument based on the second argument-- the state of * variables. */ - template> + template > void solve (const std::function &compute, VectorType &x, @@ -162,7 +162,7 @@ public: * when $E(\mathbf x) * = \frac{1}{2} \mathbf x^{T} \mathbf A \mathbf x - \mathbf x^{T} \mathbf b$. */ - template + template void solve (const MatrixType &A, VectorType &x, const VectorType &b, @@ -194,7 +194,7 @@ protected: #ifndef DOXYGEN -template +template SolverFIRE::AdditionalData:: AdditionalData (const double initial_timestep, const double maximum_timestep, @@ -214,7 +214,7 @@ AdditionalData (const double initial_timestep, -template +template SolverFIRE:: SolverFIRE (SolverControl &solver_control, VectorMemory &vector_memory, @@ -226,7 +226,7 @@ SolverFIRE (SolverControl &solver_control, -template +template SolverFIRE:: SolverFIRE (SolverControl &solver_control, const AdditionalData &data ) @@ -237,14 +237,14 @@ SolverFIRE (SolverControl &solver_control, -template +template SolverFIRE::~SolverFIRE() {} -template -template +template +template void SolverFIRE::solve (const std::function &compute, @@ -373,7 +373,7 @@ SolverFIRE::solve template -template +template void SolverFIRE::solve (const MatrixType &A, VectorType &x, const VectorType &b, diff --git a/include/deal.II/non_matching/immersed_surface_quadrature.h b/include/deal.II/non_matching/immersed_surface_quadrature.h index ffa4f3a172..f14084b809 100644 --- a/include/deal.II/non_matching/immersed_surface_quadrature.h +++ b/include/deal.II/non_matching/immersed_surface_quadrature.h @@ -70,7 +70,7 @@ namespace NonMatching * * @author Simon Sticko, 2017 */ - template + template class ImmersedSurfaceQuadrature : public Quadrature { public: diff --git a/include/deal.II/numerics/kdtree.h b/include/deal.II/numerics/kdtree.h index 8736566471..d87cde2156 100644 --- a/include/deal.II/numerics/kdtree.h +++ b/include/deal.II/numerics/kdtree.h @@ -62,7 +62,7 @@ DEAL_II_NAMESPACE_OPEN * * @author Luca Heltai, 2017. */ -template +template class KDTree { public: @@ -239,7 +239,7 @@ private: //------------ inline functions ------------- #ifndef DOXYGEN -template +template inline unsigned int KDTree::size() const { @@ -251,7 +251,7 @@ unsigned int KDTree::size() const -template +template inline const Point & KDTree::operator[](unsigned int i) const { @@ -261,14 +261,14 @@ KDTree::operator[](unsigned int i) const -template +template KDTree::PointCloudAdaptor::PointCloudAdaptor(const std::vector > &_points) : points(_points) {} -template +template inline size_t KDTree::PointCloudAdaptor::kdtree_get_point_count() const { @@ -277,7 +277,7 @@ KDTree::PointCloudAdaptor::kdtree_get_point_count() const -template +template inline double KDTree::PointCloudAdaptor::kdtree_get_pt(const size_t idx, int d) const { @@ -287,7 +287,7 @@ KDTree::PointCloudAdaptor::kdtree_get_pt(const size_t idx, int d) const -template +template template inline bool KDTree::PointCloudAdaptor::kdtree_get_bbox(BBOX &) const @@ -297,7 +297,7 @@ KDTree::PointCloudAdaptor::kdtree_get_bbox(BBOX &) const -template +template inline double KDTree::PointCloudAdaptor::kdtree_distance(const double *p1, const size_t idx_p2,size_t size) const { diff --git a/source/non_matching/immersed_surface_quadrature.cc b/source/non_matching/immersed_surface_quadrature.cc index f130b016e8..23fd0df780 100644 --- a/source/non_matching/immersed_surface_quadrature.cc +++ b/source/non_matching/immersed_surface_quadrature.cc @@ -19,7 +19,7 @@ DEAL_II_NAMESPACE_OPEN namespace NonMatching { - template + template ImmersedSurfaceQuadrature::ImmersedSurfaceQuadrature( const std::vector > &points, const std::vector &weights, @@ -39,7 +39,7 @@ namespace NonMatching - template + template void ImmersedSurfaceQuadrature::push_back( const Point &point, const double weight, @@ -54,7 +54,7 @@ namespace NonMatching - template + template const Tensor<1,dim> & ImmersedSurfaceQuadrature::normal_vector( const unsigned int i) const @@ -65,7 +65,7 @@ namespace NonMatching - template + template const std::vector > & ImmersedSurfaceQuadrature::get_normal_vectors() const { diff --git a/source/numerics/kdtree.cc b/source/numerics/kdtree.cc index 39676cd654..ee6228bc72 100644 --- a/source/numerics/kdtree.cc +++ b/source/numerics/kdtree.cc @@ -7,7 +7,7 @@ DEAL_II_NAMESPACE_OPEN -template +template KDTree::KDTree(const unsigned int &max_leaf_size, const std::vector > &pts) : max_leaf_size(max_leaf_size) @@ -17,7 +17,7 @@ KDTree::KDTree(const unsigned int &max_leaf_size, } -template +template std::vector > KDTree::get_points_within_ball(const Point ¢er, const double &radius, bool sorted) const @@ -35,7 +35,7 @@ std::vector > KDTree::get_points_within_bal return matches; } -template +template std::vector > KDTree::get_closest_points(const Point &target, const unsigned int n_points) const { @@ -51,7 +51,7 @@ std::vector > KDTree::get_closest_points(co return matches; } -template +template void KDTree::set_points(const std::vector > &pts) { Assert(pts.size() > 0, ExcMessage("Expecting a non zero set of points.")); diff --git a/tests/base/pattern_tools_01.cc b/tests/base/pattern_tools_01.cc index ca71c1e83f..a4d290028c 100644 --- a/tests/base/pattern_tools_01.cc +++ b/tests/base/pattern_tools_01.cc @@ -27,7 +27,7 @@ using namespace Patterns::Tools; // Try conversion on elementary types -template +template void test(T t) { auto p = Convert::to_pattern(); diff --git a/tests/base/pattern_tools_02.cc b/tests/base/pattern_tools_02.cc index df9b19ad51..7398aff8a3 100644 --- a/tests/base/pattern_tools_02.cc +++ b/tests/base/pattern_tools_02.cc @@ -27,7 +27,7 @@ using namespace Patterns::Tools; // Try conversion on non elementary types -template +template void test(T t) { auto p = Convert::to_pattern(); diff --git a/tests/base/pattern_tools_03.cc b/tests/base/pattern_tools_03.cc index 311edf0eb3..4a6996c990 100644 --- a/tests/base/pattern_tools_03.cc +++ b/tests/base/pattern_tools_03.cc @@ -27,7 +27,7 @@ using namespace Patterns::Tools; // Try conversion on container types -template +template void test(T t) { auto p = Convert::to_pattern(); diff --git a/tests/base/pattern_tools_04.cc b/tests/base/pattern_tools_04.cc index e46f6acc6d..86a0b92ceb 100644 --- a/tests/base/pattern_tools_04.cc +++ b/tests/base/pattern_tools_04.cc @@ -27,7 +27,7 @@ using namespace Patterns::Tools; // Try conversion on map types -template +template void test(T t) { auto p = Convert::to_pattern(); diff --git a/tests/base/pattern_tools_05.cc b/tests/base/pattern_tools_05.cc index 4a78f744f7..7cb1ae161b 100644 --- a/tests/base/pattern_tools_05.cc +++ b/tests/base/pattern_tools_05.cc @@ -27,7 +27,7 @@ using namespace Patterns::Tools; // Try conversion on complex map types -template +template void test(T t) { auto p = Convert::to_pattern(); diff --git a/tests/base/pattern_tools_06.cc b/tests/base/pattern_tools_06.cc index 42d0914c07..50e9940127 100644 --- a/tests/base/pattern_tools_06.cc +++ b/tests/base/pattern_tools_06.cc @@ -27,7 +27,7 @@ using namespace Patterns::Tools; // Try conversion on complex map types -template +template void test(T t) { auto p = Convert::to_pattern(); diff --git a/tests/base/pattern_tools_07.cc b/tests/base/pattern_tools_07.cc index d50d17b8b6..c7237b8940 100644 --- a/tests/base/pattern_tools_07.cc +++ b/tests/base/pattern_tools_07.cc @@ -27,7 +27,7 @@ using namespace Patterns::Tools; // Try conversion on arbitrary container types -template +template void test(T t) { auto p = Convert::to_pattern(); diff --git a/tests/base/patterns_05.cc b/tests/base/patterns_05.cc index fb0afff76a..538a8cfe08 100644 --- a/tests/base/patterns_05.cc +++ b/tests/base/patterns_05.cc @@ -25,7 +25,7 @@ using namespace Patterns::Tools; // Try conversion on elementary types -template +template void test(T t, std::string s) { auto p = Convert::to_pattern(); diff --git a/tests/base/symmetric_tensor_40.cc b/tests/base/symmetric_tensor_40.cc index f000fcc42a..4a58f7f2da 100644 --- a/tests/base/symmetric_tensor_40.cc +++ b/tests/base/symmetric_tensor_40.cc @@ -39,14 +39,14 @@ check_value (const int dim, const int index, } }; -template +template bool is_unit_vector(const Tensor<1,dim> &v) { return std::abs(v.norm() - 1.0) < 1e-9; } -template +template bool check_orientation(Tensor<1,dim> v1, Tensor<1,dim> v2) diff --git a/tests/base/symmetric_tensor_41.cc b/tests/base/symmetric_tensor_41.cc index 67d4aaae5c..f21864a1c0 100644 --- a/tests/base/symmetric_tensor_41.cc +++ b/tests/base/symmetric_tensor_41.cc @@ -39,14 +39,14 @@ check_value (const int dim, const int index, } }; -template +template bool is_unit_vector(const Tensor<1,dim> &v) { return std::abs(v.norm() - 1.0) < 1e-9; } -template +template bool check_orientation(Tensor<1,dim> v1, Tensor<1,dim> v2, @@ -57,7 +57,7 @@ check_orientation(Tensor<1,dim> v1, return std::abs(std::abs(v1*v2) - 1.0) < tol; } -template +template void check_vector (const int index, const Tensor<1,dim> expected, const Tensor<1,dim> actual, diff --git a/tests/base/symmetric_tensor_44.cc b/tests/base/symmetric_tensor_44.cc index ce61dcd9a2..968d4a7230 100644 --- a/tests/base/symmetric_tensor_44.cc +++ b/tests/base/symmetric_tensor_44.cc @@ -42,8 +42,8 @@ void fill_tensor (Tensor &t) } template class TensorType1, typename NumberType1, - template class TensorType2, typename NumberType2> + template class TensorType1, typename NumberType1, + template class TensorType2, typename NumberType2> void print (const TensorType1<2,dim,NumberType1> &t2, const TensorType2<4,dim,NumberType2> &t4) { @@ -52,8 +52,8 @@ void print (const TensorType1<2,dim,NumberType1> &t2, } template class TensorType1, typename NumberType1, - template class TensorType2, typename NumberType2> + template class TensorType1, typename NumberType1, + template class TensorType2, typename NumberType2> void print (const TensorType1<2,dim,NumberType1> &t2_1, const TensorType2<2,dim,NumberType2> &t2_2, const TensorType1<4,dim,NumberType1> &t4_1, @@ -66,18 +66,18 @@ void print (const TensorType1<2,dim,NumberType1> &t2_1, } -template class TensorType1, - template class TensorType2> +template