]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Move a few of the dimension-independent functions into the base class.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 1 Jul 2005 15:28:27 +0000 (15:28 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 1 Jul 2005 15:28:27 +0000 (15:28 +0000)
git-svn-id: https://svn.dealii.org/trunk@11043 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/data_out_base.cc

index 20a5843d7ae33d5d8529b3fee02e4f9d2685b364..3e1b679b1fae8a3ea23af933944f9ce17a308e80 100644 (file)
@@ -610,6 +610,50 @@ DataOutBase::get_output_format_names ()
 
 
 
+std::string
+DataOutBase::
+default_suffix (const OutputFormat output_format)
+{
+  switch (output_format) 
+    {
+      case dx:
+           return ".dx";
+           
+      case ucd:
+           return ".inp";
+           
+      case gnuplot: 
+           return ".gnuplot";
+           
+      case povray: 
+           return ".pov";
+           
+      case eps: 
+           return ".eps";
+
+      case gmv:
+           return ".gmv";
+
+      case tecplot:
+           return ".dat";
+           
+      case tecplot_binary:
+           return ".plt";
+           
+      case vtk:
+           return ".vtk";
+           
+      case deal_II_intermediate:
+           return ".d2";
+           
+      default: 
+           Assert (false, ExcNotImplemented()); 
+           return "";
+    };
+}
+
+
+
 template <int dim, int spacedim>
 void DataOutBase::write_ucd (const std::vector<Patch<dim,spacedim> > &patches,
                             const std::vector<std::string>          &data_names,
@@ -4389,48 +4433,12 @@ DataOutInterface<dim,spacedim>::set_flags (const Deal_II_IntermediateFlags &flag
 template <int dim, int spacedim>
 std::string
 DataOutInterface<dim,spacedim>::
-default_suffix (const OutputFormat output_format_) const
+default_suffix (const OutputFormat output_format) const
 {
-  OutputFormat output_format = output_format_;
   if (output_format == default_format)
-    output_format = default_fmt;
-  
-  switch (output_format) 
-    {
-      case dx:
-           return ".dx";
-           
-      case ucd:
-           return ".inp";
-           
-      case gnuplot: 
-           return ".gnuplot";
-           
-      case povray: 
-           return ".pov";
-           
-      case eps: 
-           return ".eps";
-
-      case gmv:
-           return ".gmv";
-
-      case tecplot:
-           return ".dat";
-           
-      case tecplot_binary:
-           return ".plt";
-           
-      case vtk:
-           return ".vtk";
-           
-      case deal_II_intermediate:
-           return ".d2";
-           
-      default: 
-           Assert (false, ExcNotImplemented()); 
-           return "";
-    };
+    return DataOutBase::default_suffix (default_fmt);
+  else
+    return DataOutBase::default_suffix (output_format);
 }
 
 

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.