};
/**
+ * Provide a data type specifying
+ * the presently supported output
+ * formats.
+ */
+ enum OutputFormat {
+ default_format,
+ /**
+ * Output for IBM OpenDX.
+ */
+ dx,
+ /**
+ * Output in AVS UCD format.
+ */
+ ucd,
+ /**
+ * Output for the gnuplot tool.
+ */
+ gnuplot,
+ /**
+ * Output for the povray raytracer.
+ */
+ povray,
+ /**
+ * Output in encapsulated
+ * PostScript.
+ */
+ eps,
+ /**
+ * Output for GMV.
+ */
+ gmv,
+ /**
+ * Output for tecplot in
+ * text format.
+ */
+
+ tecplot,
+ /**
+ * Output for tecplot in
+ * binaryformat. Faster and
+ * smaller than text
+ * format.
+ */
+ tecplot_binary,
+ /**
+ * Output in VTK format.
+ */
+ vtk,
+ /**
+ * Output in deal.II
+ * intermediate format.
+ */
+ deal_II_intermediate
+ };
+
+
+ /**
* Write the given list of patches
* to the output stream in OpenDX
* format. See the general
std::pair<unsigned int, unsigned int>
determine_intermediate_format_dimensions (std::istream &input);
+ /**
+ * Return the <tt>OutputFormat</tt>
+ * value corresponding to the
+ * given string. If the string
+ * does not match any known
+ * format, an exception is
+ * thrown.
+ *
+ * Since this function does not
+ * need data from this object, it
+ * is static and can thus be
+ * called without creating an
+ * object of this class. Its main
+ * purpose is to allow a program
+ * to use any implemented output
+ * format without the need to
+ * extend the program's parser
+ * each time a new format is
+ * implemented.
+ *
+ * To get a list of presently
+ * available format names,
+ * e.g. to give it to the
+ * ParameterHandler class,
+ * use the function
+ * get_output_format_names().
+ */
+ static OutputFormat parse_output_format (const std::string &format_name);
+
+ /**
+ * Return a list of implemented
+ * output formats. The different
+ * names are separated by
+ * vertical bar signs (<tt>`|'</tt>)
+ * as used by the
+ * ParameterHandler classes.
+ */
+ static std::string get_output_format_names ();
+
/**
* Determine an estimate for
* the memory consumption (in
class DataOutInterface : private DataOutBase
{
public:
- /**
- * Provide a data type specifying
- * the presently supported output
- * formats.
- */
- enum OutputFormat {
- default_format,
- /**
- * Output for IBM OpenDX.
- */
- dx,
- /**
- * Output in AVS UCD format.
- */
- ucd,
- /**
- * Output for the gnuplot tool.
- */
- gnuplot,
- /**
- * Output for the povray raytracer.
- */
- povray,
- /**
- * Output in encapsulated
- * PostScript.
- */
- eps,
- /**
- * Output for GMV.
- */
- gmv,
- /**
- * Output for tecplot in
- * text format.
- */
-
- tecplot,
- /**
- * Output for tecplot in
- * binaryformat. Faster and
- * smaller than text
- * format.
- */
- tecplot_binary,
- /**
- * Output in VTK format.
- */
- vtk,
- /**
- * Output in deal.II
- * intermediate format.
- */
- deal_II_intermediate
- };
-
/**
* Destructor. Does nothing, but is
* declared virtual since this class has
*/
std::string default_suffix (const OutputFormat output_format = default_format) const;
- /**
- * Return the <tt>OutputFormat</tt>
- * value corresponding to the
- * given string. If the string
- * does not match any known
- * format, an exception is
- * thrown.
- *
- * Since this function does not
- * need data from this object, it
- * is static and can thus be
- * called without creating an
- * object of this class. Its main
- * purpose is to allow a program
- * to use any implemented output
- * format without the need to
- * extend the program's parser
- * each time a new format is
- * implemented.
- *
- * To get a list of presently
- * available format names,
- * e.g. to give it to the
- * ParameterHandler class,
- * use the function
- * get_output_format_names().
- */
- static OutputFormat parse_output_format (const std::string &format_name);
-
- /**
- * Return a list of implemented
- * output formats. The different
- * names are separated by
- * vertical bar signs (<tt>`|'</tt>)
- * as used by the
- * ParameterHandler classes.
- */
- static std::string get_output_format_names ();
-
/**
* Declare parameters for all
* output formats by declaring
+
+DataOutBase::OutputFormat
+DataOutBase::
+parse_output_format (const std::string &format_name)
+{
+ if (format_name == "dx")
+ return dx;
+
+ if (format_name == "ucd")
+ return ucd;
+
+ if (format_name == "gnuplot")
+ return gnuplot;
+
+ if (format_name == "povray")
+ return povray;
+
+ if (format_name == "eps")
+ return eps;
+
+ if (format_name == "gmv")
+ return gmv;
+
+ if (format_name == "tecplot")
+ return tecplot;
+
+ if (format_name == "tecplot_binary")
+ return tecplot_binary;
+
+ if (format_name == "vtk")
+ return vtk;
+
+ if (format_name == "deal.II intermediate")
+ return deal_II_intermediate;
+
+ AssertThrow (false,
+ ExcMessage ((std::string("The format <") + format_name +
+ std::string("> is not recognized")).c_str()));
+
+ // return something invalid
+ return OutputFormat(-1);
+}
+
+
+
+std::string
+DataOutBase::get_output_format_names ()
+{
+ return "dx|ucd|gnuplot|povray|eps|gmv|tecplot|vtk|deal.II intermediate";
+}
+
+
+
template <int dim, int spacedim>
void DataOutBase::write_ucd (const std::vector<Patch<dim,spacedim> > &patches,
const std::vector<std::string> &data_names,
-template <int dim, int spacedim>
-typename DataOutInterface<dim,spacedim>::OutputFormat
-DataOutInterface<dim,spacedim>::
-parse_output_format (const std::string &format_name)
-{
- if (format_name == "dx")
- return dx;
-
- if (format_name == "ucd")
- return ucd;
-
- if (format_name == "gnuplot")
- return gnuplot;
-
- if (format_name == "povray")
- return povray;
-
- if (format_name == "eps")
- return eps;
-
- if (format_name == "gmv")
- return gmv;
-
- if (format_name == "tecplot")
- return tecplot;
-
- if (format_name == "tecplot_binary")
- return tecplot_binary;
-
- if (format_name == "vtk")
- return vtk;
-
- if (format_name == "deal.II intermediate")
- return deal_II_intermediate;
-
- AssertThrow (false,
- ExcMessage ((std::string("The format <") + format_name +
- std::string("> is not recognized")).c_str()));
-
- // return something invalid
- return OutputFormat(-1);
-}
-
-
-
-template <int dim, int spacedim>
-std::string
-DataOutInterface<dim,spacedim>::get_output_format_names ()
-{
- return "dx|ucd|gnuplot|povray|eps|gmv|tecplot|vtk|deal.II intermediate";
-}
-
-
-
template <int dim, int spacedim>
void
DataOutInterface<dim,spacedim>::declare_parameters (ParameterHandler &prm)