From 336d63467049eb1e9ba1331a51a2a51dd19ff680 Mon Sep 17 00:00:00 2001 From: hartmann Date: Tue, 11 Mar 2008 09:59:37 +0000 Subject: [PATCH] Allow output of zone name in tecplot output. git-svn-id: https://svn.dealii.org/trunk@15884 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/data_out_base.h | 14 +++++++++++--- deal.II/base/source/data_out_base.cc | 12 +++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) 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'; } -- 2.39.5