From 3ee04318ff201ba85a953a1f93236d3ef432172a Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Wed, 12 Apr 2006 15:14:19 +0000 Subject: [PATCH] introduce pseudo format not writing data git-svn-id: https://svn.dealii.org/trunk@12825 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/data_out_base.h | 8 +++ deal.II/base/source/data_out_base.cc | 86 +++++++++++------------ 2 files changed, 50 insertions(+), 44 deletions(-) diff --git a/deal.II/base/include/base/data_out_base.h b/deal.II/base/include/base/data_out_base.h index 71e47ca628..ec4c93e1bc 100644 --- a/deal.II/base/include/base/data_out_base.h +++ b/deal.II/base/include/base/data_out_base.h @@ -1246,7 +1246,15 @@ class DataOutBase * formats. */ enum OutputFormat { + /** + * Use the format already + * stored in the object. + */ default_format, + /** + * Do not write any output. + */ + none, /** * Output for @ref SoftwareOpenDX. */ diff --git a/deal.II/base/source/data_out_base.cc b/deal.II/base/source/data_out_base.cc index 4912097369..02381662f0 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -746,6 +746,9 @@ DataOutBase::OutputFormat DataOutBase:: parse_output_format (const std::string &format_name) { + if (format_name == "none") + return none; + if (format_name == "dx") return dx; @@ -789,7 +792,7 @@ parse_output_format (const std::string &format_name) std::string DataOutBase::get_output_format_names () { - return "dx|ucd|gnuplot|povray|eps|gmv|tecplot|tecplot_binary|vtk|deal.II intermediate"; + return "none|dx|ucd|gnuplot|povray|eps|gmv|tecplot|tecplot_binary|vtk|deal.II intermediate"; } @@ -800,39 +803,31 @@ default_suffix (const OutputFormat output_format) { switch (output_format) { + case none: + return ""; case dx: - return ".dx"; - + return ".dx"; case ucd: - return ".inp"; - + return ".inp"; case gnuplot: - return ".gnuplot"; - + return ".gnuplot"; case povray: - return ".pov"; - + return ".pov"; case eps: - return ".eps"; - + return ".eps"; case gmv: - return ".gmv"; - + return ".gmv"; case tecplot: - return ".dat"; - + return ".dat"; case tecplot_binary: - return ".plt"; - + return ".plt"; case vtk: - return ".vtk"; - + return ".vtk"; case deal_II_intermediate: - return ".d2"; - + return ".d2"; default: - Assert (false, ExcNotImplemented()); - return ""; + Assert (false, ExcNotImplemented()); + return ""; } } @@ -3611,48 +3606,51 @@ DataOutInterface::write (std::ostream &out, switch (output_format) { + case none: + break; + case dx: - write_dx (out); - break; + write_dx (out); + break; case ucd: - write_ucd (out); - break; + write_ucd (out); + break; case gnuplot: - write_gnuplot (out); - break; + write_gnuplot (out); + break; case povray: - write_povray (out); - break; + write_povray (out); + break; case eps: - write_eps(out); - break; + write_eps(out); + break; case gmv: - write_gmv (out); - break; + write_gmv (out); + break; case tecplot: - write_tecplot (out); - break; + write_tecplot (out); + break; case tecplot_binary: - write_tecplot_binary (out); - break; + write_tecplot_binary (out); + break; case vtk: - write_vtk (out); - break; + write_vtk (out); + break; case deal_II_intermediate: - write_deal_II_intermediate (out); - break; + write_deal_II_intermediate (out); + break; default: - Assert (false, ExcNotImplemented()); + Assert (false, ExcNotImplemented()); } } -- 2.39.5