* Additionally, objects of this class have a default format, which
* can be set by the parameter "Output format" of the parameter
* file. Within a program, this can be changed by the member function
- * #set_format#. Using this default format, it is possible to leave
+ * #set_default_format#. Using this default format, it is possible to leave
* the format selection completely to the parameter file. A suitable
* suffix for the output file name can be obtained by #default_suffix#
* without arguments.
* Provide a data type specifying the
* presently supported output formats.
*/
- enum OutputFormat { nil, ucd, gnuplot, povray, eps, gmv };
+ enum OutputFormat { default_format, ucd, gnuplot, povray, eps, gmv };
/**
* Obtain data through the #get_patches#
* requested, the #default_format# is written.
*
* An error occurs if no format is provided and
- * the default format is #nil#.
+ * the default format is #default_format#.
*/
- void write (ostream &out, const OutputFormat output_format = nil) const;
+ void write (ostream &out, const OutputFormat output_format = default_format) const;
/**
* Set the default format. The value set here
- * is used anytime, output for format #nil# is
+ * is used anytime, output for format #default_format# is
* requested.
*/
- void set_format(const OutputFormat default_format);
+ void set_default_format(const OutputFormat default_format);
/**
* Set the flags to be used for output
* \end{itemize}
*
* If this function is called
- * with no argument or #nil#, the
+ * with no argument or #default_format#, the
* suffix for the
* #default_format# is returned.
*/
- string default_suffix (const OutputFormat output_format = nil);
+ string default_suffix (const OutputFormat output_format = default_format);
/**
* Return the #OutputFormat# value
private:
/**
* Standard output format.
- * Use this format, if output format nil is
+ * Use this format, if output format default_format is
* requested. It can be changed by the #set_format#
* function or in a parameter file.
*/
- OutputFormat default_format;
+ OutputFormat default_fmt;
/**
* Flags to be used upon output of UCD
void DataOutInterface<dim>::write (ostream &out,
OutputFormat output_format) const
{
- if (output_format == nil)
- output_format = default_format;
+ if (output_format == default_format)
+ output_format = default_fmt;
switch (output_format)
{
template <int dim>
-void DataOutInterface<dim>::set_format(OutputFormat fmt)
+void DataOutInterface<dim>::set_default_format(OutputFormat fmt)
{
- default_format = fmt;
+ Assert(fmt != default_format, ExcNotImplemented());
+ default_fmt = fmt;
}
template <int dim>
string DataOutInterface<dim>::default_suffix (OutputFormat output_format)
{
- if (output_format == nil)
- output_format = default_format;
+ if (output_format == default_format)
+ output_format = default_fmt;
switch (output_format)
{
void DataOutInterface<dim>::parse_parameters (ParameterHandler &prm)
{
const string& output_name = prm.get ("Output format");
- default_format = parse_output_format (output_name);
+ default_fmt = parse_output_format (output_name);
prm.enter_subsection ("UCD output parameters");
ucd_flags.parse_parameters (prm);