]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Similar to curved_inner_cells in DataOut allow now the output of curved_inner_cells...
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Mon, 12 May 2008 18:29:49 +0000 (18:29 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Mon, 12 May 2008 18:29:49 +0000 (18:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@16076 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/grid_out.h
deal.II/deal.II/source/grid/grid_out.all_dimensions.cc
deal.II/deal.II/source/grid/grid_out.cc

index b732cb5f97f957c54ab3bf34158d84be426fd573..56e2cff960e9dbbd7a9f1bc50183387f08207885 100644 (file)
@@ -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
+                                       * <code>n_boundary_face_points>0</code>.
+                                       */
+      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.
index 72a2fb3e8090030ff3e7c0b313b40706635dacb6..a2ffca09faf30e11011978423334ed70eedd3b04 100644 (file)
@@ -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)
   {}
 
   
index 9d2457ccbc3100fc54205d1551554f22794fc140..d3ae7d4e5a076cb9e9937179d2fa5078a25e9d80 100644 (file)
@@ -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<dim>::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<dim> &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<dim> &tria,
 
                      const Point<dim> &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

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.