From eff9f11d2fb444dc8d8ded7e067b11c264173670 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Thu, 22 Aug 2013 20:46:33 +0000 Subject: [PATCH] add height and width parameters to svg output; add tangential ip git-svn-id: https://svn.dealii.org/trunk@30437 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/base/data_out_base.h | 1663 ++++++----------- deal.II/include/deal.II/integrators/laplace.h | 71 + deal.II/source/base/data_out_base.cc | 26 +- 3 files changed, 660 insertions(+), 1100 deletions(-) diff --git a/deal.II/include/deal.II/base/data_out_base.h b/deal.II/include/deal.II/base/data_out_base.h index 43e7e9a294..082e98bb39 100644 --- a/deal.II/include/deal.II/base/data_out_base.h +++ b/deal.II/include/deal.II/base/data_out_base.h @@ -219,33 +219,24 @@ class DataOutBase { public: /** - * Data structure describing a patch of - * data in dim space + * Data structure describing a patch of data in dim space * dimensions. * * A patch consists of the following data: * * - * See the general - * documentation of the - * DataOutBase class for more - * information on its contents and - * purposes. In the case of two - * dimensions, the next picture ist an - * example of n_subdivision = 4 - * because the number of (sub)cells - * within each patch is equal to - * 2^dim. + * See the general documentation of the DataOutBase class for more + * information on its contents and purposes. In the case of two + * dimensions, the next picture ist an example of + * n_subdivision = 4 because the number of (sub)cells + * within each patch is equal to 2dim. * * @ingroup output * @@ -255,34 +246,23 @@ public: struct Patch { /** - * Make the spacedim template - * parameter available. + * Make the spacedim template parameter available. */ static const unsigned int space_dim=spacedim; /** - * Corner points of a patch. - * Inner points are computed by - * a multilinear transform of - * the unit cell to the cell - * specified by these corner - * points. The order of points - * is the same as for cells - * in the triangulation. + * Corner points of a patch. Inner points are computed by a + * multilinear transform of the unit cell to the cell specified by + * these corner points. The order of points is the same as for + * cells in the triangulation. */ Point vertices[GeometryInfo::vertices_per_cell]; /** - * Numbers of neighbors of a patch. - * OpenDX format requires - * neighbor information for - * advanced output. Here the - * neighborship relationship - * of patches is - * stored. During output, - * this must be transformed - * into neighborship of - * sub-grid cells. + * Numbers of neighbors of a patch. OpenDX format requires + * neighbor information for advanced output. Here the neighborship + * relationship of patches is stored. During output, this must be + * transformed into neighborship of sub-grid cells. */ unsigned int neighbors[dim > 0 ? @@ -291,124 +271,77 @@ public: 1]; /** - * Number of this - * patch. Since we are not - * sure patches are handled - * in the same order, always, - * we better store this. + * Number of this patch. Since we are not sure patches are handled + * in the same order, always, we better store this. */ unsigned int patch_index; /** - * Number of subdivisions with - * which this patch is to be - * written. 1 means no - * subdivision, 2 means - * bisection, 3 trisection, - * etc. + * Number of subdivisions with which this patch is to be + * written. 1 means no subdivision, 2 means + * bisection, 3 trisection, etc. */ unsigned int n_subdivisions; /** - * Data vectors. The format is - * as follows: - * data(i,.) denotes the data - * belonging to the ith data - * vector. data.n() - * therefore equals the number - * of output points; this - * number is (subdivisions+1)^{dim}. - * data.m() equals the number of - * data vectors. + * Data vectors. The format is as follows: data(i,.) + * denotes the data belonging to the ith data + * vector. data.n() therefore equals the number of output + * points; this number is (subdivisions+1)^{dim}. + * data.m() equals the number of data vectors. * - * Within each column, - * data(.,j) are the - * data values at the output - * point j, where - * j denotes the - * usual lexicographic - * ordering in deal.II. This - * is also the order of - * points as provided by the - * QIterated class - * when used with the - * QTrapez class as - * subquadrature. + * Within each column, data(.,j) are the data values at + * the output point j, where j denotes the usual + * lexicographic ordering in deal.II. This is also the order of + * points as provided by the QIterated class when used + * with the QTrapez class as subquadrature. * - * Since the number of data vectors - * is usually the same for all - * patches to be printed, - * data.size() should yield - * the same value for all patches - * provided. The exception are - * patches for which - * points_are_available are set, - * where the actual coordinates of - * the point are appended to the - * 'data' field, see the - * documentation of the - * points_are_available flag. + * Since the number of data vectors is usually the same for all + * patches to be printed, data.size() should yield the + * same value for all patches provided. The exception are patches + * for which points_are_available are set, where the actual + * coordinates of the point are appended to the 'data' field, see + * the documentation of the points_are_available flag. */ Table<2,float> data; /** - * Bool flag indicating, whether the - * coordinates of the inner patch - * points are appended to the @p data - * table (@ true) or not (@ false), - * where the second is the standard and - * can be found for all cells in the - * interior of a domain. + * Bool flag indicating, whether the coordinates of the inner + * patch points are appended to the @p data table (@p true) or not + * (@p false), where the second is the standard and can be found + * for all cells in the interior of a domain. * - * On the boundary of a domain, patch - * points are evaluated using a - * Mapping and therefore have to be - * stored inside the patch, as the - * Mapping and the corresponding - * boundary information are no longer - * available later on when we - * actually write the patch out to an - * output stream. + * On the boundary of a domain, patch points are evaluated using a + * Mapping and therefore have to be stored inside the patch, as + * the Mapping and the corresponding boundary information are no + * longer available later on when we actually write the patch out + * to an output stream. */ bool points_are_available; /** - * Default constructor. Sets - * n_subdivisions to one. + * Default constructor. Sets #n_subdivisions to one. */ Patch (); /** - * Compare the present patch - * for equality with another - * one. This is used in a few - * of the automated tests in - * our testsuite. + * Compare the present patch for equality with another one. This + * is used in a few of the automated tests in our testsuite. */ bool operator == (const Patch &patch) const; /** - * Determine an estimate for - * the memory consumption (in - * bytes) of this - * object. Since sometimes - * the size of objects can - * not be determined exactly - * (for example: what is the - * memory consumption of an - * STL std::map type with a - * certain number of - * elements?), this is only - * an estimate. however often - * quite close to the true - * value. + * Determine an estimate for the memory consumption (in bytes) of + * this object. Since sometimes the size of objects can not be + * determined exactly (for example: what is the memory consumption + * of an STL std::map type with a certain number of + * elements?), this is only an estimate. however often quite close + * to the true value. */ std::size_t memory_consumption () const; /** - * Value to be used if this - * patch has no neighbor on - * one side. + * Value to be used if this patch has no neighbor on one side. */ static const unsigned int no_neighbor = numbers::invalid_unsigned_int; /** @addtogroup Exceptions @@ -426,47 +359,36 @@ public: }; /** - * Flags controlling the details of - * output in OpenDX format. + * Flags controlling the details of output in OpenDX format. * * @ingroup output */ struct DXFlags { /** - * Write neighbor - * information. This - * information is necessary - * for instance, if OpenDX is - * supposed to compute - * integral curves - * (streamlines). If it is - * not present, streamlines - * end at cell boundaries. + * Write neighbor information. This information is necessary for + * instance, if OpenDX is supposed to compute integral curves + * (streamlines). If it is not present, streamlines end at cell + * boundaries. */ bool write_neighbors; /** - * Write integer values of - * the Triangulation in - * binary format. + * Write integer values of the Triangulation in binary format. */ bool int_binary; /** - * Write coordinate vectors in - * binary format. + * Write coordinate vectors in binary format. */ bool coordinates_binary; /** - * Write data vectors in - * binary format. + * Write data vectors in binary format. */ bool data_binary; /** - * Write binary coordinate - * vectors as double (64 bit) - * numbers instead of float (32 bit). + * Write binary coordinate vectors as double (64 bit) numbers + * instead of float (32 bit). */ bool data_double; @@ -479,56 +401,40 @@ public: const bool data_binary = false); /** - * Declare all flags with name - * and type as offered by this - * class, for use in input files. + * 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. + * 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. + * The flags thus obtained overwrite all previous contents of this + * object. */ void parse_parameters (const ParameterHandler &prm); /** - * 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; }; /** - * Flags controlling the details - * of output in UCD format for - * AVS. + * Flags controlling the details of output in UCD format for AVS. * * @ingroup output */ struct UcdFlags { /** - * 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 - * AVS, 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 AVS, 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: false. */ @@ -540,45 +446,33 @@ public: UcdFlags (const bool write_preamble = false); /** - * Declare all flags with name - * and type as offered by this - * class, for use in input files. + * 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. + * 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. + * The flags thus obtained overwrite all previous contents of this + * object. */ void parse_parameters (const ParameterHandler &prm); /** - * Determine an estimate for - * the memory consumption (in - * bytes) of this - * object. Since sometimes - * the size of objects can - * not be determined exactly - * (for example: what is the - * memory consumption of an - * STL std::map type with a - * certain number of - * elements?), this is only - * an estimate. however often - * quite close to the true - * value. + * Determine an estimate for the memory consumption (in bytes) of + * this object. Since sometimes the size of objects can not be + * determined exactly (for example: what is the memory consumption + * of an STL std::map type with a certain number of + * elements?), this is only an estimate. however often quite close + * to the true value. */ std::size_t memory_consumption () const; }; /** - * Flags controlling the details of - * output in Gnuplot format. At + * Flags controlling the details of output in Gnuplot format. At * present no flags are implemented. * * @ingroup output @@ -587,12 +481,9 @@ public: { private: /** - * Dummy entry to suppress compiler - * warnings when copying an empty - * structure. Remove this member - * when adding the first flag to - * this structure (and remove the - * private as well). + * Dummy entry to suppress compiler warnings when copying an empty + * structure. Remove this member when adding the first flag to + * this structure (and remove the private as well). */ int dummy; @@ -603,74 +494,56 @@ public: GnuplotFlags (); /** - * Declare all flags with name - * and type as offered by this - * class, for use in input files. + * 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. + * 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. + * The flags thus obtained overwrite all previous contents of this + * object. */ void parse_parameters (const ParameterHandler &prm) const; /** - * Determine an estimate for - * the memory consumption (in - * bytes) of this - * object. Since sometimes - * the size of objects can - * not be determined exactly - * (for example: what is the - * memory consumption of an - * STL std::map type with a - * certain number of - * elements?), this is only - * an estimate. however often - * quite close to the true - * value. + * Determine an estimate for the memory consumption (in bytes) of + * this object. Since sometimes the size of objects can not be + * determined exactly (for example: what is the memory consumption + * of an STL std::map type with a certain number of + * elements?), this is only an estimate. however often quite close + * to the true value. */ std::size_t memory_consumption () const; }; /** - * Flags controlling the details - * of output in Povray - * format. Several flags are - * implemented, see their - * respective documentation. + * Flags controlling the details of output in Povray format. Several + * flags are implemented, see their respective documentation. * * @ingroup output */ struct PovrayFlags { /** - * Normal vector interpolation, - * if set to true + * Normal vector interpolation, if set to true * * default = false */ bool smooth; /** - * Use bicubic patches (b-splines) - * instead of triangles. + * Use bicubic patches (b-splines) instead of triangles. * * default = false */ bool bicubic_patch; /** - * include external "data.inc" - * with camera, light and - * texture definition for the - * scene. + * include external "data.inc" with camera, light and texture + * definition for the scene. * * default = false */ @@ -684,79 +557,59 @@ public: const bool external_data = false); /** - * Declare all flags with name - * and type as offered by this - * class, for use in input files. + * 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. + * 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. + * The flags thus obtained overwrite all previous contents of this + * object. */ void parse_parameters (const ParameterHandler &prm); /** - * Determine an estimate for - * the memory consumption (in - * bytes) of this - * object. Since sometimes - * the size of objects can - * not be determined exactly - * (for example: what is the - * memory consumption of an - * STL std::map type with a - * certain number of - * elements?), this is only - * an estimate. however often - * quite close to the true - * value. + * Determine an estimate for the memory consumption (in bytes) of + * this object. Since sometimes the size of objects can not be + * determined exactly (for example: what is the memory consumption + * of an STL std::map type with a certain number of + * elements?), this is only an estimate. however often quite close + * to the true value. */ std::size_t memory_consumption () const; }; /** - * Flags controlling the details of - * output in encapsulated postscript - * format. + * Flags controlling the details of output in encapsulated + * postscript format. * * @ingroup output */ struct EpsFlags { /** - * This denotes the number of the - * data vector which shall be used - * for generating the height - * information. By default, the - * first data vector is taken, - * i.e. height_vector==0, if - * there is any data vector. If there - * is no data vector, no height + * This denotes the number of the data vector which shall be used + * for generating the height information. By default, the first + * data vector is taken, i.e. height_vector==0, if there + * is any data vector. If there is no data vector, no height * information is generated. */ unsigned int height_vector; /** - * Number of the vector which is - * to be taken to colorize cells. - * The same applies as for - * height_vector. + * Number of the vector which is to be taken to colorize cells. + * The same applies as for #height_vector. */ unsigned int color_vector; /** - * Enum denoting the possibilities - * whether the scaling should be done - * such that the given 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 size equals the width or the + * height of the resulting picture. */ enum SizeType { @@ -772,49 +625,34 @@ public: 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 - * 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 size_type. * - * Default is 300, which represents - * a size of roughly 10 cm. + * Default is 300, which represents a size of roughly 10 cm. */ 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; /** - * 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. - * An example of a - * Gnuplot-default of 0 is - * the following: + * Default is the Gnuplot-default of 30. An example of a + * Gnuplot-default of 0 is the following: * * @verbatim * @@ -833,75 +671,58 @@ public: double turn_angle; /** - * Factor by which the z-axis is to - * be stretched as compared to the - * x- and y-axes. This is to compensate - * for the different sizes that - * coordinate and solution values may - * have and to prevent that the plot - * looks to much out-of-place (no - * elevation at all if solution values - * are much smaller than coordinate - * values, or the common "extremely - * mountainous area" in the opposite - * case. + * Factor by which the z-axis is to be stretched as compared to + * the x- and y-axes. This is to compensate for the different + * sizes that coordinate and solution values may have and to + * prevent that the plot looks to much out-of-place (no elevation + * at all if solution values are much smaller than coordinate + * values, or the common "extremely mountainous area" in the + * opposite case. * * Default is 1.0. */ double z_scaling; /** - * Flag the determines whether the - * lines bounding the cells (or the - * parts of each patch) are to be - * plotted. + * Flag the determines whether the lines bounding the cells (or + * the parts of each patch) are to be plotted. * * Default: true. */ bool draw_mesh; /** - * Flag whether to fill the regions - * between the lines bounding the cells - * or not. If not, no hidden line removal - * is performed, which in this crude - * implementation is done through - * writing the cells in a back-to-front - * order, thereby hiding the cells in - * the background by cells in the - * foreground. + * Flag whether to fill the regions between the lines bounding the + * cells or not. If not, no hidden line removal is performed, + * which in this crude implementation is done through writing the + * cells in a back-to-front order, thereby hiding the cells in the + * background by cells in the foreground. * - * If this flag is false and draw_mesh - * is false as well, nothing will be - * printed. + * If this flag is false and #draw_mesh is false + * as well, nothing will be printed. * - * If this flag is true, then the cells - * will be drawn either colored by one - * of the data sets (if shade_cells is - * true), or pure white (if - * shade_cells is false or if there are - * no data sets). + * If this flag is true, then the cells will be drawn + * either colored by one of the data sets (if #shade_cells is + * true), or pure white (if #shade_cells is false or if + * there are no data sets). * * Default is true. */ bool draw_cells; /** - * Flag to determine whether the cells - * shall be colorized by the data - * set denoted by color_vector, or - * simply be painted in white. This - * flag only makes sense if - * draw_cells==true. Colorization is - * done through the color_function. + * Flag to determine whether the cells shall be colorized by the + * data set denoted by #color_vector, or simply be painted in + * white. This flag only makes sense if + * #draw_cells==true. Colorization is done through + * #color_function. * * Default is true. */ bool shade_cells; /** - * Structure keeping the three color - * values in the RGB system. + * Structure keeping the three color values in the RGB system. */ struct RgbValues { @@ -910,52 +731,39 @@ public: float blue; /** - * Return true if the - * color represented by - * the three color values - * is a grey scale, - * i.e. all components - * are equal. + * Return true if the color represented by the three + * color values is a grey scale, i.e. all components are equal. */ bool is_grey () const; }; /** - * Definition of a function pointer - * type taking a value and returning - * a triple of color values in RGB - * values. + * Definition of a function pointer type taking a value and + * returning a triple of color values in RGB values. * - * Besides the actual value by which - * the color is to be computed, min - * and max values of the data to - * be colorized are given as well. + * Besides the actual value by which the color is to be computed, + * min and max values of the data to be colorized are given as + * well. */ typedef RgbValues (*ColorFunction) (const double value, const double min_value, const double max_value); /** - * This is a pointer to the function - * which is used to colorize the cells. - * By default, it points to the - * static function default_color_function - * which is a member of this class. + * This is a pointer to the function which is used to colorize the + * cells. By default, it points to the static function + * default_color_function() which is a member of this class. */ ColorFunction color_function; /** - * Default colorization function. This - * one does what one usually wants: - * It shifts colors from black (lowest - * value) through blue, green and red - * to white (highest value). For the - * exact defition of the color scale - * refer to the implementation. + * Default colorization function. This one does what one usually + * wants: It shifts colors from black (lowest value) through blue, + * green and red to white (highest value). For the exact defition + * of the color scale refer to the implementation. * - * This function was originally written - * by Stefan Nauber. + * This function was originally written by Stefan Nauber. */ static RgbValues default_color_function (const double value, @@ -963,12 +771,9 @@ public: const double max_value); /** - * This is an alternative color - * function producing a grey scale - * between black (lowest values) - * and white (highest values). You - * may use it by setting the - * color_function variable to the + * This is an alternative color function producing a grey scale + * between black (lowest values) and white (highest values). You + * may use it by setting the #color_function variable to the * address of this function. */ static RgbValues @@ -977,18 +782,11 @@ public: const double max_value); /** - * This is one more - * alternative color function - * producing a grey scale - * between white (lowest - * values) and black (highest - * values), i.e. the scale is - * reversed to the previous - * one. You may use it by - * setting the - * color_function - * variable to the address of - * this function. + * This is one more alternative color function producing a grey + * scale between white (lowest values) and black (highest values), + * i.e. the scale is reversed to the previous one. You may use it + * by setting the #color_function variable to the address of this + * function. */ static RgbValues reverse_grey_scale_color_function (const double value, @@ -1012,51 +810,37 @@ public: const ColorFunction color_function= &default_color_function); /** - * Declare all flags with name - * and type as offered by this - * class, for use in input files. + * 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. + * 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. + * 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. + * The flags thus obtained overwrite all previous contents of this + * object. */ void parse_parameters (const ParameterHandler &prm); /** - * Determine an estimate for - * the memory consumption (in - * bytes) of this - * object. Since sometimes - * the size of objects can - * not be determined exactly - * (for example: what is the - * memory consumption of an - * STL std::map type with a - * certain number of - * elements?), this is only - * an estimate. however often - * quite close to the true - * value. + * Determine an estimate for the memory consumption (in bytes) of + * this object. Since sometimes the size of objects can not be + * determined exactly (for example: what is the memory consumption + * of an STL std::map type with a certain number of + * elements?), this is only an estimate. however often quite close + * to the true value. */ std::size_t memory_consumption () const; }; /** - * Flags controlling the details - * of output in GMV - * format. At present no flags - * are implemented. + * Flags controlling the details of output in GMV format. At present + * no flags are implemented. * * @ingroup output */ @@ -1064,12 +848,9 @@ public: { private: /** - * Dummy entry to suppress compiler - * warnings when copying an empty - * structure. Remove this member - * when adding the first flag to - * this structure (and remove the - * private as well). + * Dummy entry to suppress compiler warnings when copying an empty + * structure. Remove this member when adding the first flag to + * this structure (and remove the private as well). */ int dummy; @@ -1080,46 +861,33 @@ public: GmvFlags (); /** - * Declare all flags with name - * and type as offered by this - * class, for use in input files. + * 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. + * 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. + * The flags thus obtained overwrite all previous contents of this + * object. */ void parse_parameters (const ParameterHandler &prm) const; /** - * Determine an estimate for - * the memory consumption (in - * bytes) of this - * object. Since sometimes - * the size of objects can - * not be determined exactly - * (for example: what is the - * memory consumption of an - * STL std::map type with a - * certain number of - * elements?), this is only - * an estimate. however often - * quite close to the true - * value. + * Determine an estimate for the memory consumption (in bytes) of + * this object. Since sometimes the size of objects can not be + * determined exactly (for example: what is the memory consumption + * of an STL std::map type with a certain number of + * elements?), this is only an estimate. however often quite close + * to the true value. */ std::size_t memory_consumption () const; }; /** - * Flags controlling the details - * of output in - * Tecplot format. + * Flags controlling the details of output in Tecplot format. * * @ingroup output */ @@ -1129,20 +897,16 @@ public: public: /** - * This variable is needed to hold the - * output file name when using the - * Tecplot API to write binary files. - * If the user doesn't set the file - * name with this variable only - * ASCII Tecplot output will be - * produced. + * This variable is needed to hold the output file name when using + * the Tecplot API to write binary files. If the user doesn't set + * the file name with this variable only ASCII Tecplot output will + * be produced. */ const char *tecplot_binary_file_name; /** - * Tecplot allows to assign - * names to zones. This - * variable stores this name. + * Tecplot allows to assign names to zones. This variable stores + * this name. */ const char *zone_name; @@ -1153,46 +917,33 @@ public: const char *zone_name = NULL); /** - * Declare all flags with name - * and type as offered by this - * class, for use in input files. + * 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. + * 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. + * The flags thus obtained overwrite all previous contents of this + * object. */ void parse_parameters (const ParameterHandler &prm) const; /** - * Determine an estimate for - * the memory consumption (in - * bytes) of this - * object. Since sometimes - * the size of objects can - * not be determined exactly - * (for example: what is the - * memory consumption of an - * STL std::map type with a - * certain number of - * elements?), this is only - * an estimate. however often - * quite close to the true - * value. + * Determine an estimate for the memory consumption (in bytes) of + * this object. Since sometimes the size of objects can not be + * determined exactly (for example: what is the memory consumption + * of an STL std::map type with a certain number of + * elements?), this is only an estimate. however often quite close + * to the true value. */ std::size_t memory_consumption () const; }; /** - * Flags controlling the details - * of output in VTK - * format. + * Flags controlling the details of output in VTK format. * * @ingroup output */ @@ -1200,32 +951,33 @@ public: { public: /** - * The time of the time step if this file is part of a - * time dependent simulation. + * The time of the time step if this file is part of a time + * dependent simulation. * - * The value of this variable is written into the output file according - * to the instructions provided in + * The value of this variable is written into the output file + * according to the instructions provided in * http://www.visitusers.org/index.php?title=Time_and_Cycle_in_VTK_files - * unless it is at its default value of std::numeric_limits::min(). + * unless it is at its default value of + * std::numeric_limits::min(). */ double time; /** - * The number of the time step if this file is part of a - * time dependent simulation, or the cycle within a nonlinear or other + * The number of the time step if this file is part of a time + * dependent simulation, or the cycle within a nonlinear or other * iteration. * - * The value of this variable is written into the output file according - * to the instructions provided in + * The value of this variable is written into the output file + * according to the instructions provided in * http://www.visitusers.org/index.php?title=Time_and_Cycle_in_VTK_files - * unless it is at its default value of std::numeric_limits::min(). + * unless it is at its default value of + * std::numeric_limits::min(). */ unsigned int cycle; /** - * Flag to determine whether the current - * date and time shall be printed as a comment - * in the file's second line. + * Flag to determine whether the current date and time shall be + * printed as a comment in the file's second line. * * Default is true. */ @@ -1239,9 +991,8 @@ public: const bool print_date_and_time = true); /** - * Declare the flags with name - * and type as offered by this - * class, for use in input files. + * Declare the flags with name and type as offered by this class, + * for use in input files. * * Unlike the flags in many of the other classes similar to this one, we do * not actually declare parameters for the #cycle and #time member variables @@ -1254,31 +1005,21 @@ public: static void declare_parameters (ParameterHandler &prm); /** - * Read the parameters declared in - * declare_parameters and set the - * flags for this output format - * accordingly. + * 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. + * The flags thus obtained overwrite all previous contents of this + * object. */ void parse_parameters (const ParameterHandler &prm) const; /** - * Determine an estimate for - * the memory consumption (in - * bytes) of this - * object. Since sometimes - * the size of objects can - * not be determined exactly - * (for example: what is the - * memory consumption of an - * STL std::map type with a - * certain number of - * elements?), this is only - * an estimate. however often - * quite close to the true - * value. + * Determine an estimate for the memory consumption (in bytes) of + * this object. Since sometimes the size of objects can not be + * determined exactly (for example: what is the memory consumption + * of an STL std::map type with a certain number of + * elements?), this is only an estimate. however often quite close + * to the true value. */ std::size_t memory_consumption () const; }; @@ -1290,37 +1031,45 @@ public: struct SvgFlags { public: - /** - * This denotes the number of the - * data vector which shall be used - * for generating the height - * information. By default, the - * first data vector is taken, - * i.e. height_vector==0, if - * there is any data vector. If there - * is no data vector, no height + /** + * Height of the image in SVG + * units. Default value is 4000. + */ + unsigned int height; + + /** + * Width of the image in SVG + units. If left zero, the width is computed from the height. + */ + unsigned int width; + + /** + * This denotes the number of the data vector which shall be used + * for generating the height information. By default, the first + * data vector is taken, i.e. #height_vector==0, if there + * is any data vector. If there is no data vector, no height * information is generated. */ - unsigned int height_vector; - - /* + unsigned int height_vector; + + /** * Angles for the perspective view */ int azimuth_angle, polar_angle; unsigned int line_thickness; - /* + /** * Draw a margin of 5% around the plotted area */ bool margin; - /* + /** * Draw a colorbar encoding the cell coloring */ bool draw_colorbar; - /* + /** * Constructor. */ SvgFlags(const unsigned int height_vector = 0, @@ -1331,20 +1080,12 @@ public: const bool draw_colorbar = true); /** - * Determine an estimate for - * the memory consumption (in - * bytes) of this - * object. Since sometimes - * the size of objects can - * not be determined exactly - * (for example: what is the - * memory consumption of an - * STL std::map type with a - * certain number of - * elements?), this is only - * an estimate. however often - * quite close to the true - * value. + * Determine an estimate for the memory consumption (in bytes) of + * this object. Since sometimes the size of objects can not be + * determined exactly (for example: what is the memory consumption + * of an STL std::map type with a certain number of + * elements?), this is only an estimate. however often quite close + * to the true value. */ std::size_t memory_consumption () const; @@ -1354,38 +1095,26 @@ public: /** - * Flags controlling the details - * of output in deal.II - * intermediate format. At - * present no flags are - * implemented. + * Flags controlling the details of output in deal.II intermediate + * format. At present no flags are implemented. * * @ingroup output */ struct Deal_II_IntermediateFlags { /** - * An indicator of the - * currect file format - * version used to write - * intermediate format. We do - * not attempt to be backward - * compatible, so this number - * is used only to verify - * that the format we are - * writing is what the - * current readers and - * writers understand. + * An indicator of the currect file format version used to write + * intermediate format. We do not attempt to be backward + * compatible, so this number is used only to verify that the + * format we are writing is what the current readers and writers + * understand. */ static const unsigned int format_version = 3; private: /** - * Dummy entry to suppress compiler - * warnings when copying an empty - * structure. Remove this member - * when adding the first flag to - * this structure (and remove the - * private as well). + * Dummy entry to suppress compiler warnings when copying an empty + * structure. Remove this member when adding the first flag to + * this structure (and remove the private as well). */ int dummy; @@ -1396,17 +1125,14 @@ public: Deal_II_IntermediateFlags (); /** - * Declare all flags with name - * and type as offered by this - * class, for use in input files. + * 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. + * 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. @@ -1414,34 +1140,24 @@ public: void parse_parameters (const ParameterHandler &prm) const; /** - * Determine an estimate for - * the memory consumption (in - * bytes) of this - * object. Since sometimes - * the size of objects can - * not be determined exactly - * (for example: what is the - * memory consumption of an - * STL std::map type with a - * certain number of - * elements?), this is only - * an estimate. however often - * quite close to the true - * value. + * Determine an estimate for the memory consumption (in bytes) of + * this object. Since sometimes the size of objects can not be + * determined exactly (for example: what is the memory consumption + * of an STL std::map type with a certain number of + * elements?), this is only an estimate. however often quite close + * to the true value. */ std::size_t memory_consumption () const; }; /** - * Provide a data type specifying - * the presently supported output + * Provide a data type specifying the presently supported output * formats. */ enum OutputFormat { /** - * Use the format already - * stored in the object. + * Use the format already stored in the object. */ default_format, /** @@ -1453,24 +1169,19 @@ public: */ dx, /** - * Output in the UCD format - * for AVS. + * Output in the UCD format for AVS. */ ucd, /** - * Output for the - * Gnuplot tool. + * Output for the Gnuplot tool. */ gnuplot, /** - * Output for the - * Povray - * raytracer. + * Output for the Povray raytracer. */ povray, /** - * Output in encapsulated - * PostScript. + * Output in encapsulated PostScript. */ eps, /** @@ -1478,56 +1189,46 @@ public: */ gmv, /** - * Output for - * Tecplot in text - * format. + * Output for Tecplot in text format. */ tecplot, /** - * Output for - * Tecplot in - * binary format. Faster - * and smaller than text - * format. + * Output for Tecplot in binary format. Faster and smaller than + * text format. */ tecplot_binary, /** - * Output in - * VTK format. + * Output in VTK format. */ vtk, /** - * Output in - * VTK format. + * Output in VTK format. */ vtu, /** - * Output in - * SVG format. + * Output in SVG format. */ svg, /** - * Output in deal.II - * intermediate format. + * Output in deal.II intermediate format. */ deal_II_intermediate, /** - * Output in - * HDF5 format. + * Output in HDF5 format. */ hdf5 }; /** - * Write the given list of patches to the output stream in - * OpenDX format. + * Write the given list of patches to the output stream in OpenDX + * format. * * Since OpenDX uses some kind of visual data flow oriented * programming language, some of these programs are provided in @@ -1544,15 +1245,15 @@ public: * Write the given list of patches to the output stream in eps format. * * Output in this format circumvents the use of auxiliary graphic - * programs converting some output format into a graphics format. This - * has the advantage that output is easy and fast, and the - * disadvantage that you have to give a whole bunch of parameters - * which determine the direction of sight, the mode of colorization, - * the scaling of the height axis, etc. (Of course, all these - * parameters have reasonable default values, which you may want to - * change from time to time.) At present, this format only supports - * output for two-dimensional data, with values in the third direction - * taken from a data vector. + * programs converting some output format into a graphics + * format. This has the advantage that output is easy and fast, and + * the disadvantage that you have to give a whole bunch of + * parameters which determine the direction of sight, the mode of + * colorization, the scaling of the height axis, etc. (Of course, + * all these parameters have reasonable default values, which you + * may want to change from time to time.) At present, this format + * only supports output for two-dimensional data, with values in the + * third direction taken from a data vector. * * Basically, output consists of the mesh and the cells in between * them. You can draw either of these, or both, or none if you are @@ -1982,71 +1683,49 @@ public: MPI_Comm comm); /** - * Given an input stream that contains - * data written by - * write_deal_II_intermediate, determine - * the dim and spacedim - * template parameters with which that - * function was called, and return them - * as a pair of values. + * Given an input stream that contains data written by + * write_deal_II_intermediate(), determine the dim and + * spacedim template parameters with which that function + * was called, and return them as a pair of values. * - * Note that this function eats a number - * of elements at the present position of - * the stream, and therefore alters - * it. In order to read from it using, - * for example, the DataOutReader class, - * you may wish to either reset the - * stream to its previous position, or - * close and reopen it. + * Note that this function eats a number of elements at the present + * position of the stream, and therefore alters it. In order to read + * from it using, for example, the DataOutReader class, you may wish + * to either reset the stream to its previous position, or close and + * reopen it. */ static std::pair determine_intermediate_format_dimensions (std::istream &input); /** - * Return the 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. - * - * To get a list of presently - * available format names, - * e.g. to give it to the - * ParameterHandler class, - * use the function + * Return the 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. + * + * 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 (`|') - * as used by the + * Return a list of implemented output formats. The different names + * are separated by vertical bar signs (`|') as used by the * ParameterHandler classes. */ static std::string get_output_format_names (); /** - * Provide a function which tells us which - * suffix a file with a given output format - * usually has. At present the following - * formats are defined: + * Provide a function which tells us which suffix a file with a + * given output format usually has. At present the following formats + * are defined: *
    *
  • dx: .dx *
  • ucd: .inp @@ -2065,20 +1744,12 @@ public: static std::string default_suffix (const OutputFormat output_format); /** - * Determine an estimate for - * the memory consumption (in - * bytes) of this - * object. Since sometimes - * the size of objects can - * not be determined exactly - * (for example: what is the - * memory consumption of an - * STL std::map type with a - * certain number of - * elements?), this is only - * an estimate. however often - * quite close to the true - * value. + * Determine an estimate for the memory consumption (in bytes) of + * this object. Since sometimes the size of objects can not be + * determined exactly (for example: what is the memory consumption + * of an STL std::map type with a certain number of + * elements?), this is only an estimate. however often quite close + * to the true value. */ static std::size_t memory_consumption (); @@ -2093,9 +1764,7 @@ public: << "The number of points in this data set is " << arg1 << ", but we expected " << arg2 << " in each space direction."); /** - * An output function did not - * receive any patches for - * writing. + * An output function did not receive any patches for writing. */ DeclException0 (ExcNoPatches); /** @@ -2113,24 +1782,21 @@ public: //@} private: /** - * Write the coordinates of nodes - * in the desired format. + * Write the coordinates of nodes in the desired format. */ template static void write_nodes (const std::vector > &patches, STREAM &out); /** - * Write the node numbers of a - * cell in the desired format. + * Write the node numbers of a cell in the desired format. */ template static void write_cells (const std::vector > &patches, STREAM &out); /** - * Write data in the desired - * format. + * Write data in the desired format. */ template static void write_data (const std::vector > &patches, @@ -2155,8 +1821,8 @@ private: Point<3> camera_horizontal, float camera_focus); /** - * Function to compute the gradient parameters for - * a triangle with given values for the vertices. + * Function to compute the gradient parameters for a triangle with + * given values for the vertices. * * Used for svg output. */ @@ -2165,8 +1831,8 @@ private: /** * Class holding the data of one cell of a patch in two space * dimensions for output. It is the projection of a cell in - * three-dimensional space (two coordinates, one height value) - * to the direction of sight. + * three-dimensional space (two coordinates, one height value) to + * the direction of sight. */ class SvgCell { @@ -2181,10 +1847,8 @@ private: Point<3> vertices[4]; /** - * Depth into the picture, which - * is defined as the distance from - * an observer at an the origin in - * direction of the line of sight. + * Depth into the picture, which is defined as the distance from + * an observer at an the origin in direction of the line of sight. */ float depth; @@ -2197,21 +1861,17 @@ private: Point<2> projected_center; /** - * Comparison operator for - * sorting. + * Comparison operator for sorting. */ bool operator < (const SvgCell &) const; }; /** - * Class holding the data of one - * cell of a patch in two space - * dimensions for output. It is - * the projection of a cell in - * three-dimensional space (two - * coordinates, one height value) - * to the direction of sight. + * Class holding the data of one cell of a patch in two space + * dimensions for output. It is the projection of a cell in + * three-dimensional space (two coordinates, one height value) to + * the direction of sight. */ class EpsCell2d { @@ -2223,48 +1883,33 @@ private: Point<2> vertices[4]; /** - * Data value from which the actual - * colors will be computed by - * the colorization function stated - * in the EpsFlags class. + * Data value from which the actual colors will be computed by the + * colorization function stated in the EpsFlags class. */ float color_value; /** - * Depth into the picture, which - * is defined as the distance from - * an observer at an the origin in - * direction of the line of sight. + * Depth into the picture, which is defined as the distance from + * an observer at an the origin in direction of the line of sight. */ float depth; /** - * Comparison operator for - * sorting. + * Comparison operator for sorting. */ bool operator < (const EpsCell2d &) const; }; /** - * This is a helper function for - * the write_gmv - * function. There, the data in - * the patches needs to be copied - * around as output is one - * variable globally at a time, - * rather than all data on each - * vertex at a time. This copying - * around can be done detached - * from the main thread, and is - * thus moved into this separate - * function. + * This is a helper function for the write_gmv() function. There, + * the data in the patches needs to be copied around as output is + * one variable globally at a time, rather than all data on each + * vertex at a time. This copying around can be done detached from + * the main thread, and is thus moved into this separate function. * - * Note that because of the - * similarity of the formats, - * this function is also used by - * the Vtk and Tecplot output - * functions. + * Note that because of the similarity of the formats, this function + * is also used by the Vtk and Tecplot output functions. */ template static void @@ -2286,9 +1931,9 @@ private: * * This class is thought as a base class to classes actually * generating data for output. It has two abstract virtual functions, - * get_patches and get_dataset_names which are to produce the data - * which is actually needed. These are the only functions that need to - * be overloaded by a derived class. In additional to that, it has a + * get_patches() and get_dataset_names() produce the data which is + * actually needed. These are the only functions that need to be + * overloaded by a derived class. In additional to that, it has a * function for each output format supported by the underlying base * class which gets the output data using these two virtual functions * and passes them to the raw output functions. @@ -2653,8 +2298,8 @@ public: * @endcode * * @note See DataOutBase::write_vtu or - * DataOutInterface::write_pvtu_record for - * writing solutions at each timestep. + * DataOutInterface::write_pvtu_record for writing solutions at each + * timestep. * * @note The second element of each pair, i.e., the file in which * the graphical data for each time is stored, may itself be again @@ -2668,18 +2313,12 @@ public: const std::vector > ×_and_names) const; /** - * This function is the exact - * equivalent of the - * write_pvtu_record() function - * but for the VisIt - * visualization program. See - * there for the purpose of this - * function. + * This function is the exact equivalent of the write_pvtu_record() + * function but for the VisIt visualization program. See there for + * the purpose of this function. * - * This function is documented - * in the "Creating a master file - * for parallel" section (section 5.7) - * of the "Getting data into VisIt" + * This function is documented in the "Creating a master file for + * parallel" section (section 5.7) of the "Getting data into VisIt" * report that can be found here: * https://wci.llnl.gov/codes/visit/2.0.0/GettingDataIntoVisIt2.0.0.pdf */ @@ -2687,32 +2326,21 @@ public: const std::vector &piece_names) const; /** - * Obtain data through get_patches() - * and write it to out - * in SVG format. See - * DataOutBase::write_svg. + * Obtain data through get_patches() and write it to out in + * SVG format. See DataOutBase::write_svg. */ void write_svg(std::ostream &out) const; /** - * Obtain data through get_patches() - * and write it to out - * in deal.II intermediate - * format. See + * Obtain data through get_patches() and write it to out in + * deal.II intermediate format. See * DataOutBase::write_deal_II_intermediate. * - * Note that the intermediate - * format is what its name - * suggests: a direct - * representation of internal - * data. It isn't standardized - * and will change whenever we - * change our internal - * representation. You can only - * expect to process files - * written in this format using - * the same version of deal.II - * that was used for writing. + * Note that the intermediate format is what its name suggests: a + * direct representation of internal data. It isn't standardized and + * will change whenever we change our internal representation. You + * can only expect to process files written in this format using the + * same version of deal.II that was used for writing. */ void write_deal_II_intermediate (std::ostream &out) const; @@ -2743,211 +2371,147 @@ public: const OutputFormat output_format = default_format) const; /** - * Set the default format. The - * value set here is used - * anytime, output for format - * default_format is - * requested. + * Set the default format. The value set here is used anytime, + * output for format default_format is requested. */ void set_default_format (const OutputFormat default_format); /** - * Set the flags to be used for - * output in OpenDX format. + * Set the flags to be used for output in OpenDX format. */ void set_flags (const DXFlags &dx_flags); /** - * Set the flags to be used for - * output in UCD format. + * Set the flags to be used for output in UCD format. */ void set_flags (const UcdFlags &ucd_flags); /** - * Set the flags to be used for - * output in GNUPLOT format. + * Set the flags to be used for output in GNUPLOT format. */ void set_flags (const GnuplotFlags &gnuplot_flags); /** - * Set the flags to be used for - * output in POVRAY format. + * Set the flags to be used for output in POVRAY format. */ void set_flags (const PovrayFlags &povray_flags); /** - * Set the flags to be used for - * output in EPS output. + * Set the flags to be used for output in EPS output. */ void set_flags (const EpsFlags &eps_flags); /** - * Set the flags to be used for - * output in GMV format. + * Set the flags to be used for output in GMV format. */ void set_flags (const GmvFlags &gmv_flags); /** - * Set the flags to be used for - * output in Tecplot format. + * Set the flags to be used for output in Tecplot format. */ void set_flags (const TecplotFlags &tecplot_flags); /** - * Set the flags to be used for - * output in VTK format. + * Set the flags to be used for output in VTK format. */ void set_flags (const VtkFlags &vtk_flags); /** - * Set the flags to be used for - * output in SVG format. + * Set the flags to be used for output in SVG format. */ void set_flags (const SvgFlags &svg_flags); /** - * Set the flags to be used for output in - * deal.II intermediate format. + * Set the flags to be used for output in deal.II intermediate + * format. */ void set_flags (const Deal_II_IntermediateFlags &deal_II_intermediate_flags); /** - * A function that returns the same - * string as the respective function in - * the base class does; the only - * exception being that if the parameter - * is omitted, then the value for the - * present default format is returned, - * i.e. the correct suffix for the format - * that was set through - * set_default_format() or - * parse_parameters() before calling this - * function. + * A function that returns the same string as the respective + * function in the base class does; the only exception being that if + * the parameter is omitted, then the value for the present default + * format is returned, i.e. the correct suffix for the format that + * was set through set_default_format() or parse_parameters() before + * calling this function. */ std::string default_suffix (const OutputFormat output_format = default_format) const; /** - * 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. + * 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. + * 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. + * 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); /** - * Determine an estimate for - * the memory consumption (in - * bytes) of this - * object. Since sometimes - * the size of objects can - * not be determined exactly - * (for example: what is the - * memory consumption of an - * STL std::map type with a - * certain number of - * elements?), this is only - * an estimate. however often - * quite close to the true - * value. + * Determine an estimate for the memory consumption (in bytes) of + * this object. Since sometimes the size of objects can not be + * determined exactly (for example: what is the memory consumption + * of an STL std::map type with a certain number of + * elements?), this is only an estimate. however often quite close + * to the true value. */ std::size_t memory_consumption () const; protected: /** - * This is the abstract function - * through which derived classes - * propagate preprocessed data in - * the form of Patch - * structures (declared in the - * base class DataOutBase) to - * the actual output - * function. You need to overload - * this function to allow the - * output functions to know what - * they shall print. + * This is the abstract function through which derived classes + * propagate preprocessed data in the form of Patch structures + * (declared in the base class DataOutBase) to the actual output + * function. You need to overload this function to allow the output + * functions to know what they shall print. */ virtual const std::vector > & get_patches () const = 0; /** - * Abstract virtual function - * through which the names of - * data sets are obtained by the - * output functions of the base - * class. + * Abstract virtual function through which the names of data sets + * are obtained by the output functions of the base class. */ virtual std::vector get_dataset_names () const = 0; /** - * This functions returns - * information about how the - * individual components of - * output files that consist of - * more than one data set are to - * be interpreted. - * - * It returns a list of index - * pairs and corresponding name - * indicating which components of - * the output are to be - * considered vector-valued - * rather than just a collection - * of scalar data. The index - * pairs are inclusive; for - * example, if we have a Stokes - * problem in 2d with components - * (u,v,p), then the - * corresponding vector data - * range should be (0,1), and the - * returned list would consist of - * only a single element with a - * tuple such as (0,1,"velocity"). - * - * Since some of the derived - * classes do not know about - * vector data, this function has - * a default implementation that - * simply returns an empty - * string, meaning that all data - * is to be considered a + * This functions returns information about how the individual + * components of output files that consist of more than one data set + * are to be interpreted. + * + * It returns a list of index pairs and corresponding name + * indicating which components of the output are to be considered + * vector-valued rather than just a collection of scalar data. The + * index pairs are inclusive; for example, if we have a Stokes + * problem in 2d with components (u,v,p), then the corresponding + * vector data range should be (0,1), and the returned list would + * consist of only a single element with a tuple such as + * (0,1,"velocity"). + * + * Since some of the derived classes do not know about vector data, + * this function has a default implementation that simply returns an + * empty string, meaning that all data is to be considered a * collection of scalar fields. */ virtual @@ -2955,108 +2519,83 @@ protected: get_vector_data_ranges () const; /** - * The default number of - * subdivisions for patches. This - * is filled by parse_parameters() - * and should be obeyed by - * build_patches() in derived - * classes. + * The default number of subdivisions for patches. This is filled by + * parse_parameters() and should be obeyed by build_patches() in + * derived classes. */ unsigned int default_subdivisions; private: /** - * Standard output format. Use - * this format, if output format - * default_format is - * requested. It can be changed - * by the set_format function - * or in a parameter file. + * Standard output format. 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_fmt; /** - * Flags to be used upon output - * of OpenDX data. Can be changed by - * using the set_flags - * function. + * Flags to be used upon output of OpenDX data. Can be changed by + * using the set_flags function. */ DXFlags dx_flags; /** - * Flags to be used upon output - * of UCD data. Can be changed by - * using the set_flags - * function. + * Flags to be used upon output of UCD data. Can be changed by using + * the set_flags function. */ UcdFlags ucd_flags; /** - * Flags to be used upon output - * of GNUPLOT data. Can be - * changed by using the - * set_flags function. + * Flags to be used upon output of GNUPLOT data. Can be changed by + * using the set_flags function. */ GnuplotFlags gnuplot_flags; /** - * Flags to be used upon output - * of POVRAY data. Can be changed - * by using the set_flags - * function. + * Flags to be used upon output of POVRAY data. Can be changed by + * using the set_flags function. */ PovrayFlags povray_flags; /** - * Flags to be used upon output - * of EPS data in one space - * dimension. Can be changed by - * using the set_flags + * Flags to be used upon output of EPS data in one space + * dimension. Can be changed by using the set_flags * function. */ EpsFlags eps_flags; /** - * Flags to be used upon output - * of gmv data in one space - * dimension. Can be changed by - * using the set_flags + * Flags to be used upon output of gmv data in one space + * dimension. Can be changed by using the set_flags * function. */ GmvFlags gmv_flags; /** - * Flags to be used upon output - * of Tecplot data in one space - * dimension. Can be changed by - * using the set_flags + * Flags to be used upon output of Tecplot data in one space + * dimension. Can be changed by using the set_flags * function. */ TecplotFlags tecplot_flags; /** - * Flags to be used upon output - * of vtk data in one space - * dimension. Can be changed by - * using the set_flags + * Flags to be used upon output of vtk data in one space + * dimension. Can be changed by using the set_flags * function. */ VtkFlags vtk_flags; /** - * Flags to be used upon output - * of svg data in one space - * dimension. Can be changed by - * using the set_flags + * Flags to be used upon output of svg data in one space + * dimension. Can be changed by using the set_flags * function. */ SvgFlags svg_flags; /** - * Flags to be used upon output of - * deal.II intermediate data in one space - * dimension. Can be changed by using the - * set_flags function. + * Flags to be used upon output of deal.II intermediate data in one + * space dimension. Can be changed by using the set_flags + * function. */ Deal_II_IntermediateFlags deal_II_intermediate_flags; }; @@ -3118,60 +2657,36 @@ class DataOutReader : public DataOutInterface { public: /** - * Read a sequence of patches as - * written previously by - * DataOutBase::write_deal_II_intermediate - * and store them in the present - * object. This overwrites any - * previous content. + * Read a sequence of patches as written previously by + * DataOutBase::write_deal_II_intermediate and store them + * in the present object. This overwrites any previous content. */ void read (std::istream &in); /** - * This function can be used to - * merge the patches read by the - * other object into the patches - * that this present object - * stores. This is sometimes - * handy if one has, for example, - * a domain decomposition - * algorithm where each block is - * represented by a DoFHandler of - * its own, but one wants to - * output the solution on all the - * blocks at the same - * time. Alternatively, it may - * also be used for parallel - * programs, where each process - * only generates output for its - * share of the cells, even if - * all processes can see all - * cells. - * - * For this to work, the input - * files for the present object - * and the given argument need to - * have the same number of output - * vectors, and they need to use - * the same number of - * subdivisions per patch. The - * output will probably look - * rather funny if patches in + * This function can be used to merge the patches read by the other + * object into the patches that this present object stores. This is + * sometimes handy if one has, for example, a domain decomposition + * algorithm where each block is represented by a DoFHandler of its + * own, but one wants to output the solution on all the blocks at + * the same time. Alternatively, it may also be used for parallel + * programs, where each process only generates output for its share + * of the cells, even if all processes can see all cells. + * + * For this to work, the input files for the present object and the + * given argument need to have the same number of output vectors, + * and they need to use the same number of subdivisions per + * patch. The output will probably look rather funny if patches in * both objects overlap in space. * - * If you call read() for this - * object after merging in - * patches, the previous state is - * overwritten, and the merged-in - * patches are lost. + * If you call read() for this object after merging in patches, the + * previous state is overwritten, and the merged-in patches are + * lost. * - * This function will fail if - * either this or the other - * object did not yet set up any - * patches. + * This function will fail if either this or the other object did + * not yet set up any patches. * - * The use of this function is - * demonstrated in step-19. + * The use of this function is demonstrated in step-19. */ void merge (const DataOutReader &other); @@ -3199,67 +2714,42 @@ public: protected: /** - * This is the function - * through which this class - * propagates preprocessed data in - * the form of Patch - * structures (declared in the - * base class DataOutBase) to - * the actual output - * function. + * This is the function through which this class propagates + * preprocessed data in the form of Patch structures (declared in + * the base class DataOutBase) to the actual output function. * - * It returns the patches as read - * the last time a stream was - * given to the read() function. + * It returns the patches as read the last time a stream was given + * to the read() function. */ virtual const std::vector > & get_patches () const; /** - * Abstract virtual function - * through which the names of - * data sets are obtained by the - * output functions of the base - * class. + * Abstract virtual function through which the names of data sets + * are obtained by the output functions of the base class. * - * Return the names of the - * variables as read the last - * time we read a file. + * Return the names of the variables as read the last time we read a + * file. */ virtual std::vector get_dataset_names () const; /** - * This functions returns - * information about how the - * individual components of - * output files that consist of - * more than one data set are to - * be interpreted. - * - * It returns a list of index - * pairs and corresponding name - * indicating which components of - * the output are to be - * considered vector-valued - * rather than just a collection - * of scalar data. The index - * pairs are inclusive; for - * example, if we have a Stokes - * problem in 2d with components - * (u,v,p), then the - * corresponding vector data - * range should be (0,1), and the - * returned list would consist of - * only a single element with a - * tuple such as (0,1,"velocity"). - * - * Since some of the derived - * classes do not know about - * vector data, this function has - * a default implementation that - * simply returns an empty - * string, meaning that all data - * is to be considered a + * This functions returns information about how the individual + * components of output files that consist of more than one data set + * are to be interpreted. + * + * It returns a list of index pairs and corresponding name + * indicating which components of the output are to be considered + * vector-valued rather than just a collection of scalar data. The + * index pairs are inclusive; for example, if we have a Stokes + * problem in 2d with components (u,v,p), then the corresponding + * vector data range should be (0,1), and the returned list would + * consist of only a single element with a tuple such as + * (0,1,"velocity"). + * + * Since some of the derived classes do not know about vector data, + * this function has a default implementation that simply returns an + * empty string, meaning that all data is to be considered a * collection of scalar fields. */ virtual @@ -3268,20 +2758,15 @@ protected: private: /** - * Arrays holding the set of - * patches as well as the names - * of output variables, all of - * which we read from an input - * stream. + * Arrays holding the set of patches as well as the names of output + * variables, all of which we read from an input stream. */ std::vector > patches; std::vector dataset_names; /** - * Information about whether - * certain components of the - * output field are to be - * considered vectors. + * Information about whether certain components of the output field + * are to be considered vectors. */ std::vector > vector_data_ranges; diff --git a/deal.II/include/deal.II/integrators/laplace.h b/deal.II/include/deal.II/integrators/laplace.h index c20eb4beba..fd9564c374 100644 --- a/deal.II/include/deal.II/integrators/laplace.h +++ b/deal.II/include/deal.II/integrators/laplace.h @@ -349,6 +349,77 @@ namespace LocalIntegrators } } + template + void ip_tangential_matrix ( + FullMatrix &M11, + FullMatrix &M12, + FullMatrix &M21, + FullMatrix &M22, + const FEValuesBase &fe1, + const FEValuesBase &fe2, + double penalty, + double factor1 = 1., + double factor2 = -1.) + { + const unsigned int n_dofs = fe1.dofs_per_cell; + AssertDimension(fe1.get_fe().n_components(), dim); + AssertDimension(fe2.get_fe().n_components(), dim); + AssertDimension(M11.n(), n_dofs); + AssertDimension(M11.m(), n_dofs); + AssertDimension(M12.n(), n_dofs); + AssertDimension(M12.m(), n_dofs); + AssertDimension(M21.n(), n_dofs); + AssertDimension(M21.m(), n_dofs); + AssertDimension(M22.n(), n_dofs); + AssertDimension(M22.m(), n_dofs); + + const double nui = factor1; + const double nue = (factor2 < 0) ? factor1 : factor2; + const double nu = .5*(nui+nue); + + for (unsigned int k=0; k &n = fe1.normal_vector(k); + for (unsigned int i=0; i > &patches, // do not allow volume rendering AssertThrow (dim==2, ExcNotImplemented()); - const unsigned int height = 4000; - unsigned int width; + const unsigned int height = flags.height; + unsigned int width = flags.width; // margin around the plotted area unsigned int margin_in_percent = 0; @@ -5932,10 +5935,11 @@ void DataOutBase::write_svg (const std::vector > &patches, } } } - + // write the svg file - width = static_cast(.5 + height * (x_dimension_perspective / y_dimension_perspective)); + if (width==0) + width = static_cast(.5 + height * (x_dimension_perspective / y_dimension_perspective)); unsigned int additional_width = 0; if (flags.draw_colorbar) additional_width = static_cast(.5 + height * .3); // additional width for colorbar -- 2.39.5