From 00b1867a667bfec06e67f14ce061597b1cc836ed Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 15 Nov 2016 10:15:56 -0700 Subject: [PATCH] Update some comments that were not quite accurate any more. Also just minor cleanups. No functional changes. --- include/deal.II/base/data_out_base.h | 17 ++++++++++++----- source/numerics/data_out.cc | 22 ++++++++++++---------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/include/deal.II/base/data_out_base.h b/include/deal.II/base/data_out_base.h index ab3df47fa9..813f51d1d0 100644 --- a/include/deal.II/base/data_out_base.h +++ b/include/deal.II/base/data_out_base.h @@ -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 points_are_available==false. + * + * On the other hand, if points_are_available==true, then + * the coordinates of the points at which output is to be generated + * is attached in additional rows to the data table. + * + * The order of points is the same as for cells in the * triangulation. */ Point vertices[GeometryInfo::vertices_per_cell]; @@ -277,10 +283,11 @@ namespace DataOutBase /** * Data vectors. The format is as follows: data(i,.) denotes the - * data belonging to the ith data vector. data.n() + * data belonging to the ith data vector. data.n_cols() * therefore equals the number of output points; this number is - * (subdivisions+1)^{dim}. data.m() equals the number of - * data vectors. + * (subdivisions+1)^{dim}. data.n_rows() 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, data(.,j) are the data values at the * output point j, where j denotes the usual diff --git a/source/numerics/data_out.cc b/source/numerics/data_out.cc index 4e094b09c5..a8d71d9f67 100644 --- a/source/numerics/data_out.cc +++ b/source/numerics/data_out.cc @@ -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 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::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 > &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 > &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