From: hartmann Date: Mon, 12 May 2008 18:29:49 +0000 (+0000) Subject: Similar to curved_inner_cells in DataOut allow now the output of curved_inner_cells... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=836c638961a1d9c9fc21dc5d754e7a607ffd27f1;p=dealii-svn.git Similar to curved_inner_cells in DataOut allow now the output of curved_inner_cells in GridOut::write_gnuplot. git-svn-id: https://svn.dealii.org/trunk@16076 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/grid/grid_out.h b/deal.II/deal.II/include/grid/grid_out.h index b732cb5f97..56e2cff960 100644 --- a/deal.II/deal.II/include/grid/grid_out.h +++ b/deal.II/deal.II/include/grid/grid_out.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -288,12 +288,23 @@ namespace GridOutFlags * boundary face. */ unsigned int n_boundary_face_points; + + /** + * Flag. If true also inner + * cells are plotted with + * curved boundaries. This is + * useful when for e.g. + * MappingQEulerian with + * n_boundary_face_points>0. + */ + bool curved_inner_cells; /** * Constructor. */ Gnuplot (const bool write_cell_number = false, - const unsigned int n_boundary_face_points = 2); + const unsigned int n_boundary_face_points = 2, + const bool curved_inner_cells = false); /** * Declare parameters in * ParameterHandler. diff --git a/deal.II/deal.II/source/grid/grid_out.all_dimensions.cc b/deal.II/deal.II/source/grid/grid_out.all_dimensions.cc index 72a2fb3e80..a2ffca09fa 100644 --- a/deal.II/deal.II/source/grid/grid_out.all_dimensions.cc +++ b/deal.II/deal.II/source/grid/grid_out.all_dimensions.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2006 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -106,9 +106,11 @@ namespace GridOutFlags Gnuplot::Gnuplot (const bool write_cell_numbers, - const unsigned int n_boundary_face_points) : + const unsigned int n_boundary_face_points, + const bool curved_inner_cells) : write_cell_numbers (write_cell_numbers), - n_boundary_face_points(n_boundary_face_points) + n_boundary_face_points(n_boundary_face_points), + curved_inner_cells(curved_inner_cells) {} diff --git a/deal.II/deal.II/source/grid/grid_out.cc b/deal.II/deal.II/source/grid/grid_out.cc index 9d2457ccbc..d3ae7d4e5a 100644 --- a/deal.II/deal.II/source/grid/grid_out.cc +++ b/deal.II/deal.II/source/grid/grid_out.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -1020,7 +1020,8 @@ void GridOut::write_gnuplot ( if (gnuplot_flags.write_cell_numbers) out << "# cell " << cell << '\n'; - if (mapping==0 || !cell->at_boundary()) + if (mapping==0 || + (!cell->at_boundary() && !gnuplot_flags.curved_inner_cells)) { // write out the four sides // of this cell by putting @@ -1051,7 +1052,7 @@ void GridOut::write_gnuplot ( { const typename Triangulation::face_iterator face = cell->face(face_no); - if (face->at_boundary()) + if (face->at_boundary() || gnuplot_flags.curved_inner_cells) { // compute offset // of quadrature @@ -1149,7 +1150,8 @@ void GridOut::write_gnuplot (const Triangulation &tria, if (gnuplot_flags.write_cell_numbers) out << "# cell " << cell << '\n'; - if (mapping==0 || n_points==2 || !cell->has_boundary_lines()) + if (mapping==0 || n_points==2 || + (!cell->has_boundary_lines() && !gnuplot_flags.curved_inner_cells)) { // front face out << cell->vertex(0) @@ -1265,7 +1267,7 @@ void GridOut::write_gnuplot (const Triangulation &tria, const Point &v0=line->vertex(0), &v1=line->vertex(1); - if (line->at_boundary()) + if (line->at_boundary() || gnuplot_flags.curved_inner_cells) { // transform_real_to_unit_cell // could be