bool write_measure;
/**
- * Write all faces, including
- * interior faces. If
- * <tt>false</tt>, only
- * boundary faces are written.
+ * Write all faces, including interior faces. If <tt>false</tt>,
+ * only boundary faces are written.
*/
bool write_all_faces;
const bool write_all_faces = true);
/**
- * Declare parameters in
- * ParameterHandler.
+ * Declare parameters in ParameterHandler.
*/
static void declare_parameters (ParameterHandler ¶m);
/**
- * Parse parameters of
- * ParameterHandler.
+ * Parse parameters of ParameterHandler.
*/
void parse_parameters (ParameterHandler ¶m);
};
/**
- * Flags describing the details of
- * output in MSH format.
+ * Flags describing the details of output in MSH format.
*
* @ingroup output
*/
struct Msh
{
/**
- * When writing a mesh, write boundary
- * faces explicitly if their boundary
- * indicator is not the default
- * boundary indicator, which is zero.
- * This is necessary if you later
- * want to re-read the grid and want
- * to get the same boundary indicators
- * for the different parts of the
- * boundary of the triangulation.
+ * When writing a mesh, write boundary faces explicitly if their
+ * boundary indicator is not the default boundary indicator, which
+ * is zero. This is necessary if you later want to re-read the
+ * grid and want to get the same boundary indicators for the
+ * different parts of the boundary of the triangulation.
*
- * It is not necessary if you only want
- * to write the triangulation to
- * view or print it.
+ * It is not necessary if you only want to write the triangulation
+ * to view or print it.
*
* Default: @p false.
*/
bool write_faces;
/**
- * When writing a mesh, write boundary
- * lines explicitly if their boundary
- * indicator is not the default
- * boundary indicator, which is zero.
- * This is necessary if you later
- * want to re-read the grid and want
- * to get the same boundary indicators
- * for the different parts of the
- * boundary of the triangulation.
+ * When writing a mesh, write boundary lines explicitly if their
+ * boundary indicator is not the default boundary indicator,
+ * which is zero. This is necessary if you later want to re-read
+ * the grid and want to get the same boundary indicators for the
+ * different parts of the boundary of the triangulation.
*
- * It is not necessary if you only want
- * to write the triangulation to
- * view or print it.
+ * It is not necessary if you only want to write the
+ * triangulation to view or print it.
*
- * This is used only if
- * <tt>dim==3</tt>, and ignored
- * in all other cases.
+ * This is used only if <tt>dim==3</tt>, and ignored in all other
+ * cases.
*
* Default: @p false.
*/
Msh (const bool write_faces = false,
const bool write_lines = false);
/**
- * Declare parameters in
- * ParameterHandler.
+ * Declare parameters in ParameterHandler.
*/
static void declare_parameters (ParameterHandler ¶m);
/**
- * Parse parameters of
- * ParameterHandler.
+ * Parse parameters of ParameterHandler.
*/
void parse_parameters (ParameterHandler ¶m);
};
/**
- * Flags describing the details of
- * output in UCD format.
+ * Flags describing the details of output in UCD format.
*
* @ingroup output
*/
struct Ucd
{
/**
- * Write a comment at the
- * beginning of the file
- * stating the date of creation
- * and some other data. While
- * this is supported by the UCD
- * format (and the AVS
- * program), some other
- * programs get confused by
- * this, so the default is to
- * not write a
- * preamble. However, a
- * preamble can be written
- * using this flag.
+ * Write a comment at the beginning of the file stating the date
+ * of creation and some other data. While this is supported by
+ * the UCD format (and the AVS program), some other programs get
+ * confused by this, so the default is to not write a
+ * preamble. However, a preamble can be written using this flag.
*
* Default: <code>false</code>.
*/
bool write_preamble;
/**
- * When writing a mesh, write boundary
- * faces explicitly if their boundary
- * indicator is not the default
- * boundary indicator, which is zero.
- * This is necessary if you later
- * want to re-read the grid and want
- * to get the same boundary indicators
- * for the different parts of the
- * boundary of the triangulation.
+ * When writing a mesh, write boundary faces explicitly if their
+ * boundary indicator is not the default boundary indicator, which
+ * is zero. This is necessary if you later want to re-read the
+ * grid and want to get the same boundary indicators for the
+ * different parts of the boundary of the triangulation.
*
- * It is not necessary if you only want
- * to write the triangulation to
- * view or print it.
+ * It is not necessary if you only want to write the triangulation
+ * to view or print it.
*
* Default: @p false.
*/
bool write_faces;
/**
- * When writing a mesh, write boundary
- * lines explicitly if their boundary
- * indicator is not the default
- * boundary indicator, which is zero.
- * This is necessary if you later
- * want to re-read the grid and want
- * to get the same boundary indicators
- * for the different parts of the
- * boundary of the triangulation.
+ * When writing a mesh, write boundary lines explicitly if their
+ * boundary indicator is not the default boundary indicator, which
+ * is zero. This is necessary if you later want to re-read the
+ * grid and want to get the same boundary indicators for the
+ * different parts of the boundary of the triangulation.
*
- * It is not necessary if you only want
- * to write the triangulation to
- * view or print it.
+ * It is not necessary if you only want to write the triangulation
+ * to view or print it.
*
* This directive is ignored if
* <tt>dim!=3</tt>.
const bool write_lines = false);
/**
- * Declare parameters in
- * ParameterHandler.
+ * Declare parameters in ParameterHandler.
*/
static void declare_parameters (ParameterHandler ¶m);
/**
- * Parse parameters of
- * ParameterHandler.
+ * Parse parameters of ParameterHandler.
*/
void parse_parameters (ParameterHandler ¶m);
};
/**
- * Flags describing the details of
- * output in GNUPLOT format.
+ * Flags describing the details of output in GNUPLOT format.
*
* @ingroup output
*/
struct Gnuplot
{
/**
- * Write the number of each cell into
- * the output file before starting
- * with the lines it is composed of,
- * as a comment. This might be useful
- * if you want to find out details
- * about the grid, for example the
- * position of cells of which you
- * know the number. It enlarges
- * the size of the output
- * significantly, however.
+ * Write the number of each cell into the output file before
+ * starting with the lines it is composed of, as a comment. This
+ * might be useful if you want to find out details about the grid,
+ * for example the position of cells of which you know the
+ * number. It enlarges the size of the output significantly,
+ * however.
*
* Default: @p false.
*/
bool write_cell_numbers;
/**
- * Based on the vertices of the
- * face and
- * <tt>n_boundary_face_points</tt>
- * additional points a tensor
- * product mesh (tranformed to
- * the real space) of
- * $(n_boundary_face_points+2)^{dim-1}$
- * points is plotted on each
- * boundary face.
+ * Based on the vertices of the face and #n_boundary_face_points
+ * additional points a tensor product mesh (tranformed to the real
+ * space) of (#n_boundary_face_points+2)<sup>dim-1</sup> points is
+ * plotted on each boundary face.
*/
unsigned int n_boundary_face_points;
/**
- * Flag. If true also inner
- * cells are plotted with
- * curved boundaries. This is
- * useful when for e.g.
- * MappingQEulerian with
- * <code>n_boundary_face_points>0</code>.
+ * Flag. If true also inner cells are plotted with curved
+ * boundaries. This is useful when for e.g. MappingQEulerian with
+ * #n_boundary_face_points>.
*/
bool curved_inner_cells;
const unsigned int n_boundary_face_points = 2,
const bool curved_inner_cells = false);
/**
- * Declare parameters in
- * ParameterHandler.
+ * Declare parameters in ParameterHandler.
*/
static void declare_parameters (ParameterHandler ¶m);
/**
- * Parse parameters of
- * ParameterHandler.
+ * Parse parameters of ParameterHandler.
*/
void parse_parameters (ParameterHandler ¶m);
};
/**
- * Flags describing the details of
- * output for encapsulated postscript.
- * In this structure, the flags common
- * to all dimensions are listed. Flags
- * which are specific to one space
- * dimension only are listed in derived
- * classes.
+ * Flags describing the details of output for encapsulated
+ * postscript. In this structure, the flags common to all
+ * dimensions are listed. Flags which are specific to one space
+ * dimension only are listed in derived classes.
*
- * By default, the size of the picture
- * is scaled such that the width equals
- * 300 units.
+ * By default, the size of the picture is scaled such that the width
+ * equals 300 units.
*
* @ingroup output
*/
struct EpsFlagsBase
{
/**
- * Enum denoting the possibilities
- * whether the scaling should be done
- * such that the given @p size equals
- * the width or the height of
- * the resulting picture.
+ * Enum denoting the possibilities whether the scaling should be
+ * done such that the given @p size equals the width or the height
+ * of the resulting picture.
*/
enum SizeType
{
SizeType size_type;
/**
- * Width or height of the output
- * as given in postscript units
- * This usually is given by the
- * strange unit 1/72 inch. Whether
- * this is height or width is
- * specified by the flag
- * @p size_type.
+ * Width or height of the output as given in postscript units This
+ * usually is given by the strange unit 1/72 inch. Whether this is
+ * height or width is specified by the flag @p size_type.
*
* Default is 300.
*/
unsigned int size;
/**
- * Width of a line in postscript
- * units. Default is 0.5.
+ * Width of a line in postscript units. Default is 0.5.
*/
double line_width;
/**
- * Should lines with a set @p user_flag
- * be drawn in a different color (red)?
- * See @ref GlossUserFlags for
- * information about user flags.
+ * Should lines with a set @p user_flag be drawn in a different
+ * color (red)? See @ref GlossUserFlags for information about
+ * user flags.
*/
bool color_lines_on_user_flag;
/**
- * This is the number of
- * points on a boundary face,
- * that are ploted
- * additionally to the
- * vertices of the face.
+ * This is the number of points on a boundary face, that are
+ * ploted additionally to the vertices of the face.
*
- * This is used if the
- * mapping used is not the
- * standard @p MappingQ1
- * mapping.
+ * This is used if the mapping used is not the standard @p
+ * MappingQ1 mapping.
*/
unsigned int n_boundary_face_points;
/**
- * Should lines be colored
- * according to their
- * refinement level? This
- * overrides
- * color_lines_on_user_flag for
- * all levels except level 0.
- * Colors are: level 0: black,
- * other levels: rainbow scale
- * from blue to red.
+ * Should lines be colored according to their refinement level?
+ * This overrides color_lines_on_user_flag for all levels except
+ * level 0. Colors are: level 0: black, other levels: rainbow
+ * scale from blue to red.
*/
bool color_lines_level;
const unsigned int n_boundary_face_points = 2,
const bool color_lines_level = false);
/**
- * Declare parameters in
- * ParameterHandler.
+ * Declare parameters in ParameterHandler.
*/
static void declare_parameters (ParameterHandler ¶m);
/**
- * Flags describing the details of
- * output for encapsulated postscript
- * for all dimensions not explicitly
- * specialized below. Some flags that
- * are common to all dimensions are
- * listed in the base class.
+ * Flags describing the details of output for encapsulated
+ * postscript for all dimensions not explicitly specialized
+ * below. Some flags that are common to all dimensions are listed in
+ * the base class.
*
- * This class does not actually
- * exist, we only here declare the
- * general template and declare
- * explicit specializations below.
+ * This class does not actually exist, we only here declare the
+ * general template and declare explicit specializations below.
*
* @ingroup output
*/
{};
/**
- * Flags specific to the output of
- * grids in one space dimensions.
+ * Flags specific to the output of grids in one space dimensions.
*
* @ingroup output
*/
const bool color_lines_on_user_flag = false,
const unsigned int n_boundary_face_points = 2);
/**
- * Declare parameters in
- * ParameterHandler.
+ * Declare parameters in ParameterHandler.
*/
static void declare_parameters (ParameterHandler ¶m);
/**
- * Parse parameters of
- * ParameterHandler.
+ * Parse parameters of ParameterHandler.
*/
void parse_parameters (ParameterHandler ¶m);
};
/**
- * Flags specific to the output of
- * grids in two space dimensions.
+ * Flags specific to the output of grids in two space dimensions.
*
* @ingroup output
*/
struct Eps<2> : public EpsFlagsBase
{
/**
- * If this flag is set, then we
- * place the number of the cell
- * into the middle of each
- * cell. The default value is
- * to not do this.
+ * If this flag is set, then we place the number of the cell into
+ * the middle of each cell. The default value is to not do this.
*
- * The format of the cell
- * number written is
- * <tt>level.index</tt>, or simply
- * @p index, depending on the
- * value of the following flag.
+ * The format of the cell number written is <tt>level.index</tt>,
+ * or simply @p index, depending on the value of the following
+ * flag.
*/
bool write_cell_numbers;
/**
- * If the cell numbers shall be
- * written, using the above
- * flag, then the value of this
- * flag determines whether the
- * format shall be
- * <tt>level.index</tt>, or simply
- * @p index. If @p true, the
- * first format is
- * taken. Default is @p true.
+ * If the cell numbers shall be written, using the above flag,
+ * then the value of this flag determines whether the format shall
+ * be <tt>level.index</tt>, or simply @p index. If @p true, the
+ * first format is taken. Default is @p true.
*
- * The flag has obviously no
- * effect if
- * @p write_cell_numbers is
- * @p false.
+ * The flag has obviously no effect if @p write_cell_numbers is @p
+ * false.
*/
bool write_cell_number_level;
/**
- * Vertex numbers can be
- * written onto the
- * vertices. This is controlled
- * by the following
- * flag. Default is @p false.
+ * Vertex numbers can be written onto the vertices. This is
+ * controlled by the following flag. Default is @p false.
*/
bool write_vertex_numbers;
const bool write_vertex_numbers = false,
const bool color_lines_level = false);
/**
- * Declare parameters in
- * ParameterHandler.
+ * Declare parameters in ParameterHandler.
*/
static void declare_parameters (ParameterHandler ¶m);
/**
- * Parse parameters of
- * ParameterHandler.
+ * Parse parameters of ParameterHandler.
*/
void parse_parameters (ParameterHandler ¶m);
};
/**
- * Flags specific to the output of
- * grids in three space dimensions.
+ * Flags specific to the output of grids in three space dimensions.
*
* @ingroup output
*/
struct Eps<3> : public EpsFlagsBase
{
/**
- * Angle of the line origin-viewer
- * against the z-axis in degrees.
+ * Angle of the line origin-viewer against the z-axis in degrees.
*
- * Default is the Gnuplot-default
- * of 60.
+ * Default is the Gnuplot-default of 60.
*/
double azimut_angle;
/**
- * Angle by which the viewers
- * position projected onto the
- * x-y-plane is rotated around
- * the z-axis, in positive sense
- * when viewed from above. The
- * unit are degrees, and zero
- * equals a position above or below
- * the negative y-axis.
+ * Angle by which the viewers position projected onto the
+ * x-y-plane is rotated around the z-axis, in positive sense when
+ * viewed from above. The unit are degrees, and zero equals a
+ * position above or below the negative y-axis.
*
- * Default is the Gnuplot-default
- * of 30.
+ * Default is the Gnuplot-default of 30.
*/
double turn_angle;
const double azimut_angle = 60,
const double turn_angle = 30);
/**
- * Declare parameters in
- * ParameterHandler.
+ * Declare parameters in ParameterHandler.
*/
static void declare_parameters (ParameterHandler ¶m);
/**
- * Parse parameters of
- * ParameterHandler.
+ * Parse parameters of ParameterHandler.
*/
void parse_parameters (ParameterHandler ¶m);
};
/**
* @deprecated Use the color_by enum instead.
*
- * Change color depending on
- * level. Default is false, therefore,
- * color is coded by material or
- * boundary id.
+ * Change color depending on level. Default is false, therefore,
+ * color is coded by material or boundary id.
*/
bool level_color DEAL_II_DEPRECATED;
/**
- * Code level to depth. Default is
- * true. If false, color depends on
- * material or boundary id.
+ * Code level to depth. Default is true. If false, color depends
+ * on material or boundary id.
*
- * Depth of the object is 900-level, if
- * this value is true.
+ * Depth of the object is 900-level, if this value is true.
*/
bool level_depth;
/**
- * Additional points for curved
- * boundaries. Default is none.
+ * Additional points for curved boundaries. Default is none.
*/
unsigned int n_boundary_face_points;
/**
- * Scaling of graph. The
- * default is a unit length of
- * one inch.
+ * Scaling of graph. The default is a unit length of one inch.
*/
Point<2> scaling;
/**
- * Offset of the graph. Before
- * scaling, the coordinates are
- * shifted by this
- * value. Default is zero in
- * each direction.
+ * Offset of the graph. Before scaling, the coordinates are
+ * shifted by this value. Default is zero in each direction.
*/
Point<2> offset;
/**
- * Style for filling cells. Default is
- * solid fill (20). This value is
- * forwarded unchanged into the
- * corresponding field
- * <tt>fill_style</tt> of the polyline
- * object of XFig.
+ * Style for filling cells. Default is solid fill (20). This value
+ * is forwarded unchanged into the corresponding field
+ * <tt>fill_style</tt> of the polyline object of XFig.
*/
int fill_style;
/**
- * Style for drawing border lines of
- * polygons. Defaults to solid (0) and
- * is forwarded to XFig.
+ * Style for drawing border lines of polygons. Defaults to solid
+ * (0) and is forwarded to XFig.
*/
int line_style;
/**
- * Thickness of border lines of
- * polygons. Default is 1.
+ * Thickness of border lines of polygons. Default is 1.
*
- * Set this to zero to avoid
- * border lines for very fine
- * meshes.
+ * Set this to zero to avoid border lines for very fine meshes.
*/
int line_thickness;
/**
- * Style for drawing lines at the
- * boundary. Defaults to solid (0).
+ * Style for drawing lines at the boundary. Defaults to solid (0).
*/
int boundary_style;
/**
- * Thickness of boundary
- * lines. Default is 3.
+ * Thickness of boundary lines. Default is 3.
*/
int boundary_thickness;
*/
XFig();
/**
- * Declare parameters in
- * ParameterHandler.
+ * Declare parameters in ParameterHandler.
*/
static void declare_parameters (ParameterHandler ¶m);
/**
- * Parse parameters of
- * ParameterHandler.
+ * Parse parameters of ParameterHandler.
*/
void parse_parameters (ParameterHandler ¶m);
};
/**
* Flags controlling SVG output.
+ *
+ * @ingroup output
*/
struct Svg
{
*
* @ingroup grid
* @ingroup output
- * @author Wolfgang Bangerth, Guido Kanschat, Luca Heltai, 1999, 2003, 2006; postscript format based on an implementation by Stefan Nauber, 1999
+ * @author Wolfgang Bangerth, Guido Kanschat, Luca Heltai, 1999, 2003, 2006; SVG by Christian Wülker, 2013; postscript format based on an implementation by Stefan Nauber, 1999
*/
class GridOut
{
const Mapping<dim,spacedim> *mapping=0) const;
/**
- * Write the triangulation in the
- * msh format.
+ * Write the triangulation in the msh format.
*
- * Msh
- * is the format used by Gmsh and it is
- * described in the gmsh
- * user's guide. Besides the
- * usual output of the grid
- * only, you can decide through
- * additional flags (see below,
- * and the documentation of the
- * GridOutFlags::Msh() class)
- * whether boundary faces with
- * non-zero boundary indicator
- * shall be written to the file
- * explicitly. This is useful,
- * if you want to re-read the
- * grid later on, since
- * <tt>deal.II</tt> sets the boundary
- * indicator to zero by default;
- * therefore, to obtain the
- * same triangulation as before,
- * you have to specify faces
- * with differing boundary
- * indicators explicitly, which
- * is done by this flag.
+ * Msh is the format used by Gmsh and it is described in the gmsh
+ * user's guide. Besides the usual output of the grid only, you can
+ * decide through additional flags (see below, and the documentation
+ * of the GridOutFlags::Msh() class) whether boundary faces with
+ * non-zero boundary indicator shall be written to the file
+ * explicitly. This is useful, if you want to re-read the grid later
+ * on, since <tt>deal.II</tt> sets the boundary indicator to zero by
+ * default; therefore, to obtain the same triangulation as before,
+ * you have to specify faces with differing boundary indicators
+ * explicitly, which is done by this flag.
*
- * Names and values of further
- * flags controlling the output
- * can be found in the
- * documentation of the
- * GridOut::Msh() class.
+ * Names and values of further flags controlling the output can be
+ * found in the documentation of the GridOut::Msh() class.
*
- * Works also in the
- * codimension one case.
+ * Works also in the codimension one case.
*/
template <int dim, int spacedim>
void write_msh (const Triangulation<dim,spacedim> &tria,
std::ostream &out) const;
/**
- * Write the triangulation in the
- * ucd format.
+ * Write the triangulation in the ucd format.
*
- * UCD (unstructured cell data)
- * is the format used by AVS and
- * some other programs. It is
- * described in the AVS
- * developer's guide. Besides the
- * usual output of the grid
- * only, you can decide through
- * additional flags (see below,
- * and the documentation of the
- * GridOutFlags::Ucd() class)
- * whether boundary faces with
- * non-zero boundary indicator
- * shall be written to the file
- * explicitly. This is useful,
- * if you want to re-read the
- * grid later on, since
- * <tt>deal.II</tt> sets the boundary
- * indicator to zero by default;
- * therefore, to obtain the
- * same triangulation as before,
- * you have to specify faces
- * with differing boundary
- * indicators explicitly, which
- * is done by this flag.
+ * UCD (unstructured cell data) is the format used by AVS and some
+ * other programs. It is described in the AVS developer's
+ * guide. Besides the usual output of the grid only, you can decide
+ * through additional flags (see below, and the documentation of the
+ * GridOutFlags::Ucd() class) whether boundary faces with non-zero
+ * boundary indicator shall be written to the file explicitly. This
+ * is useful, if you want to re-read the grid later on, since
+ * <tt>deal.II</tt> sets the boundary indicator to zero by default;
+ * therefore, to obtain the same triangulation as before, you have
+ * to specify faces with differing boundary indicators explicitly,
+ * which is done by this flag.
*
- * Names and values of further
- * flags controlling the output
- * can be found in the
- * documentation of the
- * GridOut::Ucd() class.
+ * Names and values of further flags controlling the output can be
+ * found in the documentation of the GridOut::Ucd() class.
*
- * Works also for the
- * codimension one case.
+ * Works also for the codimension one case.
*/
template <int dim, int spacedim>
void write_ucd (const Triangulation<dim,spacedim> &tria,
std::ostream &out) const;
/**
- * Write the triangulation in the
- * encapsulated postscript format.
+ * Write the triangulation in the encapsulated postscript format.
*
- * In this format, each line of
- * the triangulation is written
- * separately. We scale the
- * picture such that either
- * x-values or y-values range
- * between zero and a fixed
- * size. The other axis is scaled
- * by the same factor. Which axis
- * is taken to compute the scale
- * and the size of the box it
- * shall fit into is determined
- * by the output flags (see
- * below, and the documentation
- * of the GridOutFlags::Eps()
- * class).
+ * In this format, each line of the triangulation is written
+ * separately. We scale the picture such that either x-values or
+ * y-values range between zero and a fixed size. The other axis is
+ * scaled by the same factor. Which axis is taken to compute the
+ * scale and the size of the box it shall fit into is determined by
+ * the output flags (see below, and the documentation of the
+ * GridOutFlags::Eps() class).
*
- * The bounding box is close to
- * the triangulation on all four
- * sides, without an extra
- * frame. The line width is
- * chosen to be 0.5 by default,
- * but can be changed. The line
- * width is to be compared with
- * the extension of the picture,
- * of which the default is 300.
+ * The bounding box is close to the triangulation on all four sides,
+ * without an extra frame. The line width is chosen to be 0.5 by
+ * default, but can be changed. The line width is to be compared
+ * with the extension of the picture, of which the default is 300.
*
- * The flag
- * @p color_lines_on_user_flag
- * allows to draw lines with the
- * @p user_flag set to be drawn in
- * red. The colors black and red
- * are defined as @p b and @p r in
- * the preamble of the output
- * file and can be changed there
- * according to need.
+ * The flag @p color_lines_on_user_flag allows to draw lines with
+ * the @p user_flag set to be drawn in red. The colors black and red
+ * are defined as @p b and @p r in the preamble of the output file
+ * and can be changed there according to need.
*
- * @p mapping is a pointer to a
- * mapping used for the
- * transformation of cells at the
- * boundary. If zero, then use
- * standard Q1 mapping.
+ * @p mapping is a pointer to a mapping used for the transformation
+ * of cells at the boundary. If zero, then use standard Q1 mapping.
*
- * Names and values of additional
- * flags controlling the output
- * can be found in the
- * documentation of the
- * GridOutFlags::Eps()
- * class. Especially the
- * viewpoint for three
- * dimensional grids is of
+ * Names and values of additional flags controlling the output can
+ * be found in the documentation of the GridOutFlags::Eps()
+ * class. Especially the viewpoint for three dimensional grids is of
* importance here.
*
- * Not implemented for the
- * codimension one case.
+ * Not implemented for the codimension one case.
*/
template <int dim>
void write_eps (const Triangulation<dim> &tria,
/**
* Write two-dimensional XFig-file.
*
- * This function writes all grid cells as
- * polygons and optionally boundary
- * lines. Several parameters can be
- * adjusted by the XFigFlags control
- * object.
+ * This function writes all grid cells as polygons and optionally
+ * boundary lines. Several parameters can be adjusted by the
+ * XFigFlags control object.
*
- * If levels are coded to depth, the
- * complete grid hierarchy is plotted
- * with fine cells before their
- * parents. This way, levels can be
- * switched on and off in xfig by
- * selecting levels.
+ * If levels are coded to depth, the complete grid hierarchy is
+ * plotted with fine cells before their parents. This way, levels
+ * can be switched on and off in xfig by selecting levels.
*
- * Polygons are either at depth 900-level
- * or at 900+@p material_id, depending on
- * the flag @p level_depth. Accordingly,
- * boundary edges are at depth 800-level
- * or at 800+@p boundary_id. Therefore,
- * boundary edges are alway in front of
- * cells.
+ * Polygons are either at depth 900-level or at 900+@p material_id,
+ * depending on the flag @p level_depth. Accordingly, boundary edges
+ * are at depth 800-level or at 800+@p boundary_id. Therefore,
+ * boundary edges are alway in front of cells.
*
- * Not implemented for the
- * codimension one case.
+ * Not implemented for the codimension one case.
*/
template <int dim>
void write_xfig (const Triangulation<dim> &tria,
const Mapping<dim> *mapping=0) const;
/**
- * Write the triangulation in the
- * SVG format.
+ * Write the triangulation in the SVG format.
*
- * SVG (Scalable Vector Graphics) is
- * an XML-based vector image format
- * recommended by the World Wide Web
- * Consortium (W3C). This function
- * conforms to the latest
- * specification SVG 1.1, released
+ * SVG (Scalable Vector Graphics) is an XML-based vector image
+ * format recommended by the World Wide Web Consortium (W3C). This
+ * function conforms to the latest specification SVG 1.1, released
* on August 16, 2011.
*
- * The cells of the triangulation
- * are written as polygons with
- * additional lines at the boundary
- * of the triangulation. A coloring
- * of the cells is further possible
- * in order to visualize a
- * certain property of the cells
- * such as their level or material
- * id. A colorbar can be drawn to
- * encode the chosen coloring.
- * Moreover, a cell label can be
- * added, showing level index, etc.
+ * The cells of the triangulation are written as polygons with
+ * additional lines at the boundary of the triangulation. A coloring
+ * of the cells is further possible in order to visualize a certain
+ * property of the cells such as their level or material id. A
+ * colorbar can be drawn to encode the chosen coloring. Moreover, a
+ * cell label can be added, showing level index, etc.
*
- * @note Only implemented for the
- * two-dimensional grids in two
- * space dimensions.
+ * @note Only implemented for two-dimensional grids in two space
+ * dimensions.
*
*/
template <int dim, int spacedim>
std::ostream &out) const;
/**
- * Write grid to @p out according
- * to the given data format. This
- * function simply calls the
- * appropriate <tt>write_*</tt>
- * function.
+ * Write grid to @p out according to the given data format. This
+ * function simply calls the appropriate <tt>write_*</tt> function.
*/
template <int dim, int spacedim>
void write (const Triangulation<dim,spacedim> &tria,
const Mapping<dim,spacedim> *mapping=0) const;
/**
- * Write mesh in default format
- * set by ParameterHandler.
+ * Write mesh in default format set by ParameterHandler.
*/
template <int dim, int spacedim>
void write (const Triangulation<dim,spacedim> &tria,
void set_flags (const GridOutFlags::Eps<2> &flags);
/**
- * Set flags for EPS output of a
- * three-dimensional triangulation
+ * Set flags for EPS output of a three-dimensional triangulation
*/
void set_flags (const GridOutFlags::Eps<3> &flags);
/**
- * Set flags for EPS output of a
- * three-dimensional triangulation
+ * Set flags for EPS output of a three-dimensional triangulation
*/
void set_flags (const GridOutFlags::XFig &flags);
* <li> @p eps: <tt>.eps</tt>.
* </ul>
*
- * 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.
+ * 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.
*/
static std::string default_suffix (const OutputFormat output_format);
/**
- * Default suffix for the default
- * output format selected throuw
+ * Default suffix for the default output format selected throuw
* ParameterHandler.
*/
std::string default_suffix () const;
/**
- * Return the @p OutputFormat value
- * corresponding to the given string. If
- * the string does not match any known
- * format, an exception is thrown.
+ * Return the @p OutputFormat 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.
+ * 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 <tt>get_output_format_names ()</tt>.
+ * 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.
+ * 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 in
- * ParameterHandler.
+ * Declare parameters in ParameterHandler.
*/
static void declare_parameters (ParameterHandler ¶m);
/**
- * Parse parameters of
- * ParameterHandler.
+ * Parse parameters of ParameterHandler.
*/
void parse_parameters (ParameterHandler ¶m);
/**
- * Determine an estimate for the
- * memory consumption (in bytes)
- * of this object.
+ * Determine an estimate for the memory consumption (in bytes) of
+ * this object.
*/
std::size_t memory_consumption () const;
private:
/**
- * The default output format, set
- * by a ParameterHandler.
+ * The default output format, set by a ParameterHandler.
*/
OutputFormat default_format;
GridOutFlags::DX dx_flags;
/**
- * Flags for GMSH output. Can be
- * changed by using the
- * @p set_flags function.
+ * Flags for GMSH output. Can be changed by using the set_flags(const GridOutFlags::Msh&)
+ * function.
*/
GridOutFlags::Msh msh_flags;
/**
- * Flags for UCD output. Can be
- * changed by using the
- * @p set_flags function.
+ * Flags for UCD output. Can be changed by using the set_flags(const GridOutFlags::Ucd&)
+ * function.
*/
GridOutFlags::Ucd ucd_flags;
/**
- * Flags to be used upon output of GNUPLOT
- * data. Can be changed by using the
- * @p set_flags function.
+ * Flags to be used upon output of GNUPLOT data. Can be changed by
+ * using the set_flags(const GridOutFlags::Gnuplot&) function.
*/
GridOutFlags::Gnuplot gnuplot_flags;
/**
* Flags to be used upon output of EPS
* data in one space dimension. Can be
- * changed by using the @p set_flags
+ * changed by using the set_flags(const GridOutFlags::Eps<1>&)
* function.
*/
GridOutFlags::Eps<1> eps_flags_1;
GridOutFlags::Svg svg_flags;
/**
- * Write the grid information about
- * faces to @p out. Only those faces
- * are printed which are on the boundary
- * and which have a boundary indicator
- * not equal to zero, since the latter
- * is the default for boundary faces.
+ * Write the grid information about faces to @p out. Only those
+ * faces are printed which are on the boundary and which have a
+ * boundary indicator not equal to zero, since the latter is the
+ * default for boundary faces.
*
- * Since cells and faces are continuously
- * numbered, the @p starting_index for
- * the numbering of the faces is passed
- * also.
+ * Since cells and faces are continuously numbered, the @p
+ * starting_index for the numbering of the faces is passed also.
*
- * This function unfortunately can not
- * be included in the regular @p write_msh
- * function, since it needs special
- * treatment for the case <tt>dim==1</tt>, in
- * which case the face iterators are
- * <tt>void*</tt>'s and lack the member functions
- * which are called. We would not actually
- * call these functions, but the compiler
- * would complain anyway when compiling
- * the function for <tt>dim==1</tt>. Bad luck.
+ * This function unfortunately can not be included in the regular @p
+ * write_msh function, since it needs special treatment for the case
+ * <tt>dim==1</tt>, in which case the face iterators are
+ * <tt>void*</tt>'s and lack the member functions which are
+ * called. We would not actually call these functions, but the
+ * compiler would complain anyway when compiling the function for
+ * <tt>dim==1</tt>. Bad luck.
*/
template <int dim, int spacedim>
void write_msh_faces (const Triangulation<dim,spacedim> &tria,
/**
- * Write the grid information about
- * lines to @p out. Only those lines
- * are printed which are on the boundary
- * and which have a boundary indicator
- * not equal to zero, since the latter
- * is the default for boundary faces.
+ * Write the grid information about lines to @p out. Only those
+ * lines are printed which are on the boundary and which have a
+ * boundary indicator not equal to zero, since the latter is the
+ * default for boundary faces.
*
- * Since cells and faces are continuously
- * numbered, the @p starting_index for
- * the numbering of the lines is passed
- * also.
+ * Since cells and faces are continuously numbered, the @p
+ * starting_index for the numbering of the lines is passed also.
*
- * This function unfortunately
- * can not be included in the
- * regular @p write_msh function,
- * since it needs special
- * treatment for the case
- * <tt>dim==1</tt> and
- * <tt>dim==2</tt>, in which case
- * the edge iterators are
- * <tt>void*</tt>'s and lack the
- * member functions which are
- * called. We would not actually
- * call these functions, but the
- * compiler would complain anyway
- * when compiling the function
+ * This function unfortunately can not be included in the regular @p
+ * write_msh function, since it needs special treatment for the case
+ * <tt>dim==1</tt> and <tt>dim==2</tt>, in which case the edge
+ * iterators are <tt>void*</tt>'s and lack the member functions
+ * which are called. We would not actually call these functions, but
+ * the compiler would complain anyway when compiling the function
* for <tt>dim==1/2</tt>. Bad luck.
*/
template <int dim, int spacedim>
std::ostream &out) const;
/**
- * Declaration of the specialization
- * of above function for 1d. Does
+ * Declaration of the specialization of above function for 1d. Does
* nothing.
*/
void write_msh_lines (const Triangulation<1,1> &tria,
std::ostream &out) const;
/**
- * Declaration of the specialization
- * of above function for 1d, 2sd. Does
- * nothing.
+ * Declaration of the specialization of above function for 1d,
+ * 2sd. Does nothing.
*/
void write_msh_lines (const Triangulation<1,2> &tria,
const unsigned int starting_index,
const unsigned int starting_index,
std::ostream &out) const;
/**
- * Declaration of the specialization
- * of above function for 2d. Does
+ * Declaration of the specialization of above function for 2d. Does
* nothing.
*/
void write_msh_lines (const Triangulation<2,2> &tria,
const unsigned int starting_index,
std::ostream &out) const;
/**
- * Declaration of the specialization
- * of above function for 2d, 3sd. Does
- * nothing.
+ * Declaration of the specialization of above function for 2d,
+ * 3sd. Does nothing.
*/
void write_msh_lines (const Triangulation<2,3> &tria,
const unsigned int starting_index,
std::ostream &out) const;
/**
- * Write the grid information about
- * faces to @p out. Only those faces
- * are printed which are on the boundary
- * and which have a boundary indicator
- * not equal to zero, since the latter
- * is the default for boundary faces.
+ * Write the grid information about faces to @p out. Only those
+ * faces are printed which are on the boundary and which have a
+ * boundary indicator not equal to zero, since the latter is the
+ * default for boundary faces.
*
- * Since cells and faces are continuously
- * numbered, the @p starting_index for
- * the numbering of the faces is passed
- * also.
+ * Since cells and faces are continuously numbered, the @p
+ * starting_index for the numbering of the faces is passed also.
*
- * This function unfortunately can not
- * be included in the regular @p write_ucd
- * function, since it needs special
- * treatment for the case <tt>dim==1</tt>, in
- * which case the face iterators are
- * <tt>void*</tt>'s and lack the member functions
- * which are called. We would not actually
- * call these functions, but the compiler
- * would complain anyway when compiling
- * the function for <tt>dim==1</tt>. Bad luck.
+ * This function unfortunately can not be included in the regular @p
+ * write_ucd function, since it needs special treatment for the case
+ * <tt>dim==1</tt>, in which case the face iterators are
+ * <tt>void*</tt>'s and lack the member functions which are
+ * called. We would not actually call these functions, but the
+ * compiler would complain anyway when compiling the function for
+ * <tt>dim==1</tt>. Bad luck.
*/
std::ostream &out) const;
/**
- * Declaration of the specialization
- * of above function for 1d. Does
+ * Declaration of the specialization of above function for 1d. Does
* nothing.
*/
void write_ucd_faces (const Triangulation<1,1> &tria,
std::ostream &out) const;
/**
- * Declaration of the specialization
- * of above function for 1d, 2sd. Does
- * nothing.
+ * Declaration of the specialization of above function for 1d,
+ * 2sd. Does nothing.
*/
void write_ucd_faces (const Triangulation<1,2> &tria,
const unsigned int starting_index,
/**
- * Write the grid information about
- * lines to @p out. Only those lines
- * are printed which are on the boundary
- * and which have a boundary indicator
- * not equal to zero, since the latter
- * is the default for boundary lines.
+ * Write the grid information about lines to @p out. Only those
+ * lines are printed which are on the boundary and which have a
+ * boundary indicator not equal to zero, since the latter is the
+ * default for boundary lines.
*
- * Since cells, faces and lines
- * are continuously numbered, the
- * @p starting_index for the
- * numbering of the faces is
- * passed also.
+ * Since cells, faces and lines are continuously numbered, the @p
+ * starting_index for the numbering of the faces is passed also.
*
- * This function unfortunately can not
- * be included in the regular @p write_ucd
- * function, since it needs special
- * treatment for the case <tt>dim==1/2</tt>, in
- * which case the edge iterators are
- * <tt>void*</tt>'s and lack the member functions
- * which are called. We would not actually
- * call these functions, but the compiler
- * would complain anyway when compiling
- * the function for <tt>dim==1/2</tt>. Bad luck.
+ * This function unfortunately can not be included in the regular @p
+ * write_ucd function, since it needs special treatment for the case
+ * <tt>dim==1/2</tt>, in which case the edge iterators are
+ * <tt>void*</tt>'s and lack the member functions which are
+ * called. We would not actually call these functions, but the
+ * compiler would complain anyway when compiling the function for
+ * <tt>dim==1/2</tt>. Bad luck.
*/
std::ostream &out) const;
/**
- * Declaration of the specialization
- * of above function for 1d. Does
+ * Declaration of the specialization of above function for 1d. Does
* nothing.
*/
void write_ucd_lines (const Triangulation<1,1> &tria,
const unsigned int starting_index,
std::ostream &out) const;
/**
- * Declaration of the specialization
- * of above function for 1d, 2sd. Does
- * nothing.
+ * Declaration of the specialization of above function for 1d,
+ * 2sd. Does nothing.
*/
void write_ucd_lines (const Triangulation<1,2> &tria,
const unsigned int starting_index,
/**
- * Declaration of the specialization
- * of above function for 2d. Does
+ * Declaration of the specialization of above function for 2d. Does
* nothing.
*/
void write_ucd_lines (const Triangulation<2,2> &tria,
const unsigned int starting_index,
std::ostream &out) const;
/**
- * Declaration of the specialization
- * of above function for 2d, 3sd. Does
- * nothing.
+ * Declaration of the specialization of above function for 2d,
+ * 3sd. Does nothing.
*/
void write_ucd_lines (const Triangulation<2,3> &tria,
const unsigned int starting_index,
std::ostream &out) const;
/**
- * Return the number of faces in the
- * triangulation which have a boundary
- * indicator not equal to zero. Only
- * these faces are explicitly printed
- * in the <tt>write_*</tt> functions;
- * all faces with indicator
- * numbers::internal_face_boundary_id are
- * interior ones and an indicator with
- * value zero for faces at the boundary
+ * Return the number of faces in the triangulation which have a
+ * boundary indicator not equal to zero. Only these faces are
+ * explicitly printed in the <tt>write_*</tt> functions; all faces
+ * with indicator numbers::internal_face_boundary_id are interior
+ * ones and an indicator with value zero for faces at the boundary
* are considered default.
*
- * This function always returns an empty
- * list in one dimension.
+ * This function always returns an empty list in one dimension.
*
- * The reason for this function is the
- * same as for @p write_ucd_faces. See
- * there for more information.
+ * The reason for this function is the same as for
+ * write_ucd_faces(). See there for more information.
*/
template <int dim, int spacedim>
unsigned int n_boundary_faces (const Triangulation<dim,spacedim> &tria) const;
/**
- * Declaration of the specialization
- * of above function for
+ * Declaration of the specialization of above function for
* 1d. Simply returns zero.
*/
unsigned int n_boundary_faces (const Triangulation<1,1> &tria) const;
/**
- * Declaration of the specialization
- * of above function for
- * 1d, 2sd. Simply returns zero.
+ * Declaration of the specialization of above function for 1d,
+ * 2sd. Simply returns zero.
*/
unsigned int n_boundary_faces (const Triangulation<1,2> &tria) const;
unsigned int n_boundary_faces (const Triangulation<1,3> &tria) const;
/**
- * Return the number of lines in the
- * triangulation which have a boundary
- * indicator not equal to zero. Only
- * these lines are explicitly printed
- * in the <tt>write_*</tt> functions;
- * all lines with indicator
- * numbers::internal_face_boundary_id are
- * interior ones and an indicator with
- * value zero for faces at the boundary
+ * Return the number of lines in the triangulation which have a
+ * boundary indicator not equal to zero. Only these lines are
+ * explicitly printed in the <tt>write_*</tt> functions; all lines
+ * with indicator numbers::internal_face_boundary_id are interior
+ * ones and an indicator with value zero for faces at the boundary
* are considered default.
*
- * This function always returns an empty
- * list in one and two dimensions.
+ * This function always returns an empty list in one and two
+ * dimensions.
*
- * The reason for this function is the
- * same as for @p write_ucd_faces. See
- * there for more information.
+ * The reason for this function is the same as for
+ * write_ucd_faces(). See there for more information.
*/
template <int dim, int spacedim>
unsigned int n_boundary_lines (const Triangulation<dim,spacedim> &tria) const;
/**
- * Declaration of the specialization
- * of above function for
+ * Declaration of the specialization of above function for
* 1d. Simply returns zero.
*/
unsigned int n_boundary_lines (const Triangulation<1,1> &tria) const;
/**
- * Declaration of the specialization
- * of above function for
- * 1d, 2sd. Simply returns zero.
+ * Declaration of the specialization of above function for 1d,
+ * 2sd. Simply returns zero.
*/
unsigned int n_boundary_lines (const Triangulation<1,2> &tria) const;
unsigned int n_boundary_lines (const Triangulation<1,3> &tria) const;
/**
- * Declaration of the specialization
- * of above function for
+ * Declaration of the specialization of above function for
* 2d. Simply returns zero.
*/
unsigned int n_boundary_lines (const Triangulation<2,2> &tria) const;
/**
- * Declaration of the specialization
- * of above function for
- * 2d, 3sd. Simply returns zero.
+ * Declaration of the specialization of above function for 2d,
+ * 3sd. Simply returns zero.
*/
unsigned int n_boundary_lines (const Triangulation<2,3> &tria) const;
};
// seem to possess this attribute ...
const unsigned int height = 4000; // TODO [CW]: consider other options ...
-
- unsigned int cell_label_font_size = round((height/100.) * 2.25); // initial font size for cell labels
- unsigned int font_size = round((height/100.) * 2.); // font size for date, time, legend, and colorbar
+// the following
+
+ unsigned int cell_label_font_size = static_cast<int>(0.5+ (height/100.) * 2.25); // initial font size for cell labels
+ unsigned int font_size = static_cast<int>(0.5+ (height/100.) * 2.); // font size for date, time, legend, and colorbar
// get date and time
time_t time_stamp;
if (cell->vertex(vertex_index)[1] < y_min) y_min = cell->vertex(vertex_index)[1];
if (cell->vertex(vertex_index)[1] > y_max) y_max = cell->vertex(vertex_index)[1];
}
-
+
if ((unsigned int)cell->level() < min_level) min_level = cell->level();
if ((unsigned int)cell->level() > max_level) max_level = cell->level();
-
+
if ((unsigned int)cell->material_id()) materials[(unsigned int)cell->material_id()] = 1;
else if ((unsigned int)cell->material_id() == 0) materials[0] = 1;
-
+
if ((int)cell->level()) levels[(unsigned int)cell->level()] = 1;
else if ((unsigned int)cell->level() == 0) levels[0] = 1;
const double x_dimension = x_max - x_min;
const double y_dimension = y_max - y_min;
-
+
// count the materials being used
for (unsigned int material_index = 0; material_index < 256; material_index++)
{
if (materials[material_index]) n_materials++;
}
-
+
// count the levels being used
for (unsigned int level_index = 0; level_index < 256; level_index++)
{
if (levels[level_index]) n_levels++;
}
-
+
// count the subdomains being used
for (unsigned int subdomain_index = 0; subdomain_index < 256; subdomain_index++)
{
if (subdomains[subdomain_index]) n_subdomains++;
}
-
+
/*
// count the level subdomains being used
for(int level_subdomain_index = 0; level_subdomain_index < 256; level_subdomain_index++)
*/
//------------------ create the svg file with internal style sheet
- const unsigned int width = round(height * (x_dimension/y_dimension));
+ const unsigned int width = static_cast<int>(0.5+ height * (x_dimension/y_dimension));
unsigned int additional_width = 0;
- if (svg_flags.draw_legend && (svg_flags.label_level_number || svg_flags.label_cell_index || svg_flags.label_material_id || svg_flags.label_subdomain_id)) // || svg_flags.label_level_subdomain_id ))
+ if (svg_flags.draw_legend &&
+ (svg_flags.label_level_number ||
+ svg_flags.label_cell_index ||
+ svg_flags.label_material_id ||
+ svg_flags.label_subdomain_id)) // || svg_flags.label_level_subdomain_id ))
{
- additional_width = round(height * .4); // additional width for legend
+ additional_width = static_cast<int>(0.5+ height * .4); // additional width for legend
}
else if (svg_flags.draw_colorbar && svg_flags.coloring)
{
- additional_width = round(height * .175); // additional width for colorbar // TODO [CW]: not enough / automatic adjustment ...
+ additional_width = static_cast<int>(0.5+ height * .175); // additional width for colorbar // TODO [CW]: not enough / automatic adjustment ...
}
out << "<!-- deal.ii GridOut " << now->tm_mday << '/' << now->tm_mon + 1 << '/' << now->tm_year + 1900
<< ' ' << now->tm_hour << ':';
-
+
if (now->tm_min < 10) out << '0';
-
+
out << now->tm_min << " -->"
<< '\n' << '\n';
-
+
// basic svg header and inclusion of the corresponding style sheet
- out << "<svg width=\"" << width + additional_width << "\" height=\"" << height << "\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">"
+ out << "<svg width=\"" << width + additional_width << "\" height=\"" << height
+ << "\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">"
<< '\n' << '\n';
-
+
if (svg_flags.background == 2)
{
out << " <linearGradient id=\"background_gradient\" gradientUnits=\"userSpaceOnUse\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"" << height << "\">" << '\n'
<< " </linearGradient>"
<< '\n';
}
-
+
out << '\n';
-
+
out << "<style type=\"text/css\"><![CDATA["
<< '\n';
-
+
if (svg_flags.background == 0) out << " rect.background{fill:none}" << '\n';
else if (svg_flags.background == 1) out << " rect.background{fill:white}" << '\n';
else out << " rect.background{fill:url(#background_gradient)}" << '\n';
-
+
// basic svg graphic element styles
out << " rect{fill:none; stroke:rgb(25,25,25); stroke-width:" << svg_flags.line_thickness << '}' << '\n'
<< " text{font-family:Helvetica; text-anchor:middle; fill:rgb(25,25,25)}" << '\n'
<< " line{stroke:rgb(25,25,25); stroke-width:" << svg_flags.boundary_line_thickness << '}' << '\n'
<< " path{fill:none; stroke:rgb(25,25,25); stroke-width:" << svg_flags.line_thickness << '}' << '\n';
-
+
out << '\n';
-
+
for (unsigned int level_index = min_level; level_index <= max_level; level_index++)
{
int font_size = cell_label_font_size * std::pow(.5, 1.*(level_index - min_level));
-
+
out << " text.l" << level_index << "{font-family:Helvetica; text-anchor:middle;"
<< "fill:rgb(25,25,25); font-size:" << font_size << '}'
<< '\n';
switch (i % 6)
{
case 0:
- r = 255, g = round(255*t); break;
+ r = 255;
+ g = static_cast<int>(0.5+ 255*t);
+ break;
case 1:
- r = round(255*q), g = 255; break;
+ r = static_cast<int>(0.5+ 255*q);
+ g = 255;
+ break;
case 2:
- g = 255, b = round(255*t); break;
+ g = 255;
+ b = static_cast<int>(0.5+ 255*t);
+ break;
case 3:
- g = round(255*q), b = 255; break;
+ g = static_cast<int>(0.5+ 255*q);
+ b = 255;
+ break;
case 4:
- r = round(255*t), b = 255; break;
+ r = static_cast<int>(0.5+ 255*t);
+ b = 255;
+ break;
case 5:
- r = 255, b = round(255*q); break;
- default: break;
+ r = 255;
+ b = static_cast<int>(0.5+ 255*q);
+ break;
+ default:
+ break;
}
switch (svg_flags.coloring)
out << " ]]></style>"
<< '\n' << '\n';
- out << " <rect class=\"background\" width=\"" << width + additional_width << "\" height=\"" << height << "\"/>"
+ out << " <rect class=\"background\" width=\"" << width + additional_width
+ << "\" height=\"" << height << "\"/>"
<< '\n';
-
+
if (svg_flags.background == 2)
{
unsigned int x_offset = 0;
-
- if (svg_flags.margin_in_percent) x_offset = round((height/100.) * (svg_flags.margin_in_percent/2.));
- else x_offset = round(height * .025);
-
- out << " <text x=\"" << x_offset << "\" y=\"" << round(height * .045) << '\"'
- << " style=\"font-weight:100; fill:lightsteelblue; text-anchor:start; font-family:Courier; font-size:" << round(height * .035) << "\">"
+
+ if (svg_flags.margin_in_percent)
+ x_offset = static_cast<int>(0.5+ (height/100.) * (svg_flags.margin_in_percent/2.));
+ else
+ x_offset = static_cast<int>(0.5+ height * .025);
+
+ out << " <text x=\"" << x_offset << "\" y=\"" << static_cast<int>(0.5+ height * .045) << '\"'
+ << " style=\"font-weight:100; fill:lightsteelblue; text-anchor:start; font-family:Courier; font-size:"
+ << static_cast<int>(0.5+ height * .035) << "\">"
<< "deal.II" << "</text>"
<< '\n';
-
- out << " <text x=\"" << x_offset + round(height * .045 * 3.75) << "\" y=\"" << round(height * .045) << '\"'
- << " style=\"fill:lightsteelblue; text-anchor:start; font-size:" << round(font_size * .75) << "\">"
+
+ out << " <text x=\"" << x_offset + static_cast<int>(0.5+ height * .045 * 3.75) << "\" y=\"" << static_cast<int>(0.5+ height * .045) << '\"'
+ << " style=\"fill:lightsteelblue; text-anchor:start; font-size:" << static_cast<int>(0.5+ font_size * .75) << "\">"
<< now->tm_mday << '/' << now->tm_mon + 1 << '/' << now->tm_year + 1900
<< " - " << now->tm_hour << ':';
-
+
if (now->tm_min < 10) out << '0';
-
+
out << now->tm_min
<< "</text>"
<< '\n' << '\n';
}
out << " d=\""
- << "M " << round(((cell->vertex(0)[0] - x_min) / x_dimension) * (width - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
- << ' ' << round(((cell->vertex(0)[1] - y_min) / y_dimension) * (height - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
- << " L " << round(((cell->vertex(1)[0] - x_min) / x_dimension) * (width - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
- << ' ' << round(((cell->vertex(1)[1] - y_min) / y_dimension) * (height - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
- << " L " << round(((cell->vertex(3)[0] - x_min) / x_dimension) * (width - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
- << ' ' << round(((cell->vertex(3)[1] - y_min) / y_dimension) * (height - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
- << " L " << round(((cell->vertex(2)[0] - x_min) / x_dimension) * (width - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
- << ' ' << round(((cell->vertex(2)[1] - y_min) / y_dimension) * (height - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
- << " L " << round(((cell->vertex(0)[0] - x_min) / x_dimension) * (width - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
- << ' ' << round(((cell->vertex(0)[1] - y_min) / y_dimension) * (height - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << "M " << static_cast<int>(0.5+ ((cell->vertex(0)[0] - x_min) / x_dimension) * (width - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << ' ' << static_cast<int>(0.5+ ((cell->vertex(0)[1] - y_min) / y_dimension) * (height - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << " L " << static_cast<int>(0.5+ ((cell->vertex(1)[0] - x_min) / x_dimension) * (width - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << ' ' << static_cast<int>(0.5+ ((cell->vertex(1)[1] - y_min) / y_dimension) * (height - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << " L " << static_cast<int>(0.5+ ((cell->vertex(3)[0] - x_min) / x_dimension) * (width - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << ' ' << static_cast<int>(0.5+ ((cell->vertex(3)[1] - y_min) / y_dimension) * (height - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << " L " << static_cast<int>(0.5+ ((cell->vertex(2)[0] - x_min) / x_dimension) * (width - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << ' ' << static_cast<int>(0.5+ ((cell->vertex(2)[1] - y_min) / y_dimension) * (height - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << " L " << static_cast<int>(0.5+ ((cell->vertex(0)[0] - x_min) / x_dimension) * (width - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << ' ' << static_cast<int>(0.5+ ((cell->vertex(0)[1] - y_min) / y_dimension) * (height - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
<< "\"/>"
<< '\n';
// label the current cell
- if (svg_flags.label_level_number || svg_flags.label_cell_index || svg_flags.label_material_id || svg_flags.label_subdomain_id) // || svg_flags.label_level_subdomain_id)
+ if (svg_flags.label_level_number ||
+ svg_flags.label_cell_index ||
+ svg_flags.label_material_id ||
+ svg_flags.label_subdomain_id) // || svg_flags.label_level_subdomain_id)
{
out << " <text class=\"l" << cell->level()
- << "\" x=\"" << round(((cell->center()[0] - x_min) / x_dimension) * (width - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
- << "\" y=\"" << round(((cell->center()[1] - y_min) / y_dimension) * (height - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << "\" x=\"" << static_cast<int>(0.5+ ((cell->center()[0] - x_min) / x_dimension) * (width - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << "\" y=\"" << static_cast<int>(0.5+ ((cell->center()[1] - y_min) / y_dimension) * (height - (height/100.) * 2. * svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
<< "\">";
if (svg_flags.label_level_number)
if (svg_flags.label_material_id)
{
- if (svg_flags.label_level_number || svg_flags.label_cell_index) out << ',';
+ if (svg_flags.label_level_number
+ || svg_flags.label_cell_index) out << ',';
out << (int)cell->material_id();
}
if (svg_flags.label_subdomain_id)
{
- if (svg_flags.label_level_number || svg_flags.label_cell_index || svg_flags.label_material_id) out << ',';
+ if (svg_flags.label_level_number
+ || svg_flags.label_cell_index
+ || svg_flags.label_material_id) out << ',';
out << cell->subdomain_id();
}
/*
{
if (cell->at_boundary(faceIndex))
{
- out << " <line x1=\"" << round(((cell->face(faceIndex)->vertex(0)[0] - x_min)/x_dimension) * (width - (height/100.) *2.* svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
- << "\" y1=\"" << round(((cell->face(faceIndex)->vertex(0)[1] - y_min)/y_dimension) * (height - (height/100.) *2.* svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
- << "\" x2=\"" << round(((cell->face(faceIndex)->vertex(1)[0] - x_min)/x_dimension) * (width - (height/100.) *2.* svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
- << "\" y2=\"" << round(((cell->face(faceIndex)->vertex(1)[1] - y_min)/y_dimension) * (height - (height/100.) *2.* svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ out << " <line x1=\"" << static_cast<int>(0.5+ ((cell->face(faceIndex)->vertex(0)[0] - x_min)/x_dimension) * (width - (height/100.) *2.* svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << "\" y1=\"" << static_cast<int>(0.5+ ((cell->face(faceIndex)->vertex(0)[1] - y_min)/y_dimension) * (height - (height/100.) *2.* svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << "\" x2=\"" << static_cast<int>(0.5+ ((cell->face(faceIndex)->vertex(1)[0] - x_min)/x_dimension) * (width - (height/100.) *2.* svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
+ << "\" y2=\"" << static_cast<int>(0.5+ ((cell->face(faceIndex)->vertex(1)[1] - y_min)/y_dimension) * (height - (height/100.) *2.* svg_flags.margin_in_percent) + ((height/100.) * svg_flags.margin_in_percent))
<< "\"/>"
<< '\n';
}
}
//------------------ draw the legend
- if (svg_flags.draw_legend && (svg_flags.label_level_number || svg_flags.label_cell_index || svg_flags.label_material_id || svg_flags.label_subdomain_id)) // || svg_flags.label_level_subdomain_id ))
+ if (svg_flags.draw_legend &&
+ (svg_flags.label_level_number ||
+ svg_flags.label_cell_index ||
+ svg_flags.label_material_id ||
+ svg_flags.label_subdomain_id)) // || svg_flags.label_level_subdomain_id ))
{
out << '\n';
<< '\n';
unsigned int additional_width = 0;
- if (!svg_flags.margin_in_percent) additional_width = round((height/100.) * 2.5);
+ if (!svg_flags.margin_in_percent) additional_width = static_cast<int>(0.5+ (height/100.) * 2.5);
- out << " <rect x=\"" << width + additional_width << "\" y=\"" << round((height/100.) * svg_flags.margin_in_percent)
- << "\" width=\"" << round((height/100.) * (40. - svg_flags.margin_in_percent)) << "\" height=\"" << round(height*.2) << "\"/>"
+ out << " <rect x=\"" << width + additional_width << "\" y=\""
+ << static_cast<int>(0.5+ (height/100.) * svg_flags.margin_in_percent)
+ << "\" width=\"" << static_cast<int>(0.5+ (height/100.) * (40. - svg_flags.margin_in_percent))
+ << "\" height=\"" << static_cast<int>(0.5+ height*.2) << "\"/>"
<< '\n';
unsigned int line_offset = 0;
- out << " <text x=\"" << width + additional_width + round((height/100.) * 1.25)
- << "\" y=\"" << round((height/100.) * svg_flags.margin_in_percent + (++line_offset) * 1.5 * font_size)
+ out << " <text x=\"" << width + additional_width + static_cast<int>(0.5+ (height/100.) * 1.25)
+ << "\" y=\"" << static_cast<int>(0.5+ (height/100.) * svg_flags.margin_in_percent + (++line_offset) * 1.5 * font_size)
<< "\" style=\"text-anchor:start; font-weight:bold; font-size:" << font_size
<< "\">"
<< "cell label"
if (svg_flags.label_level_number)
{
- out << " <text x=\"" << width + additional_width + round((height/100.) * 2.)
- << "\" y=\"" << round((height/100.) * svg_flags.margin_in_percent + (++line_offset) * 1.5 * font_size)
+ out << " <text x=\"" << width + additional_width + static_cast<int>(0.5+ (height/100.) * 2.)
+ << "\" y=\"" << static_cast<int>(0.5+ (height/100.) * svg_flags.margin_in_percent + (++line_offset) * 1.5 * font_size)
<< "\" style=\"text-anchor:start; font-style:oblique; font-size:" << font_size
<< "\">"
<< "level_number";
if (svg_flags.label_cell_index)
{
- out << " <text x=\"" << width + additional_width + round((height/100.) * 2.)
- << "\" y=\"" << round((height/100.) * svg_flags.margin_in_percent + (++line_offset) * 1.5 * font_size )
+ out << " <text x=\"" << width + additional_width + static_cast<int>(0.5+ (height/100.) * 2.)
+ << "\" y=\"" << static_cast<int>(0.5+ (height/100.) * svg_flags.margin_in_percent + (++line_offset) * 1.5 * font_size )
<< "\" style=\"text-anchor:start; font-style:oblique; font-size:" << font_size
<< "\">"
<< "cell_index";
if (svg_flags.label_material_id)
{
- out << " <text x=\"" << width + additional_width + round((height/100.) * 2.)
- << "\" y=\"" << round((height/100.) * svg_flags.margin_in_percent + (++line_offset) * 1.5 * font_size )
+ out << " <text x=\"" << width + additional_width + static_cast<int>(0.5+ (height/100.) * 2.)
+ << "\" y=\"" << static_cast<int>(0.5+ (height/100.) * svg_flags.margin_in_percent + (++line_offset) * 1.5 * font_size )
<< "\" style=\"text-anchor:start; font-style:oblique; font-size:" << font_size
<< "\">"
<< "material_id";
if (svg_flags.label_subdomain_id)
{
- out << " <text x= \"" << width + additional_width + round((height/100.) * 2.)
- << "\" y=\"" << round((height/100.) * svg_flags.margin_in_percent + (++line_offset) * 1.5 * font_size )
+ out << " <text x= \"" << width + additional_width + static_cast<int>(0.5+ (height/100.) * 2.)
+ << "\" y=\"" << static_cast<int>(0.5+ (height/100.) * svg_flags.margin_in_percent + (++line_offset) * 1.5 * font_size )
<< "\" style=\"text-anchor:start; font-style:oblique; font-size:" << font_size
<< "\">"
<< "subdomain_id";
/*
if(svg_flags.label_level_subdomain_id)
{
- out << " <text x= \"" << width + additional_width + round((height/100.) * 2.)
- << "\" y=\"" << round((height/100.) * svg_flags.margin_in_percent + (++line_offset) * 1.5 * font_size )
+ out << " <text x= \"" << width + additional_width + static_cast<int>(0.5+ (height/100.) * 2.)
+ << "\" y=\"" << static_cast<int>(0.5+ (height/100.) * svg_flags.margin_in_percent + (++line_offset) * 1.5 * font_size )
<< "\" style=\"text-anchor:start; font-style:oblique; font-size:" << font_size
<< "\">"
<< "level_subdomain_id"
<< '\n';
unsigned int additional_width = 0;
- if (!svg_flags.margin_in_percent) additional_width = round((height/100.) * 2.5);
+ if (!svg_flags.margin_in_percent) additional_width = static_cast<int>(0.5+ (height/100.) * 2.5);
unsigned int n = 0;
out << " <text x=\"" << width + additional_width
- << "\" y=\"" << round((height/100.) * (svg_flags.margin_in_percent+27.5) - (font_size/1.25))
+ << "\" y=\"" << static_cast<int>(0.5+ (height/100.) * (svg_flags.margin_in_percent+27.5) - (font_size/1.25))
<< "\" style=\"text-anchor:start; font-weight:bold; font-size:" << font_size << "\">";
switch (svg_flags.coloring)
<< '\n';
unsigned int element_height = floor(((height/100.) * (72.5 - 2.*svg_flags.margin_in_percent)) / n);
- unsigned int element_width = round((height/100.) * 2.5);
+ unsigned int element_width = static_cast<int>(0.5+ (height/100.) * 2.5);
int labeling_index = 0;
out << " <rect class=\"r" << labeling_index
<< "\" x=\"" << width + additional_width
- << "\" y=\"" << round((height/100.) * (svg_flags.margin_in_percent + 27.5)) + (n-index-1) * element_height
+ << "\" y=\"" << static_cast<int>(0.5+ (height/100.) * (svg_flags.margin_in_percent + 27.5)) + (n-index-1) * element_height
<< "\" width=\"" << element_width
<< "\" height=\"" << element_height
<< "\"/>"
<< '\n';
unsigned int additional_width = 0;
- if (!svg_flags.margin_in_percent) additional_width = round((height/100.) * 2.5);
+ if (!svg_flags.margin_in_percent) additional_width = static_cast<int>(0.5+ (height/100.) * 2.5);
out << " <text x=\"" << width + additional_width + 1.5 * element_width
- << "\" y=\"" << round((height/100.) * (svg_flags.margin_in_percent + 27.5)) + (n-index-1 + .5) * element_height + round(font_size * .35) << "\""
- << " style=\"text-anchor:start; font-size:" << round(font_size);
+ << "\" y=\"" << static_cast<int>(0.5+ (height/100.) * (svg_flags.margin_in_percent + 27.5)) + (n-index-1 + .5) * element_height + static_cast<int>(0.5+ font_size * .35) << "\""
+ << " style=\"text-anchor:start; font-size:" << static_cast<int>(0.5+ font_size);
if (index == 0 || index == n-1) out << "; font-weight:bold";