From: Ralf Hartmann Date: Tue, 11 Mar 2008 09:59:37 +0000 (+0000) Subject: Allow output of zone name in tecplot output. X-Git-Tag: v8.0.0~9290 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c27f20c1ff1ce0cb6afd8fccafa8f5ed9b9c165c;p=dealii.git Allow output of zone name in tecplot output. git-svn-id: https://svn.dealii.org/trunk@15884 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/data_out_base.h b/deal.II/base/include/base/data_out_base.h index d107808702..1a6d03805b 100644 --- a/deal.II/base/include/base/data_out_base.h +++ b/deal.II/base/include/base/data_out_base.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 @@ -1128,11 +1128,19 @@ class DataOutBase * produced. */ const char* tecplot_binary_file_name; - + + /** + * Tecplot allows to assign + * names to zones. This + * variable stores this name. + */ + const char* zone_name; + /** * Constructor **/ - TecplotFlags (const char* tecplot_binary_file_name = NULL); + TecplotFlags (const char* tecplot_binary_file_name = NULL, + const char* zone_name = NULL); /** * Declare all flags with name diff --git a/deal.II/base/source/data_out_base.cc b/deal.II/base/source/data_out_base.cc index ca61b475ad..95d49282eb 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -1470,9 +1470,11 @@ DataOutBase::GmvFlags::memory_consumption () const DataOutBase::TecplotFlags:: -TecplotFlags (const char* tecplot_binary_file_name) +TecplotFlags (const char* tecplot_binary_file_name, + const char* zone_name) : - tecplot_binary_file_name(tecplot_binary_file_name) + tecplot_binary_file_name(tecplot_binary_file_name), + zone_name(zone_name) {} @@ -3236,8 +3238,12 @@ void DataOutBase::write_tecplot (const std::vector > &patche out << ", \"" << data_names[data_set] << "\""; out << '\n'; + + out << "zone "; + if (flags.zone_name) + out << "t=\"" << flags.zone_name << "\" "; - out << "zone f=feblock, n=" << n_nodes << ", e=" << n_cells + out << "f=feblock, n=" << n_nodes << ", e=" << n_cells << ", et=" << tecplot_cell_type[dim] << '\n'; }