From: Wolfgang Bangerth Date: Wed, 28 Jun 2017 01:38:45 +0000 (-0600) Subject: Make coding style more uniform. X-Git-Tag: v9.0.0-rc1~1465^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4555%2Fhead;p=dealii.git Make coding style more uniform. --- diff --git a/examples/step-26/step-26.cc b/examples/step-26/step-26.cc index a8aa054a29..41a9d30436 100644 --- a/examples/step-26/step-26.cc +++ b/examples/step-26/step-26.cc @@ -76,7 +76,7 @@ namespace Step26 // that the refine_mesh function takes arguments for the // minimal and maximal mesh refinement level. The purpose of this is // discussed in the introduction. - template + template class HeatEquation { public: @@ -122,7 +122,7 @@ namespace Step26 // right hand side is chosen as discussed at the end of the // introduction. For boundary values, we choose zero values, but this is // easily changed below. - template + template class RightHandSide : public Function { public: @@ -141,7 +141,7 @@ namespace Step26 - template + template double RightHandSide::value (const Point &p, const unsigned int component) const { @@ -172,7 +172,7 @@ namespace Step26 - template + template class BoundaryValues : public Function { public: @@ -182,7 +182,7 @@ namespace Step26 - template + template double BoundaryValues::value (const Point &/*p*/, const unsigned int component) const { @@ -201,7 +201,7 @@ namespace Step26 // on the right hand side was set to 0.2 above, so we resolve each // period with 100 time steps) and chooses the Crank Nicolson method // by setting $\theta=1/2$. - template + template HeatEquation::HeatEquation () : fe(1), @@ -226,7 +226,7 @@ namespace Step26 // that defaults to an empty object). This is because we are going to // condense the constraints in run() after combining the matrices for the // current time-step. - template + template void HeatEquation::setup_system() { dof_handler.distribute_dofs(fe); @@ -273,7 +273,7 @@ namespace Step26 // // The next function is the one that solves the actual linear system // for a single time step. There is nothing surprising here: - template + template void HeatEquation::solve_time_step() { SolverControl solver_control(1000, 1e-8 * system_rhs.l2_norm()); @@ -296,7 +296,7 @@ namespace Step26 // @sect4{HeatEquation::output_results} // // Neither is there anything new in generating graphical output: - template + template void HeatEquation::output_results() const { DataOut data_out; @@ -440,7 +440,7 @@ namespace Step26 // as here. Instead of trying to justify the occurrence here, // let's first look at the code and we'll come back to the issue // at the end of function. - template + template void HeatEquation::run() { const unsigned int initial_global_refinement = 2; diff --git a/examples/step-34/step-34.cc b/examples/step-34/step-34.cc index af57be39f4..e6b66e28c5 100644 --- a/examples/step-34/step-34.cc +++ b/examples/step-34/step-34.cc @@ -869,7 +869,7 @@ namespace Step34 // as an argument is the index of the unit support point where the // singularity is located. - template<> + template <> const Quadrature<2> &BEMProblem<3>::get_singular_quadrature( const DoFHandler<2,3>::active_cell_iterator &, const unsigned int index) const @@ -887,7 +887,7 @@ namespace Step34 } - template<> + template <> const Quadrature<1> &BEMProblem<2>::get_singular_quadrature( const DoFHandler<1,2>::active_cell_iterator &cell, const unsigned int index) const diff --git a/include/deal.II/base/data_out_base.h b/include/deal.II/base/data_out_base.h index 6feeee4741..b7a2aee1b2 100644 --- a/include/deal.II/base/data_out_base.h +++ b/include/deal.II/base/data_out_base.h @@ -375,7 +375,7 @@ namespace DataOutBase * * @ingroup output */ - template + template struct OutputFlagsBase { /** @@ -406,17 +406,17 @@ namespace DataOutBase }; - template + template void OutputFlagsBase::declare_parameters (ParameterHandler &) {} - template + template void OutputFlagsBase::parse_parameters (const ParameterHandler &) {} - template + template std::size_t OutputFlagsBase::memory_consumption () const { return sizeof(FlagsType); @@ -1207,13 +1207,13 @@ namespace DataOutBase * the point already exists and we are filtering redundant values, the * provided index will internally refer to another recorded point. */ - template + template void write_point(const unsigned int &index, const Point &p); /** * Record a deal.II cell in the internal reordered format. */ - template + template void write_cell(unsigned int index, unsigned int start, unsigned int d1, unsigned int d2, unsigned int d3); /** @@ -2482,7 +2482,7 @@ public: * Set the flags to be used for output. This method expects flags * to be a member of one of the child classes of OutputFlagsBase. */ - template + template void set_flags (const FlagType &flags); diff --git a/include/deal.II/base/function_lib.h b/include/deal.II/base/function_lib.h index 0274ef1713..46859929ff 100644 --- a/include/deal.II/base/function_lib.h +++ b/include/deal.II/base/function_lib.h @@ -48,7 +48,7 @@ namespace Functions * @ingroup functions * @author: Guido Kanschat, 1999 */ - template + template class SquareFunction : public Function { public: @@ -82,7 +82,7 @@ namespace Functions * @ingroup functions * @author: Guido Kanschat, 2000 */ - template + template class Q1WedgeFunction : public Function { public: @@ -137,7 +137,7 @@ namespace Functions * @ingroup functions * @author: Guido Kanschat, 1999 */ - template + template class PillowFunction : public Function { public: @@ -199,7 +199,7 @@ namespace Functions * @ingroup functions * @author Guido Kanschat, 1999 */ - template + template class CosineFunction : public Function { public: @@ -260,7 +260,7 @@ namespace Functions * @ingroup functions * @author Guido Kanschat, 2010 */ - template + template class CosineGradFunction : public Function { public: @@ -302,7 +302,7 @@ namespace Functions * @ingroup functions * @author Guido Kanschat, 1999 */ - template + template class ExpFunction : public Function { public: @@ -527,7 +527,7 @@ namespace Functions * @ingroup functions * @author: Guido Kanschat, 2000 */ - template + template class JumpFunction : public Function { public: @@ -888,7 +888,7 @@ namespace Functions * @ingroup functions * @author Guido Kanschat, 2001, 2002 */ - template + template class CutOffFunctionLinfty : public CutOffFunctionBase { public: @@ -933,7 +933,7 @@ namespace Functions * @ingroup functions * @author Guido Kanschat, 2001, 2002 */ - template + template class CutOffFunctionW1 : public CutOffFunctionBase { public: @@ -980,7 +980,7 @@ namespace Functions * @ingroup functions * @author Guido Kanschat, 2001, 2002 */ - template + template class CutOffFunctionCinfty : public CutOffFunctionBase { public: diff --git a/include/deal.II/base/function_time.h b/include/deal.II/base/function_time.h index 1c80ddd2ca..7829fde73f 100644 --- a/include/deal.II/base/function_time.h +++ b/include/deal.II/base/function_time.h @@ -111,7 +111,7 @@ private: #ifndef DOXYGEN -template +template inline Number FunctionTime::get_time () const { diff --git a/include/deal.II/base/function_time.templates.h b/include/deal.II/base/function_time.templates.h index 5ec72ad4c5..6c42d87f4f 100644 --- a/include/deal.II/base/function_time.templates.h +++ b/include/deal.II/base/function_time.templates.h @@ -21,7 +21,7 @@ DEAL_II_NAMESPACE_OPEN -template +template FunctionTime::FunctionTime(const Number initial_time) : time(initial_time) @@ -29,13 +29,13 @@ FunctionTime::FunctionTime(const Number initial_time) -template +template FunctionTime::~FunctionTime() {} -template +template void FunctionTime::set_time (const Number new_time) { @@ -43,7 +43,7 @@ FunctionTime::set_time (const Number new_time) } -template +template void FunctionTime::advance_time (const Number delta_t) { diff --git a/include/deal.II/base/memory_consumption.h b/include/deal.II/base/memory_consumption.h index 94d3ee412c..e22d428a99 100644 --- a/include/deal.II/base/memory_consumption.h +++ b/include/deal.II/base/memory_consumption.h @@ -237,7 +237,7 @@ namespace MemoryConsumption * @note This returns the size of the pointer, not the size of the object * pointed to. */ - template + template inline std::size_t memory_consumption (const T *const); @@ -388,7 +388,7 @@ namespace MemoryConsumption - template + template inline std::size_t memory_consumption(const T *const) diff --git a/include/deal.II/base/mg_level_object.h b/include/deal.II/base/mg_level_object.h index 1f8d689af7..cf632d0a58 100644 --- a/include/deal.II/base/mg_level_object.h +++ b/include/deal.II/base/mg_level_object.h @@ -43,7 +43,7 @@ DEAL_II_NAMESPACE_OPEN * @ingroup data * @author Wolfgang Bangerth, Guido Kanschat, 1999, 2005, 2010 */ -template +template class MGLevelObject : public Subscriptor { public: @@ -157,7 +157,7 @@ private: /* ------------------------------------------------------------------- */ -template +template MGLevelObject::MGLevelObject(const unsigned int min, const unsigned int max) : @@ -167,7 +167,7 @@ MGLevelObject::MGLevelObject(const unsigned int min, } -template +template Object & MGLevelObject::operator[] (const unsigned int i) { @@ -177,7 +177,7 @@ MGLevelObject::operator[] (const unsigned int i) } -template +template const Object & MGLevelObject::operator[] (const unsigned int i) const { @@ -187,7 +187,7 @@ MGLevelObject::operator[] (const unsigned int i) const } -template +template void MGLevelObject::resize (const unsigned int new_minlevel, const unsigned int new_maxlevel) @@ -205,7 +205,7 @@ MGLevelObject::resize (const unsigned int new_minlevel, } -template +template MGLevelObject & MGLevelObject::operator = (const double d) { @@ -216,7 +216,7 @@ MGLevelObject::operator = (const double d) } -template +template void MGLevelObject::clear () // DEPRECATED { @@ -225,7 +225,7 @@ MGLevelObject::clear () // DEPRECATED } -template +template void MGLevelObject::clear_elements () { @@ -235,7 +235,7 @@ MGLevelObject::clear_elements () } -template +template unsigned int MGLevelObject::min_level () const { @@ -243,7 +243,7 @@ MGLevelObject::min_level () const } -template +template unsigned int MGLevelObject::max_level () const { @@ -251,7 +251,7 @@ MGLevelObject::max_level () const } -template +template std::size_t MGLevelObject::memory_consumption () const { diff --git a/include/deal.II/base/point.h b/include/deal.II/base/point.h index 8b20afef3b..2e96652a7b 100644 --- a/include/deal.II/base/point.h +++ b/include/deal.II/base/point.h @@ -430,7 +430,7 @@ Point::operator - () const template -template +template inline Point::type>::type> Point::operator * (const OtherNumber factor) const @@ -444,7 +444,7 @@ Point::operator * (const OtherNumber factor) const template -template +template inline Point::type>::type> Point::operator / (const OtherNumber factor) const diff --git a/include/deal.II/base/polynomial_space.h b/include/deal.II/base/polynomial_space.h index a8964e8fbc..5ce23ebd8e 100644 --- a/include/deal.II/base/polynomial_space.h +++ b/include/deal.II/base/polynomial_space.h @@ -280,7 +280,7 @@ PolynomialSpace::PolynomialSpace (const std::vector &pols) } -template +template inline unsigned int PolynomialSpace::n() const @@ -290,7 +290,7 @@ PolynomialSpace::n() const -template +template inline unsigned int PolynomialSpace::degree() const diff --git a/include/deal.II/base/quadrature.h b/include/deal.II/base/quadrature.h index 46daf6715e..f1869b6c12 100644 --- a/include/deal.II/base/quadrature.h +++ b/include/deal.II/base/quadrature.h @@ -325,7 +325,7 @@ private: // ------------------- inline and template functions ---------------- -template +template inline unsigned int Quadrature::size () const diff --git a/include/deal.II/base/quadrature_point_data.h b/include/deal.II/base/quadrature_point_data.h index cb1299d8e2..715150f097 100644 --- a/include/deal.II/base/quadrature_point_data.h +++ b/include/deal.II/base/quadrature_point_data.h @@ -86,7 +86,7 @@ public: * @pre The type @p T needs to either equal @p DataType, or be a class derived * from @p DataType. @p T needs to be default constructible. */ - template + template void initialize(const CellIteratorType &cell, const unsigned int number_of_data_points_per_cell); @@ -95,7 +95,7 @@ public: * until, but not including, @p cell_end for all locally owned cells, i.e. * for which `cell->is_locally_owned()==true` . */ - template + template void initialize(const CellIteratorType &cell_start, const CellIteratorType &cell_end, const unsigned int number_of_data_points_per_cell); @@ -126,7 +126,7 @@ public: * * @pre The type @p T needs to match the class provided to initialize() . */ - template + template std::vector > get_data(const CellIteratorType &cell); /** @@ -139,7 +139,7 @@ public: * * @pre The type @p T needs to match the class provided to initialize() . */ - template + template std::vector > get_data(const CellIteratorType &cell) const; private: @@ -496,7 +496,7 @@ CellDataStorage:: template -template +template void CellDataStorage::initialize(const CellIteratorType &cell, const unsigned int n_q_points) { @@ -517,7 +517,7 @@ void CellDataStorage::initialize(const CellIteratorTy template -template +template void CellDataStorage::initialize(const CellIteratorType &cell_start, const CellIteratorType &cell_end, const unsigned int number) @@ -623,7 +623,7 @@ CellDataStorage::get_data(const CellIteratorType &cel * whereas the second index represents different values stored at each * quadrature point in the DataType class. */ -template +template void pack_cell_data (const CellIteratorType &cell, const CellDataStorage *data_storage, @@ -656,7 +656,7 @@ void pack_cell_data /* * the opposite of the pack function above. */ -template +template void unpack_to_cell_data (const CellIteratorType &cell, const FullMatrix &values_at_qp, @@ -688,7 +688,7 @@ namespace parallel { namespace distributed { - template + template ContinuousQuadratureDataTransfer::ContinuousQuadratureDataTransfer (const FiniteElement &projection_fe_, const Quadrature &lhs_quadrature, @@ -720,13 +720,13 @@ namespace parallel - template + template ContinuousQuadratureDataTransfer::~ContinuousQuadratureDataTransfer() {} - template + template void ContinuousQuadratureDataTransfer::prepare_for_coarsening_and_refinement (parallel::distributed::Triangulation &tr_, CellDataStorage &data_storage_) @@ -767,7 +767,7 @@ namespace parallel - template + template void ContinuousQuadratureDataTransfer::interpolate () { triangulation->notify_ready_to_unpack(offset, @@ -784,7 +784,7 @@ namespace parallel - template + template void ContinuousQuadratureDataTransfer::pack_function (const typename parallel::distributed::Triangulation::cell_iterator &cell, const typename parallel::distributed::Triangulation::CellStatus /*status*/, @@ -802,7 +802,7 @@ namespace parallel - template + template void ContinuousQuadratureDataTransfer:: unpack_function (const typename parallel::distributed::Triangulation::cell_iterator &cell, const typename parallel::distributed::Triangulation::CellStatus status, diff --git a/include/deal.II/base/quadrature_selector.h b/include/deal.II/base/quadrature_selector.h index 025dc07f14..3316963106 100644 --- a/include/deal.II/base/quadrature_selector.h +++ b/include/deal.II/base/quadrature_selector.h @@ -36,7 +36,7 @@ DEAL_II_NAMESPACE_OPEN * @ingroup Quadrature * @author Ralf Schulz, 2003 */ -template +template class QuadratureSelector : public Quadrature { public: diff --git a/include/deal.II/base/smartpointer.h b/include/deal.II/base/smartpointer.h index 4c8e5fadfa..4be387daad 100644 --- a/include/deal.II/base/smartpointer.h +++ b/include/deal.II/base/smartpointer.h @@ -59,7 +59,7 @@ DEAL_II_NAMESPACE_OPEN * @ingroup memory * @author Guido Kanschat, Wolfgang Bangerth, 1998 - 2009 */ -template +template class SmartPointer { public: diff --git a/include/deal.II/base/table.h b/include/deal.II/base/table.h index 17289b48f2..f8fef1f735 100644 --- a/include/deal.II/base/table.h +++ b/include/deal.II/base/table.h @@ -471,7 +471,7 @@ public: * This function requires that the type T2 is convertible to * T. */ - template + template TableBase &operator = (const TableBase &src); /** diff --git a/include/deal.II/base/table_handler.h b/include/deal.II/base/table_handler.h index cc79e2c0fa..79d68ae21a 100644 --- a/include/deal.II/base/table_handler.h +++ b/include/deal.II/base/table_handler.h @@ -600,7 +600,7 @@ protected: */ template void save(Archive &ar, const unsigned int version) const; - template + template void load(Archive &ar, const unsigned int version); BOOST_SERIALIZATION_SPLIT_MEMBER() @@ -908,7 +908,7 @@ TableHandler::Column::save(Archive &ar, const unsigned int /*version*/) const -template +template void TableHandler::Column::load(Archive &ar, const unsigned int /*version*/) { diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index 58748bae72..a34599104e 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -181,25 +181,25 @@ public: /** * Test for equality of two tensors. */ - template + template bool operator == (const Tensor<0,dim,OtherNumber> &rhs) const; /** * Test for inequality of two tensors. */ - template + template bool operator != (const Tensor<0,dim,OtherNumber> &rhs) const; /** * Add another scalar */ - template + template Tensor<0,dim,Number> &operator += (const Tensor<0,dim,OtherNumber> &rhs); /** * Subtract another scalar. */ - template + template Tensor<0,dim,Number> &operator -= (const Tensor<0,dim,OtherNumber> &rhs); /** @@ -207,13 +207,13 @@ public: * * @ingroup CUDAWrappers */ - template + template DEAL_II_CUDA_HOST_DEV Tensor<0,dim,Number> &operator *= (const OtherNumber factor); /** * Divide the scalar by factor. */ - template + template Tensor<0,dim,Number> &operator /= (const OtherNumber factor); /** @@ -1619,9 +1619,9 @@ scalar_product (const Tensor &left, * @relates Tensor * @author Matthias Maier, 2015, Jean-Paul Pelteret 2017 */ -template class TensorT1, - template class TensorT2, - template class TensorT3, +template