]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Update some comments that were not quite accurate any more. 3588/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 15 Nov 2016 17:15:56 +0000 (10:15 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 15 Nov 2016 17:15:56 +0000 (10:15 -0700)
Also just minor cleanups. No functional changes.

include/deal.II/base/data_out_base.h
source/numerics/data_out.cc

index ab3df47fa99f1a24e9dd927f8e6b0e3fc65feed4..813f51d1d0e463bfd1be8ab42fc58b9fc41adcc5 100644 (file)
@@ -244,8 +244,14 @@ namespace DataOutBase
 
     /**
      * Corner points of a patch.  Inner points are computed by a multilinear
-     * transform of the unit cell to the cell specified by these corner
-     * points. The order of points is the same as for cells in the
+     * transformation of the unit cell to the cell specified by these corner
+     * points, if <code>points_are_available==false</code>.
+     *
+     * On the other hand, if <code>points_are_available==true</code>, then
+     * the coordinates of the points at which output is to be generated
+     * is attached in additional rows to the <code>data</code> table.
+     *
+     * The order of points is the same as for cells in the
      * triangulation.
      */
     Point<spacedim> vertices[GeometryInfo<dim>::vertices_per_cell];
@@ -277,10 +283,11 @@ namespace DataOutBase
 
     /**
      * Data vectors. The format is as follows: <tt>data(i,.)</tt> denotes the
-     * data belonging to the <tt>i</tt>th data vector. <tt>data.n()</tt>
+     * data belonging to the <tt>i</tt>th data vector. <tt>data.n_cols()</tt>
      * therefore equals the number of output points; this number is
-     * <tt>(subdivisions+1)^{dim</tt>}. <tt>data.m()</tt> equals the number of
-     * data vectors.
+     * <tt>(subdivisions+1)^{dim}</tt>. <tt>data.n_rows()</tt> equals the number of
+     * data vectors. For the current purpose, a data vector equals one scalar,
+     * even if multiple scalars may later be interpreted as vectors.
      *
      * Within each column, <tt>data(.,j)</tt> are the data values at the
      * output point <tt>j</tt>, where <tt>j</tt> denotes the usual
index 4e094b09c596082f6cfbadaacde860bf9b2013a7..a8d71d9f67108704ab5a340b9bf0693f3dcd3274 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 1999 - 2015 by the deal.II authors
+// Copyright (C) 1999 - 2016 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -72,8 +72,7 @@ build_one_patch
   ::dealii::DataOutBase::Patch<DoFHandlerType::dimension, DoFHandlerType::space_dimension> patch;
   patch.n_subdivisions = n_subdivisions;
 
-  // use ucd_to_deal map as patch vertices are in the old, unnatural
-  // ordering. if the mapping does not preserve locations
+  // set the vertices of the patch. if the mapping does not preserve locations
   // (e.g. MappingQEulerian), we need to compute the offset of the vertex for
   // the graphical output. Otherwise, we can just use the vertex info.
   for (unsigned int vertex=0; vertex<GeometryInfo<DoFHandlerType::dimension>::vertices_per_cell; ++vertex)
@@ -110,17 +109,20 @@ build_one_patch
             (DoFHandlerType::dimension != DoFHandlerType::space_dimension))))
         {
           Assert(patch.space_dim==DoFHandlerType::space_dimension, ExcInternalError());
-          const std::vector<Point<DoFHandlerType::space_dimension> > &q_points=fe_patch_values.get_quadrature_points();
-          // resize the patch.data member in order to have enough memory for
-          // the quadrature points as well
-          patch.data.reinit (scratch_data.n_datasets+DoFHandlerType::space_dimension, n_q_points);
+
           // set the flag indicating that for this cell the points are
           // explicitly given
-          patch.points_are_available=true;
-          // copy points to patch.data
+          patch.points_are_available = true;
+
+          // then resize the patch.data member in order to have enough memory for
+          // the quadrature points as well, and copy the quadrature points there
+          const std::vector<Point<DoFHandlerType::space_dimension> > &q_points
+            = fe_patch_values.get_quadrature_points();
+
+          patch.data.reinit (scratch_data.n_datasets+DoFHandlerType::space_dimension, n_q_points);
           for (unsigned int i=0; i<DoFHandlerType::space_dimension; ++i)
             for (unsigned int q=0; q<n_q_points; ++q)
-              patch.data(patch.data.size(0)-DoFHandlerType::space_dimension+i,q)=q_points[q][i];
+              patch.data(patch.data.size(0)-DoFHandlerType::space_dimension+i,q) = q_points[q][i];
         }
       else
         {

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.