/*---------------------------- data_out_base.h ---------------------------*/
+#include <base/forward-declarations.h>
#include <base/point.h>
#include <lac/fullmatrix.h>
#include <grid/geometry_info.h>
* Constructor.
*/
UcdFlags (const bool write_preamble = true);
+
+ /**
+ * Declare all flags with name
+ * and type as offered by this
+ * class, for use in input files.
+ */
+ static void declare_parameters (ParameterHandler &prm);
+
+ /**
+ * Read the parameters declared in
+ * #declare_parameters# and set the
+ * flags for this output format
+ * accordingly.
+ *
+ * The flags thus obtained overwrite
+ * all previous contents of this object.
+ */
+ void parse_parameters (ParameterHandler &prm);
};
/**
* #private# as well).
*/
int dummy;
+
+ public:
+ /**
+ * Declare all flags with name
+ * and type as offered by this
+ * class, for use in input files.
+ */
+ static void declare_parameters (ParameterHandler &prm);
+
+ /**
+ * Read the parameters declared in
+ * #declare_parameters# and set the
+ * flags for this output format
+ * accordingly.
+ *
+ * The flags thus obtained overwrite
+ * all previous contents of this object.
+ */
+ void parse_parameters (ParameterHandler &prm);
};
/**
* #private# as well).
*/
int dummy;
+
+ public:
+ /**
+ * Declare all flags with name
+ * and type as offered by this
+ * class, for use in input files.
+ */
+ static void declare_parameters (ParameterHandler &prm);
+
+ /**
+ * Read the parameters declared in
+ * #declare_parameters# and set the
+ * flags for this output format
+ * accordingly.
+ *
+ * The flags thus obtained overwrite
+ * all previous contents of this object.
+ */
+ void parse_parameters (ParameterHandler &prm);
};
const bool draw_cells = true,
const bool shade_cells = true,
const ColorFunction color_function= &default_color_function);
+
+ /**
+ * Declare all flags with name
+ * and type as offered by this
+ * class, for use in input files.
+ *
+ * For coloring, only the color
+ * functions declared in this
+ * class are offered.
+ */
+ static void declare_parameters (ParameterHandler &prm);
+
+ /**
+ * Read the parameters declared in
+ * #declare_parameters# and set the
+ * flags for this output format
+ * accordingly.
+ *
+ * The flags thus obtained overwrite
+ * all previous contents of this object.
+ */
+ void parse_parameters (ParameterHandler &prm);
};
/**
* #private# as well).
*/
int dummy;
+
+ public:
+ /**
+ * Declare all flags with name
+ * and type as offered by this
+ * class, for use in input files.
+ */
+ static void declare_parameters (ParameterHandler &prm);
+
+ /**
+ * Read the parameters declared in
+ * #declare_parameters# and set the
+ * flags for this output format
+ * accordingly.
+ *
+ * The flags thus obtained overwrite
+ * all previous contents of this object.
+ */
+ void parse_parameters (ParameterHandler &prm);
};
/**
*/
static string get_output_format_names ();
+ /**
+ * Declare parameters for all output
+ * formats by declaring subsections
+ * within the parameter file for each
+ * output format and call the
+ * respective #declare_parameters#
+ * functions of the flag classes for
+ * each output format.
+ *
+ * Some of the declared subsections
+ * may not contain entries, if the
+ * respective format does not
+ * export any flags.
+ *
+ * Note that the top-level parameters
+ * denoting the number of subdivisions
+ * per patch and the output format
+ * are not declared, since they are
+ * only passed to virtual functions
+ * and are not stored inside objects
+ * of this type. You have to
+ * declare them yourself.
+ */
+ static void declare_parameters (ParameterHandler &prm);
+
+ /**
+ * Read the parameters declared in
+ * #declare_parameters# and set the
+ * flags for the output formats
+ * accordingly.
+ *
+ * The flags thus obtained overwrite
+ * all previous contents of the flag
+ * objects as default-constructed or
+ * set by the #set_flags# function.
+ */
+ void parse_parameters (ParameterHandler &prm);
+
/**
* Exception
*/
#include <base/data_out_base.h>
-
+#include <base/parameter_handler.h>
DataOutBase::UcdFlags::UcdFlags (const bool write_preamble) :
{};
+
+void DataOutBase::UcdFlags::declare_parameters (ParameterHandler &prm)
+{
+ prm.declare_entry ("Write preamble", "true", Patterns::Bool());
+};
+
+
+
+void DataOutBase::UcdFlags::parse_parameters (ParameterHandler &prm)
+{
+ write_preamble = prm.get_bool ("Write preamble");
+};
+
+
+
+void DataOutBase::GnuplotFlags::declare_parameters (ParameterHandler &/*prm*/)
+{
+};
+
+
+
+void DataOutBase::GnuplotFlags::parse_parameters (ParameterHandler &/*prm*/)
+{
+};
+
+
+
+void DataOutBase::PovrayFlags::declare_parameters (ParameterHandler &/*prm*/)
+{
+};
+
+
+
+void DataOutBase::PovrayFlags::parse_parameters (ParameterHandler &/*prm*/)
+{
+};
+
+
+
DataOutBase::EpsFlags::EpsFlags (const unsigned int height_vector,
const unsigned int color_vector,
const SizeType size_type,
+void DataOutBase::EpsFlags::declare_parameters (ParameterHandler &prm)
+{
+ prm.declare_entry ("Index of vector for height", "0",
+ Patterns::Integer());
+ prm.declare_entry ("Index of vector for color", "0",
+ Patterns::Integer());
+ prm.declare_entry ("Scale to width or height", "width",
+ Patterns::Selection ("width|height"));
+ prm.declare_entry ("Size (width or height) in eps units", "300",
+ Patterns::Integer());
+ prm.declare_entry ("Line widths in eps units", "0.5",
+ Patterns::Double());
+ prm.declare_entry ("Azimut angle", "60",
+ Patterns::Double());
+ prm.declare_entry ("Turn angle", "30",
+ Patterns::Double());
+ prm.declare_entry ("Scaling for z-axis", "1",
+ Patterns::Double ());
+ prm.declare_entry ("Draw mesh lines", "true",
+ Patterns::Bool());
+ prm.declare_entry ("Fill interior of cells", "true",
+ Patterns::Bool());
+ prm.declare_entry ("Color shading of interior of cells", "true",
+ Patterns::Bool());
+ prm.declare_entry ("Color function", "default",
+ Patterns::Selection ("default|grey scale"));
+};
+
+
+void DataOutBase::EpsFlags::parse_parameters (ParameterHandler &prm)
+{
+ height_vector = prm.get_integer ("Index of vector for height");
+ color_vector = prm.get_integer ("Index of vector for color");
+ if (prm.get ("Scale to width or height") == "width")
+ size_type = width;
+ else
+ size_type = height;
+ size = prm.get_integer ("Size (width or height) in eps units");
+ line_width = prm.get_double ("Line widths in eps units");
+ azimut_angle = prm.get_double ("Azimut angle");
+ turn_angle = prm.get_double ("Turn angle");
+ z_scaling = prm.get_double ("Scaling for z-axis");
+ draw_mesh = prm.get_bool ("Draw mesh lines");
+ draw_cells = prm.get_bool ("Fill interior of cells");
+ shade_cells = prm.get_bool ("Color shading of interior of cells");
+ if (prm.get("Color function") == "default")
+ color_function = &default_color_function;
+ else
+ color_function = &grey_scale_color_function;
+};
+
+
+
+void DataOutBase::GmvFlags::declare_parameters (ParameterHandler &/*prm*/)
+{
+};
+
+
+
+void DataOutBase::GmvFlags::parse_parameters (ParameterHandler &/*prm*/)
+{
+};
#include <base/data_out_base.h>
+#include <base/parameter_handler.h>
#include <iomanip>
#include <ctime>
#include <cmath>
+template <int dim>
+void DataOutInterface<dim>::declare_parameters (ParameterHandler &prm)
+{
+ prm.enter_subsection ("UCD output parameters");
+ UcdFlags::declare_parameters (prm);
+ prm.leave_subsection();
+
+ prm.enter_subsection ("Gnuplot output parameters");
+ GnuplotFlags::declare_parameters (prm);
+ prm.leave_subsection();
+
+ prm.enter_subsection ("Povray output parameters");
+ PovrayFlags::declare_parameters (prm);
+ prm.leave_subsection();
+
+ prm.enter_subsection ("Eps output parameters");
+ EpsFlags::declare_parameters (prm);
+ prm.leave_subsection();
+
+ prm.enter_subsection ("Gmv output parameters");
+ GmvFlags::declare_parameters (prm);
+ prm.leave_subsection();
+};
+
+
+
+template <int dim>
+void DataOutInterface<dim>::parse_parameters (ParameterHandler &prm)
+{
+ prm.enter_subsection ("UCD output parameters");
+ ucd_flags.parse_parameters (prm);
+ prm.leave_subsection();
+
+ prm.enter_subsection ("Gnuplot output parameters");
+ gnuplot_flags.parse_parameters (prm);
+ prm.leave_subsection();
+
+ prm.enter_subsection ("Povray output parameters");
+ povray_flags.parse_parameters (prm);
+ prm.leave_subsection();
+
+ prm.enter_subsection ("Eps output parameters");
+ eps_flags.parse_parameters (prm);
+ prm.leave_subsection();
+
+ prm.enter_subsection ("Gmv output parameters");
+ gmv_flags.parse_parameters (prm);
+ prm.leave_subsection();
+};
+
+
+