From: David Wells Date: Sat, 19 May 2018 16:59:15 +0000 (-0400) Subject: Fix some bugs with codim = 1 GNUPLOT output. X-Git-Tag: v9.1.0-rc1~1105^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37a6a105006012b98b805104f03fde5b71a10eef;p=dealii.git Fix some bugs with codim = 1 GNUPLOT output. --- diff --git a/include/deal.II/grid/grid_out.h b/include/deal.II/grid/grid_out.h index 3c976177e8..018abf2200 100644 --- a/include/deal.II/grid/grid_out.h +++ b/include/deal.II/grid/grid_out.h @@ -964,9 +964,8 @@ public: * at the boundary. If zero, then use standard Q1 mapping. * * Names and values of additional flags controlling the output can be found - * in the documentation of the GridOutFlags::Gnuplot() class. - * - * Not implemented for the codimension one case. + * in the documentation of the GridOutFlags::Gnuplot class, which also + * describes some caveats for the codimension one case. */ template void write_gnuplot (const Triangulation &tria, diff --git a/source/grid/grid_out.cc b/source/grid/grid_out.cc index 3f09caab8d..116867e0e5 100644 --- a/source/grid/grid_out.cc +++ b/source/grid/grid_out.cc @@ -3264,8 +3264,11 @@ namespace internal if (gnuplot_flags.write_cell_numbers) out << "# cell " << cell << '\n'; - if (mapping==nullptr || - (!cell->at_boundary() && !gnuplot_flags.curved_inner_cells)) + if (mapping == nullptr || + (dim == spacedim ? (!cell->at_boundary() && !gnuplot_flags.curved_inner_cells) : + // ignore checking for boundary or interior cells in the codim + // 1 case: 'or false' is a no-op + false)) { // write out the four sides of this cell by putting the four // points (+ the initial point again) in a row and lifting the @@ -3289,7 +3292,7 @@ namespace internal { const typename dealii::Triangulation::face_iterator face = cell->face(face_no); - if (face->at_boundary() || gnuplot_flags.curved_inner_cells) + if (dim != spacedim || face->at_boundary() || gnuplot_flags.curved_inner_cells) { // Save the points on each face to a vector and then try // to remove colinear points that won't show up in the