From: bangerth Date: Fri, 1 Sep 2006 17:05:59 +0000 (+0000) Subject: Fix a number of problems where we didn't follow our coding standards. Remove one... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fca652a51f2378573deb86a65fbbaefeee0e1d3;p=dealii-svn.git Fix a number of problems where we didn't follow our coding standards. Remove one apparently unused function in grid_reordering_internal.h git-svn-id: https://svn.dealii.org/trunk@13787 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/fe_dgp.h b/deal.II/deal.II/include/fe/fe_dgp.h index 6c863c4032..a1ffce4ac8 100644 --- a/deal.II/deal.II/include/fe/fe_dgp.h +++ b/deal.II/deal.II/include/fe/fe_dgp.h @@ -246,7 +246,7 @@ class FE_DGP : public FE_Poly,dim> * be passed to the constructor of * @p FiniteElementData. */ - static std::vector get_dpo_vector(unsigned int degree); + static std::vector get_dpo_vector (const unsigned int degree); }; /* @} */ diff --git a/deal.II/deal.II/include/fe/fe_dgp_monomial.h b/deal.II/deal.II/include/fe/fe_dgp_monomial.h index 8a0774f27a..9210b66e85 100644 --- a/deal.II/deal.II/include/fe/fe_dgp_monomial.h +++ b/deal.II/deal.II/include/fe/fe_dgp_monomial.h @@ -239,7 +239,7 @@ class FE_DGPMonomial : public FE_Poly,dim> * be passed to the constructor of * @p FiniteElementData. */ - static std::vector get_dpo_vector(unsigned int degree); + static std::vector get_dpo_vector (const unsigned int degree); /** * Initialize the embedding diff --git a/deal.II/deal.II/include/fe/fe_dgp_nonparametric.h b/deal.II/deal.II/include/fe/fe_dgp_nonparametric.h index 30f6c6727f..2c85dbd6d9 100644 --- a/deal.II/deal.II/include/fe/fe_dgp_nonparametric.h +++ b/deal.II/deal.II/include/fe/fe_dgp_nonparametric.h @@ -424,7 +424,7 @@ class FE_DGPNonparametric : public FiniteElement * be passed to the constructor of * @p FiniteElementData. */ - static std::vector get_dpo_vector(unsigned int degree); + static std::vector get_dpo_vector (const unsigned int degree); /** * Given a set of flags indicating diff --git a/deal.II/deal.II/include/fe/fe_dgq.h b/deal.II/deal.II/include/fe/fe_dgq.h index 2f3f252dc2..57f9e5b6ee 100644 --- a/deal.II/deal.II/include/fe/fe_dgq.h +++ b/deal.II/deal.II/include/fe/fe_dgq.h @@ -239,7 +239,7 @@ class FE_DGQ : public FE_Poly,dim> * be passed to the constructor of * @p FiniteElementData. */ - static std::vector get_dpo_vector(unsigned int degree); + static std::vector get_dpo_vector (const unsigned int degree); /** * Compute renumbering for rotation diff --git a/deal.II/deal.II/include/fe/fe_poly_tensor.h b/deal.II/deal.II/include/fe/fe_poly_tensor.h index efd05294a1..787ae1a976 100644 --- a/deal.II/deal.II/include/fe/fe_poly_tensor.h +++ b/deal.II/deal.II/include/fe/fe_poly_tensor.h @@ -120,7 +120,7 @@ class FE_PolyTensor : public FiniteElement * different from @p * fe_data.degree. */ - FE_PolyTensor (unsigned int degree, + FE_PolyTensor (const unsigned int degree, const FiniteElementData &fe_data, const std::vector &restriction_is_additive_flags, const std::vector > &nonzero_components); diff --git a/deal.II/deal.II/include/grid/grid_reordering_internal.h b/deal.II/deal.II/include/grid/grid_reordering_internal.h index 79db53aceb..6c69b7b6b0 100644 --- a/deal.II/deal.II/include/grid/grid_reordering_internal.h +++ b/deal.II/deal.II/include/grid/grid_reordering_internal.h @@ -360,16 +360,6 @@ namespace internal */ bool side_hop (unsigned int &qnum, unsigned int &lsn) const; - - /** - * Sets lsn so that it points - * to the opposite side of - * the current quad (qnum) - * that it was originally - * pointing to. - */ - bool switch_faces (unsigned int &qnum, - unsigned int &lsn) const; /** * A list of enriched diff --git a/deal.II/deal.II/include/grid/tria.h b/deal.II/deal.II/include/grid/tria.h index d3725559d3..033a1430d3 100644 --- a/deal.II/deal.II/include/grid/tria.h +++ b/deal.II/deal.II/include/grid/tria.h @@ -2659,7 +2659,7 @@ class Triangulation : public Subscriptor * Return @p true if the vertex * with this @p index is used. */ - bool vertex_used (unsigned int index) const; + bool vertex_used (const unsigned int index) const; /** * Return a constant reference to diff --git a/deal.II/deal.II/include/multigrid/mg_base.h b/deal.II/deal.II/include/multigrid/mg_base.h index c6366cd46e..89ba51aae3 100644 --- a/deal.II/deal.II/include/multigrid/mg_base.h +++ b/deal.II/deal.II/include/multigrid/mg_base.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -51,31 +51,35 @@ class MGMatrixBase : public Subscriptor * Matrix-vector-multiplication on * a certain level. */ - virtual void vmult(unsigned int level, VECTOR& dst, - const VECTOR& src) const = 0; + virtual void vmult (const unsigned int level, + VECTOR& dst, + const VECTOR& src) const = 0; /** * Adding matrix-vector-multiplication on * a certain level. */ - virtual void vmult_add(unsigned int level, VECTOR& dst, - const VECTOR& src) const = 0; + virtual void vmult_add (const unsigned int level, + VECTOR& dst, + const VECTOR& src) const = 0; /** * Transpose * matrix-vector-multiplication on * a certain level. */ - virtual void Tvmult(unsigned int level, VECTOR& dst, - const VECTOR& src) const = 0; + virtual void Tvmult (const unsigned int level, + VECTOR& dst, + const VECTOR& src) const = 0; /** * Adding transpose * matrix-vector-multiplication on * a certain level. */ - virtual void Tvmult_add(unsigned int level, VECTOR& dst, - const VECTOR& src) const = 0; + virtual void Tvmult_add (const unsigned int level, + VECTOR& dst, + const VECTOR& src) const = 0; }; diff --git a/deal.II/deal.II/include/multigrid/mg_matrix.h b/deal.II/deal.II/include/multigrid/mg_matrix.h index 441ccc11c0..7033be1701 100644 --- a/deal.II/deal.II/include/multigrid/mg_matrix.h +++ b/deal.II/deal.II/include/multigrid/mg_matrix.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2003, 2004, 2005 by the deal.II authors +// Copyright (C) 2003, 2004, 2005, 2006 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -55,31 +55,35 @@ class MGMatrix : public MGMatrixBase * Matrix-vector-multiplication on * a certain level. */ - virtual void vmult(unsigned int level, VECTOR& dst, - const VECTOR& src) const; + virtual void vmult (const unsigned int level, + VECTOR& dst, + const VECTOR& src) const; - /** - * Adding matrix-vector-multiplication on - * a certain level. - */ - virtual void vmult_add(unsigned int level, VECTOR& dst, - const VECTOR& src) const; - - /** - * Transpose - * matrix-vector-multiplication on - * a certain level. - */ - virtual void Tvmult(unsigned int level, VECTOR& dst, - const VECTOR& src) const; - - /** - * Adding transpose - * matrix-vector-multiplication on - * a certain level. - */ - virtual void Tvmult_add(unsigned int level, VECTOR& dst, - const VECTOR& src) const; + /** + * Adding matrix-vector-multiplication on + * a certain level. + */ + virtual void vmult_add (const unsigned int level, + VECTOR& dst, + const VECTOR& src) const; + + /** + * Transpose + * matrix-vector-multiplication on + * a certain level. + */ + virtual void Tvmult (const unsigned int level, + VECTOR& dst, + const VECTOR& src) const; + + /** + * Adding transpose + * matrix-vector-multiplication on + * a certain level. + */ + virtual void Tvmult_add (const unsigned int level, + VECTOR& dst, + const VECTOR& src) const; /** * Memory used by this object. @@ -87,11 +91,11 @@ class MGMatrix : public MGMatrixBase unsigned int memory_consumption () const; -private: - /** - * Pointer to the matrix objects on each level. - */ - SmartPointer > matrix; + private: + /** + * Pointer to the matrix objects on each level. + */ + SmartPointer > matrix; }; @@ -141,37 +145,41 @@ class MGMatrixSelect : public MGMatrixBase > * Matrix-vector-multiplication on * a certain level. */ - virtual void vmult(unsigned int level, Vector& dst, - const Vector& src) const; + virtual void vmult (const unsigned int level, + Vector& dst, + const Vector& src) const; - /** - * Adding matrix-vector-multiplication on - * a certain level. - */ - virtual void vmult_add(unsigned int level, Vector& dst, + /** + * Adding matrix-vector-multiplication on + * a certain level. + */ + virtual void vmult_add (const unsigned int level, + Vector& dst, + const Vector& src) const; + + /** + * Transpose + * matrix-vector-multiplication on + * a certain level. + */ + virtual void Tvmult (const unsigned int level, + Vector& dst, const Vector& src) const; - /** - * Transpose - * matrix-vector-multiplication on - * a certain level. - */ - virtual void Tvmult(unsigned int level, Vector& dst, - const Vector& src) const; - - /** - * Adding transpose - * matrix-vector-multiplication on - * a certain level. - */ - virtual void Tvmult_add(unsigned int level, Vector& dst, - const Vector& src) const; + /** + * Adding transpose + * matrix-vector-multiplication on + * a certain level. + */ + virtual void Tvmult_add (const unsigned int level, + Vector& dst, + const Vector& src) const; private: - /** - * Pointer to the matrix objects on each level. - */ - SmartPointer > matrix; + /** + * Pointer to the matrix objects on each level. + */ + SmartPointer > matrix; /** * Row coordinate of selected block. */ @@ -204,9 +212,9 @@ MGMatrix::set_matrix (MGLevelObject* p) template void -MGMatrix::vmult (unsigned int level, - VECTOR& dst, - const VECTOR& src) const +MGMatrix::vmult (const unsigned int level, + VECTOR& dst, + const VECTOR& src) const { Assert(matrix != 0, ExcNotInitialized()); @@ -217,9 +225,9 @@ MGMatrix::vmult (unsigned int level, template void -MGMatrix::vmult_add (unsigned int level, - VECTOR& dst, - const VECTOR& src) const +MGMatrix::vmult_add (const unsigned int level, + VECTOR& dst, + const VECTOR& src) const { Assert(matrix != 0, ExcNotInitialized()); @@ -230,9 +238,9 @@ MGMatrix::vmult_add (unsigned int level, template void -MGMatrix::Tvmult (unsigned int level, - VECTOR& dst, - const VECTOR& src) const +MGMatrix::Tvmult (const unsigned int level, + VECTOR& dst, + const VECTOR& src) const { Assert(matrix != 0, ExcNotInitialized()); @@ -243,9 +251,9 @@ MGMatrix::Tvmult (unsigned int level, template void -MGMatrix::Tvmult_add (unsigned int level, - VECTOR& dst, - const VECTOR& src) const +MGMatrix::Tvmult_add (const unsigned int level, + VECTOR& dst, + const VECTOR& src) const { Assert(matrix != 0, ExcNotInitialized()); @@ -268,10 +276,10 @@ MGMatrixSelect:: MGMatrixSelect (const unsigned int row, const unsigned int col, MGLevelObject* p) - : - matrix (p, typeid(*this).name()), - row(row), - col(col) + : + matrix (p, typeid(*this).name()), + row(row), + col(col) {} @@ -298,9 +306,9 @@ select_block (const unsigned int brow, template void MGMatrixSelect:: -vmult (unsigned int level, - Vector& dst, - const Vector& src) const +vmult (const unsigned int level, + Vector& dst, + const Vector& src) const { Assert(matrix != 0, ExcNotInitialized()); @@ -312,9 +320,9 @@ vmult (unsigned int level, template void MGMatrixSelect:: -vmult_add (unsigned int level, - Vector& dst, - const Vector& src) const +vmult_add (const unsigned int level, + Vector& dst, + const Vector& src) const { Assert(matrix != 0, ExcNotInitialized()); @@ -326,9 +334,9 @@ vmult_add (unsigned int level, template void MGMatrixSelect:: -Tvmult (unsigned int level, - Vector& dst, - const Vector& src) const +Tvmult (const unsigned int level, + Vector& dst, + const Vector& src) const { Assert(matrix != 0, ExcNotInitialized()); @@ -340,9 +348,9 @@ Tvmult (unsigned int level, template void MGMatrixSelect:: -Tvmult_add (unsigned int level, - Vector& dst, - const Vector& src) const +Tvmult_add (const unsigned int level, + Vector& dst, + const Vector& src) const { Assert(matrix != 0, ExcNotInitialized()); diff --git a/deal.II/deal.II/include/multigrid/mg_smoother.h b/deal.II/deal.II/include/multigrid/mg_smoother.h index c1c4f112e5..0af2635caa 100644 --- a/deal.II/deal.II/include/multigrid/mg_smoother.h +++ b/deal.II/deal.II/include/multigrid/mg_smoother.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -140,7 +140,7 @@ class MGSmootherContinuous : public MGSmootherBase /** * Modify the number of smoothing steps. */ - void set_steps(unsigned int steps); + void set_steps (const unsigned int steps); /** * How many steps should be used? @@ -387,7 +387,7 @@ MGSmootherIdentity::smooth ( template inline void -MGSmootherContinuous::set_steps(unsigned int i) +MGSmootherContinuous::set_steps (const unsigned int i) { steps = i; } diff --git a/deal.II/deal.II/include/multigrid/multigrid.h b/deal.II/deal.II/include/multigrid/multigrid.h index ed612cd6e0..6ddb8b2227 100644 --- a/deal.II/deal.II/include/multigrid/multigrid.h +++ b/deal.II/deal.II/include/multigrid/multigrid.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -250,7 +250,7 @@ class Multigrid : public Subscriptor * smaller than the current * #minlevel. */ - void set_maxlevel(unsigned int); + void set_maxlevel (const unsigned int); /** * Set the coarse level for which @@ -277,8 +277,8 @@ class Multigrid : public Subscriptor * to adjust your coarse grid * solver! */ - void set_minlevel(unsigned int level, - bool relative = false); + void set_minlevel (const unsigned int level, + bool relative = false); /** * Chance #cycle_type used in cycle(). @@ -291,7 +291,7 @@ class Multigrid : public Subscriptor * debugging output during the * multigrid cycles. */ - void set_debug(unsigned int); + void set_debug (const unsigned int); private: diff --git a/deal.II/deal.II/include/multigrid/multigrid.templates.h b/deal.II/deal.II/include/multigrid/multigrid.templates.h index 81fc1df327..0db7beffdc 100644 --- a/deal.II/deal.II/include/multigrid/multigrid.templates.h +++ b/deal.II/deal.II/include/multigrid/multigrid.templates.h @@ -69,7 +69,7 @@ Multigrid::reinit(const unsigned int min_level, template void -Multigrid::set_maxlevel(unsigned int l) +Multigrid::set_maxlevel (const unsigned int l) { Assert (l <= maxlevel, ExcIndexRange(l,minlevel,maxlevel+1)); Assert (l >= minlevel, ExcIndexRange(l,minlevel,maxlevel+1)); @@ -79,8 +79,8 @@ Multigrid::set_maxlevel(unsigned int l) template void -Multigrid::set_minlevel(unsigned int l, - bool relative) +Multigrid::set_minlevel (const unsigned int l, + const bool relative) { Assert (l <= maxlevel, ExcIndexRange(l,minlevel,maxlevel+1)); minlevel = (relative) @@ -99,7 +99,7 @@ Multigrid::set_cycle(typename Multigrid::Cycle c) template void -Multigrid::set_debug(unsigned int d) +Multigrid::set_debug (const unsigned int d) { debug = d; } diff --git a/deal.II/deal.II/source/fe/fe_dgp_monomial.cc b/deal.II/deal.II/source/fe/fe_dgp_monomial.cc index 55c267f935..3585425791 100644 --- a/deal.II/deal.II/source/fe/fe_dgp_monomial.cc +++ b/deal.II/deal.II/source/fe/fe_dgp_monomial.cc @@ -237,13 +237,13 @@ FE_DGPMonomial::initialize_restriction () template std::vector -FE_DGPMonomial::get_dpo_vector(unsigned int deg) +FE_DGPMonomial::get_dpo_vector (const unsigned int deg) { std::vector dpo(dim+1, 0U); - dpo[dim] = ++deg; + dpo[dim] = deg+1; for (unsigned int i=1;i::shape_grad_grad_component (const unsigned int i, template std::vector -FE_DGPNonparametric::get_dpo_vector(unsigned int deg) +FE_DGPNonparametric::get_dpo_vector (const unsigned int deg) { std::vector dpo(dim+1, static_cast(0)); - dpo[dim] = ++deg; + dpo[dim] = deg+1; for (unsigned int i=1;i::clone() const template std::vector -FE_DGQ::get_dpo_vector(unsigned int deg) +FE_DGQ::get_dpo_vector (const unsigned int deg) { std::vector dpo(dim+1, 0U); - dpo[dim] = ++deg; + dpo[dim] = deg+1; for (unsigned int i=1;i