]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix some minor issues with the coding conventions doc.
authorDavid Wells <drwells@email.unc.edu>
Fri, 20 Sep 2019 23:00:40 +0000 (19:00 -0400)
committerDavid Wells <drwells@email.unc.edu>
Fri, 20 Sep 2019 23:07:54 +0000 (19:07 -0400)
- fix some wrong links
- fix some code formatting
- fix a file path

doc/doxygen/headers/coding_conventions.h

index 81108d1902efca7721b7792db3af3511f26c2db6..08f09258dfa9e7359960ac941112f1093c5caf39 100644 (file)
@@ -63,11 +63,11 @@ executable.
 <ol>
 <li> %Functions which return the number of something (number of cells,
   degrees of freedom, etc) should start with <code>n_*</code>. Example:
-  SparsityPattern::n_nonzero_entries().</li>
+  SparsityPatternBase::n_nonzero_elements().</li>
 
 <li> %Functions which set a bit or flag should start with <code>set_*</code>;
   functions which clear bits or flags should be named <code>clear_*</code>.
-  Example: CellIterator::set_refine_flag().</li>
+  Example: CellAccessor::set_refine_flag().</li>
 
 <li> Traditional logical operators should be used instead of their English
   equivalents (i.e., use <code>&&</code>, <code>||</code>, and <code>!</code>
@@ -219,7 +219,7 @@ DOXYGEN ... #endif</code> to prevent Doxygen from picking them up.</li>
 expand_instantiations (built from
 <code>cmake/scripts/expand_instantiations.cc</code>) and the parameters are
 defined dynamically through cmake depending on your configuration (see
-<code>share/deal.II/template-arguments</code> in your build directory).
+<code>cmake/config/template-arguments.in</code> in your build directory).
 It is those <code>.inst</code> files that are eventually included from the
 corresponding <code>.cc</code> files. </p>
 
@@ -246,8 +246,8 @@ we list here:
   consider a trivial implementation of vector addition:
   @code
     Vector &
-    operator += (Vector       &lhs,
-                 const Vector &rhs)
+    operator+=(Vector       &lhs,
+               const Vector &rhs)
     {
       for (unsigned int i=0; i<lhs.size(); ++i)
         lhs(i) += rhs(i);
@@ -268,11 +268,11 @@ we list here:
   implementation will do exactly this:
   @code
     Vector &
-    operator += (Vector       &lhs,
-                 const Vector &rhs)
+    operator+=(Vector       &lhs,
+               const Vector &rhs)
     {
       Assert (lhs.size() == rhs.size(),
-              ExcDimensionMismatch (lhs.size(), rhs.size());
+              ExcDimensionMismatch(lhs.size(), rhs.size());
       for (unsigned int i=0; i<lhs.size(); ++i)
         lhs(i) += rhs(i);
       return lhs;
@@ -312,7 +312,7 @@ we list here:
   a vector would expect the norm to be positive. You can write this as
   follows:
   @code
-    double norm (const Vector &v)
+    double norm(const Vector &v)
     {
       double s = 0;
       for (unsigned int i=0; i<v.size(); ++i)
@@ -347,8 +347,8 @@ we list here:
             { ... }
           else
             {
-                // we have a cell whose neighbor must
-                // be at the boundary if we got here
+              // we have a cell whose neighbor must
+              // be at the boundary if we got here
             }
         }
   @endcode
@@ -431,8 +431,8 @@ we list here:
       ... // something lengthy and complicated
       for (const auto &cell = dof_handler.active_cell_iterators())
         {
-          <b>const</b> Point<dim> cell_center = (cell->vertex(0) +
-                                                 cell->vertex(1)) / 2;
+          const Point<dim> cell_center = (cell->vertex(0) +
+                                          cell->vertex(1)) / 2;
           ...
         }
       ...
@@ -460,7 +460,7 @@ we list here:
   @code
      template <int dim>
      typename Triangulation<dim>::cell_iterator
-     CellAccessor<dim>::child (const unsigned int child_no)
+     CellAccessor<dim>::child(const unsigned int child_no)
      {
        ...
        return something;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.