From 21367a6d5faa3a1c723fcf303b20facf3bcfee3e Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 14 Nov 2012 03:28:42 +0000 Subject: [PATCH] Move closer to usual style. git-svn-id: https://svn.dealii.org/trunk@27535 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/meshworker/vector_selector.h | 68 ++++++++++--------- .../meshworker/vector_selector.templates.h | 36 +++++----- 2 files changed, 55 insertions(+), 49 deletions(-) diff --git a/deal.II/include/deal.II/meshworker/vector_selector.h b/deal.II/include/deal.II/meshworker/vector_selector.h index 808f84e716..e3ca877fe1 100644 --- a/deal.II/include/deal.II/meshworker/vector_selector.h +++ b/deal.II/include/deal.II/meshworker/vector_selector.h @@ -63,9 +63,9 @@ namespace MeshWorker * cell or face. */ void add(const std::string& name, - bool values = true, - bool gradients = false, - bool hessians = false); + const bool values = true, + const bool gradients = false, + const bool hessians = false); /** * Does the same as the function @@ -140,17 +140,17 @@ namespace MeshWorker /** * The vector index for the ith value */ - unsigned int value_index (unsigned int i) const; + unsigned int value_index (const unsigned int i) const; /** * The vector index for the ith gradient */ - unsigned int gradient_index (unsigned int i) const; + unsigned int gradient_index (const unsigned int i) const; /** * The vector index for the ith Hessian */ - unsigned int hessian_index (unsigned int i) const; + unsigned int hessian_index (const unsigned int i) const; /** * Print the contents of the @@ -291,10 +291,10 @@ namespace MeshWorker std::vector > > >& hessians, const FEValuesBase& fe, const std::vector& index, - unsigned int component, - unsigned int n_comp, - unsigned int start, - unsigned int size) const; + const unsigned int component, + const unsigned int n_comp, + const unsigned int start, + const unsigned int size) const; /** * Fill the local data vector @@ -312,12 +312,12 @@ namespace MeshWorker std::vector > > >& gradients, std::vector > > >& hessians, const FEValuesBase& fe, - unsigned int level, + const unsigned int level, const std::vector& index, - unsigned int component, - unsigned int n_comp, - unsigned int start, - unsigned int size) const; + const unsigned int component, + const unsigned int n_comp, + const unsigned int start, + const unsigned int size) const; /** * The memory used by this object. @@ -383,10 +383,10 @@ namespace MeshWorker std::vector > > >& hessians, const FEValuesBase& fe, const std::vector& index, - unsigned int component, - unsigned int n_comp, - unsigned int start, - unsigned int size) const; + const unsigned int component, + const unsigned int n_comp, + const unsigned int start, + const unsigned int size) const; /** * The memory used by this object. @@ -454,12 +454,12 @@ namespace MeshWorker std::vector > > >& gradients, std::vector > > >& hessians, const FEValuesBase& fe, - unsigned int level, + const unsigned int level, const std::vector& index, - unsigned int component, - unsigned int n_comp, - unsigned int start, - unsigned int size) const; + const unsigned int component, + const unsigned int n_comp, + const unsigned int start, + const unsigned int size) const; /** * The memory used by this object. @@ -474,11 +474,17 @@ namespace MeshWorker //----------------------------------------------------------------------// inline void - VectorSelector::add(const std::string& name, bool values, bool gradients, bool hessians) + VectorSelector::add(const std::string& name, + const bool values, + const bool gradients, + const bool hessians) { - if (values) value_selection.add(name); - if (gradients) gradient_selection.add(name); - if (hessians) hessian_selection.add(name); + if (values) + value_selection.add(name); + if (gradients) + gradient_selection.add(name); + if (hessians) + hessian_selection.add(name); } @@ -554,21 +560,21 @@ namespace MeshWorker inline unsigned int - VectorSelector::value_index(unsigned int i) const + VectorSelector::value_index(const unsigned int i) const { return value_selection(i); } inline unsigned int - VectorSelector::gradient_index(unsigned int i) const + VectorSelector::gradient_index(const unsigned int i) const { return gradient_selection(i); } inline unsigned int - VectorSelector::hessian_index(unsigned int i) const + VectorSelector::hessian_index(const unsigned int i) const { return hessian_selection(i); } diff --git a/deal.II/include/deal.II/meshworker/vector_selector.templates.h b/deal.II/include/deal.II/meshworker/vector_selector.templates.h index 90d79325c1..7177147541 100644 --- a/deal.II/include/deal.II/meshworker/vector_selector.templates.h +++ b/deal.II/include/deal.II/meshworker/vector_selector.templates.h @@ -43,10 +43,10 @@ namespace MeshWorker std::vector > > >&, const FEValuesBase&, const std::vector&, - unsigned int, - unsigned int, - unsigned int, - unsigned int) const + const unsigned int, + const unsigned int, + const unsigned int, + const unsigned int) const { Assert(false, ExcNotImplemented()); } @@ -59,12 +59,12 @@ namespace MeshWorker std::vector > > >&, std::vector > > >&, const FEValuesBase&, - unsigned int, + const unsigned int, const std::vector&, - unsigned int, - unsigned int, - unsigned int, - unsigned int) const + const unsigned int, + const unsigned int, + const unsigned int, + const unsigned int) const { Assert(false, ExcNotImplemented()); } @@ -111,10 +111,10 @@ namespace MeshWorker std::vector > > >& hessians, const FEValuesBase& fe, const std::vector& index, - unsigned int component, - unsigned int n_comp, - unsigned int start, - unsigned int size) const + const unsigned int component, + const unsigned int n_comp, + const unsigned int start, + const unsigned int size) const { AssertDimension(values.size(), this->n_values()); AssertDimension(gradients.size(), this->n_gradients()); @@ -193,12 +193,12 @@ namespace MeshWorker std::vector > > >& gradients, std::vector > > >& hessians, const FEValuesBase& fe, - unsigned int level, + const unsigned int level, const std::vector& index, - unsigned int component, - unsigned int n_comp, - unsigned int start, - unsigned int size) const + const unsigned int component, + const unsigned int n_comp, + const unsigned int start, + const unsigned int size) const { AssertDimension(values.size(), this->n_values()); AssertDimension(gradients.size(), this->n_gradients()); -- 2.39.5