]> https://gitweb.dealii.org/ - dealii.git/commitdiff
introduce pseudo format not writing data
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Wed, 12 Apr 2006 15:14:19 +0000 (15:14 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Wed, 12 Apr 2006 15:14:19 +0000 (15:14 +0000)
git-svn-id: https://svn.dealii.org/trunk@12825 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/data_out_base.h
deal.II/base/source/data_out_base.cc

index 71e47ca6280226495be4a28cd64d81132d444a5f..ec4c93e1bcc2d172f1ccc71554651c866efdcf3a 100644 (file)
@@ -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.
                                            */
index 4912097369d1c8ca8b453e1840a0a278c94a4da6..02381662f08fd80691e31a6365a82309a1818377 100644 (file)
@@ -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<dim,spacedim>::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());
     }
 }
 

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.