From: Wolfgang Bangerth Date: Thu, 7 Sep 2000 13:00:33 +0000 (+0000) Subject: Extend the Patch class to allow for different space and object dimensions, such as... X-Git-Tag: v8.0.0~20126 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12d0062f289c83931484ea8e67f6de5b20294a06;p=dealii.git Extend the Patch class to allow for different space and object dimensions, such as when one would like to write out faces only. git-svn-id: https://svn.dealii.org/trunk@3303 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/data_out_base.h b/deal.II/base/include/base/data_out_base.h index db072abadb..da9b67032f 100644 --- a/deal.II/base/include/base/data_out_base.h +++ b/deal.II/base/include/base/data_out_base.h @@ -80,8 +80,24 @@ class ParameterHandler; * i.e. the z-coordinate runs fastest, then the y-coordinate, then x (if there * are that many space directions). * - * The @p{Patch} class takes a template parameter denoting the space dimension - * in which this patch operates. + * + * @sect3{Generalized patches} + * + * In general, the patches as explained above might be too + * restricted. For example, one might want to draw only the outer + * faces of a domain in a three-dimensional computation, if one is not + * interested in what happens inside. Then, the objects that should be + * drawn are two-dimensional in a three-dimensional world. The + * @p{Patch} class and associated output functions handle these + * cases. The @p{Patch} class therefore takes two template parameters, + * the first, named @p{dim} denoting the dimension of the object (in + * the above example, this would be two), while the second, named + * @p{spacedim}, denotes the dimension of the embedding space (this + * would be three). The corner points of a patch have the dimension of + * the space, while their number is determined by the dimension of the + * patch. By default, the second template parameter has the same value + * as the first, which would correspond to outputting a cell, rather + * than a face or something else. * * * @sect2{Supported output formats} @@ -155,9 +171,8 @@ class ParameterHandler; * with values in the third direction taken from a data vector. * * The output uses two different povray-objects: - - * @begin{itemize} * + * @begin{itemize} * @item @p{BICUBIC_PATCH} * A @p{bicubic_patch} is a 3-dimensional Bezier patch. It consists of 16 Points * describing the surface. The 4 corner points are touched by the object, @@ -192,6 +207,7 @@ class ParameterHandler; * If the external file "data.inc" is used, the path to this file has to be * included in the povray options. * + * * @sect3{EPS format} * * Output in this format circumvents the use of auxiliary graphic programs @@ -267,7 +283,7 @@ class ParameterHandler; * details of the viewpoint, light source, etc. * * - * @author Wolfgang Bangerth 1999; EPS output based on an earlier implementation by Stefan Nauber for the old DataOut class; Povray output by Thomas Richter 1999 + * @author Wolfgang Bangerth 1999, 2000; EPS output based on an earlier implementation by Stefan Nauber for the old DataOut class; Povray output by Thomas Richter 1999 */ class DataOutBase { @@ -298,7 +314,7 @@ class DataOutBase * @end{verbatim} * @author Wolfgang Bangerth */ - template + template struct Patch { /** @@ -311,7 +327,7 @@ class DataOutBase * is the same as for cells * in the triangulation. */ - Point vertices[GeometryInfo::vertices_per_cell]; + Point vertices[GeometryInfo::vertices_per_cell]; /** * Number of subdivisions with @@ -401,6 +417,15 @@ class DataOutBase * @p{n_subdivisions} to one. */ Patch (); + + /** + * Exception + */ + DeclException2 (ExcInvalidCombinationOfDimensions, + int, int, + << "It is not possible to have a structural dimension of " << arg1 + << " to be larger than the space dimension of the surrounding" + << " space " << arg2); }; @@ -869,11 +894,11 @@ class DataOutBase * documentation for more information * on the parameters. */ - template - static void write_ucd (const vector > &patches, - const vector &data_names, - const UcdFlags &flags, - ostream &out); + template + static void write_ucd (const vector > &patches, + const vector &data_names, + const UcdFlags &flags, + ostream &out); /** * Write the given list of patches @@ -882,11 +907,11 @@ class DataOutBase * documentation for more information * on the parameters. */ - template - static void write_gnuplot (const vector > &patches, - const vector &data_names, - const GnuplotFlags &flags, - ostream &out); + template + static void write_gnuplot (const vector > &patches, + const vector &data_names, + const GnuplotFlags &flags, + ostream &out); /** * Write the given list of patches @@ -895,11 +920,11 @@ class DataOutBase * documentation for more information * on the parameters. */ - template - static void write_povray (const vector > &patches, - const vector &data_names, - const PovrayFlags &flags, - ostream &out); + template + static void write_povray (const vector > &patches, + const vector &data_names, + const PovrayFlags &flags, + ostream &out); /** * Write the given list of patches @@ -908,11 +933,11 @@ class DataOutBase * documentation for more information * on the parameters. */ - template - static void write_eps (const vector > &patches, - const vector &data_names, - const EpsFlags &flags, - ostream &out); + template + static void write_eps (const vector > &patches, + const vector &data_names, + const EpsFlags &flags, + ostream &out); /** * Write the given list of patches @@ -921,11 +946,11 @@ class DataOutBase * documentation for more information * on the parameters. */ - template - static void write_gmv (const vector > &patches, - const vector &data_names, - const GmvFlags &flags, - ostream &out); + template + static void write_gmv (const vector > &patches, + const vector &data_names, + const GmvFlags &flags, + ostream &out); /** @@ -1023,12 +1048,15 @@ class DataOutBase * thus moved into this separate * function. */ - template - static void write_gmv_reorder_data_vectors (const vector > &patches, - vector > &data_vectors); + template + static void + write_gmv_reorder_data_vectors (const vector > &patches, + vector > &data_vectors); }; + + /** * This class is the interface to the @p{DataOutBase} class, as already its name * might suggest. It does not offer much functionality apart from a way to @@ -1141,7 +1169,7 @@ class DataOutBase * * @author Wolfgang Bangerth, 1999 */ -template +template class DataOutInterface : private DataOutBase { public: @@ -1342,7 +1370,8 @@ class DataOutInterface : private DataOutBase * allow the output functions to * know what they shall print. */ - virtual const vector > & get_patches () const = 0; + virtual const vector > & + get_patches () const = 0; /** * Abstract virtual function through diff --git a/deal.II/base/source/data_out_base.all_dimensions.cc b/deal.II/base/source/data_out_base.all_dimensions.cc index 9c85ace5ee..2fcad5f315 100644 --- a/deal.II/base/source/data_out_base.all_dimensions.cc +++ b/deal.II/base/source/data_out_base.all_dimensions.cc @@ -21,6 +21,7 @@ DataOutBase::UcdFlags::UcdFlags (const bool write_preamble) : {}; + DataOutBase::PovrayFlags::PovrayFlags (const bool smooth, const bool bicubic_patch, const bool external_data) : @@ -30,26 +31,29 @@ DataOutBase::PovrayFlags::PovrayFlags (const bool smooth, {}; + void DataOutBase::UcdFlags::declare_parameters (ParameterHandler &prm) { prm.declare_entry ("Write preamble", "true", Patterns::Bool()); }; + void DataOutBase::UcdFlags::parse_parameters (ParameterHandler &prm) { write_preamble = prm.get_bool ("Write preamble"); }; + void DataOutBase::GnuplotFlags::declare_parameters (ParameterHandler &/*prm*/) -{ -}; +{}; + void DataOutBase::GnuplotFlags::parse_parameters (ParameterHandler &/*prm*/) -{ -}; +{}; + void DataOutBase::PovrayFlags::declare_parameters (ParameterHandler &prm) @@ -63,6 +67,7 @@ void DataOutBase::PovrayFlags::declare_parameters (ParameterHandler &prm) }; + void DataOutBase::PovrayFlags::parse_parameters (ParameterHandler &prm) { smooth = prm.get_bool ("Use smooth triangles"); @@ -71,6 +76,7 @@ void DataOutBase::PovrayFlags::parse_parameters (ParameterHandler &prm) }; + DataOutBase::EpsFlags::EpsFlags (const unsigned int height_vector, const unsigned int color_vector, const SizeType size_type, @@ -98,6 +104,7 @@ DataOutBase::EpsFlags::EpsFlags (const unsigned int height_vector, {}; + DataOutBase::EpsFlags::RgbValues DataOutBase::EpsFlags::default_color_function (const double x, const double xmin, @@ -196,6 +203,7 @@ DataOutBase::EpsFlags::grey_scale_color_function (const double x, }; + bool DataOutBase::EpsCell2d::operator < (const EpsCell2d &e) const { // note the "wrong" order in @@ -204,6 +212,7 @@ bool DataOutBase::EpsCell2d::operator < (const EpsCell2d &e) const }; + void DataOutBase::EpsFlags::declare_parameters (ParameterHandler &prm) { prm.declare_entry ("Index of vector for height", "0", @@ -233,6 +242,7 @@ void DataOutBase::EpsFlags::declare_parameters (ParameterHandler &prm) }; + void DataOutBase::EpsFlags::parse_parameters (ParameterHandler &prm) { height_vector = prm.get_integer ("Index of vector for height"); @@ -256,11 +266,11 @@ void DataOutBase::EpsFlags::parse_parameters (ParameterHandler &prm) }; + void DataOutBase::GmvFlags::declare_parameters (ParameterHandler &/*prm*/) -{ -}; +{}; + void DataOutBase::GmvFlags::parse_parameters (ParameterHandler &/*prm*/) -{ -}; +{}; diff --git a/deal.II/base/source/data_out_base.cc b/deal.II/base/source/data_out_base.cc index 879ca50f58..4094f0ec6a 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -22,19 +22,23 @@ #include -template -DataOutBase::Patch::Patch () : +template +DataOutBase::Patch::Patch () : n_subdivisions (1) // all the other data has a // constructor of its own -{}; +{ + Assert (dim<=spacedim, ExcInvalidCombinationOfDimensions(dim,spacedim)); + Assert (spacedim<=3, ExcNotImplemented()); +}; -template -void DataOutBase::write_ucd (const vector > &patches, - const vector &data_names, - const UcdFlags &flags, - ostream &out) + +template +void DataOutBase::write_ucd (const vector > &patches, + const vector &data_names, + const UcdFlags &flags, + ostream &out) { AssertThrow (out, ExcIO()); @@ -46,7 +50,7 @@ void DataOutBase::write_ucd (const vector > &patches, // and cells for later use unsigned int n_cells = 0, n_nodes = 0; - for (typename vector >::const_iterator patch=patches.begin(); + for (typename vector >::const_iterator patch=patches.begin(); patch!=patches.end(); ++patch) switch (dim) { @@ -113,7 +117,7 @@ void DataOutBase::write_ucd (const vector > &patches, { unsigned int present_node = 1; - for (typename vector >::const_iterator patch=patches.begin(); + for (typename vector >::const_iterator patch=patches.begin(); patch!=patches.end(); ++patch) { const unsigned int n_subdivisions = patch->n_subdivisions; @@ -125,11 +129,23 @@ void DataOutBase::write_ucd (const vector > &patches, case 1: { for (unsigned int i=0; ivertices[1](0) * i / n_subdivisions) + - (patch->vertices[0](0) * (n_subdivisions-i) / n_subdivisions)) - << " 0 0\n"; // fill with zeroes + { + out << present_node + << " "; + + const Point + node = ((patch->vertices[1] * i / n_subdivisions) + + (patch->vertices[0] * (n_subdivisions-i) / n_subdivisions)); + + // write out coordinates + for (unsigned int i=0; i > &patches, const double x_frac = i * 1./n_subdivisions, y_frac = j * 1./n_subdivisions; + out << present_node + << " "; + // compute coordinates for // this patch point - out << present_node - << " " - << (((patch->vertices[1] * x_frac) + - (patch->vertices[0] * (1-x_frac))) * (1-y_frac) + - ((patch->vertices[2] * x_frac) + - (patch->vertices[3] * (1-x_frac))) * y_frac) - << " 0\n"; // fill with zeroes + const Point + node = (((patch->vertices[1] * x_frac) + + (patch->vertices[0] * (1-x_frac))) * (1-y_frac) + + ((patch->vertices[2] * x_frac) + + (patch->vertices[3] * (1-x_frac))) * y_frac); + + // write out coordinates + for (unsigned int i=0; i > &patches, // compute coordinates for // this patch point out << present_node - << " " - << ((((patch->vertices[1] * x_frac) + - (patch->vertices[0] * (1-x_frac))) * (1-y_frac) + - ((patch->vertices[2] * x_frac) + - (patch->vertices[3] * (1-x_frac))) * y_frac) * (1-z_frac) + - (((patch->vertices[5] * x_frac) + - (patch->vertices[4] * (1-x_frac))) * (1-y_frac) + - ((patch->vertices[6] * x_frac) + - (patch->vertices[7] * (1-x_frac))) * y_frac) * z_frac) - << endl; + << " "; + + // compute coordinates for + // this patch point + const Point + node = ((((patch->vertices[1] * x_frac) + + (patch->vertices[0] * (1-x_frac))) * (1-y_frac) + + ((patch->vertices[2] * x_frac) + + (patch->vertices[3] * (1-x_frac))) * y_frac) * (1-z_frac) + + (((patch->vertices[5] * x_frac) + + (patch->vertices[4] * (1-x_frac))) * (1-y_frac) + + ((patch->vertices[6] * x_frac) + + (patch->vertices[7] * (1-x_frac))) * y_frac) * z_frac); + + // write out coordinates + for (unsigned int i=0; i > &patches, unsigned int present_cell = 1; unsigned int first_vertex_of_patch = 0; - for (typename vector >::const_iterator patch=patches.begin(); + for (typename vector >::const_iterator patch=patches.begin(); patch!=patches.end(); ++patch) { const unsigned int n_subdivisions = patch->n_subdivisions; @@ -276,7 +312,7 @@ void DataOutBase::write_ucd (const vector > &patches, }; -// finally update the number + // finally update the number // of the first vertex of this patch switch (dim) { @@ -304,7 +340,7 @@ void DataOutBase::write_ucd (const vector > &patches, }; -///////////////////////////// + ///////////////////////////// // now write data if (n_data_sets != 0) { @@ -320,9 +356,9 @@ void DataOutBase::write_ucd (const vector > &patches, << endl; -// loop over all patches + // loop over all patches unsigned int present_node = 1; - for (typename vector >::const_iterator patch=patches.begin(); + for (typename vector >::const_iterator patch=patches.begin(); patch != patches.end(); ++patch) { const unsigned int n_subdivisions = patch->n_subdivisions; @@ -407,11 +443,12 @@ void DataOutBase::write_ucd (const vector > &patches, }; -template -void DataOutBase::write_gnuplot (const vector > &patches, - const vector &data_names, - const GnuplotFlags &/*flags*/, - ostream &out) + +template +void DataOutBase::write_gnuplot (const vector > &patches, + const vector &data_names, + const GnuplotFlags &/*flags*/, + ostream &out) { AssertThrow (out, ExcIO()); @@ -442,7 +479,7 @@ void DataOutBase::write_gnuplot (const vector > &patches, << "#" << endl << "# "; - switch (dim) + switch (spacedim) { case 1: out << " "; @@ -466,8 +503,8 @@ void DataOutBase::write_gnuplot (const vector > &patches, }; -// loop over all patches - for (typename vector >::const_iterator patch=patches.begin(); + // loop over all patches + for (typename vector >::const_iterator patch=patches.begin(); patch != patches.end(); ++patch) { const unsigned int n_subdivisions = patch->n_subdivisions; @@ -565,7 +602,7 @@ void DataOutBase::write_gnuplot (const vector > &patches, // compute coordinates for // this patch point - const Point this_point + const Point this_point = ((((patch->vertices[1] * x_frac) + (patch->vertices[0] * (1-x_frac))) * (1-y_frac) + ((patch->vertices[2] * x_frac) + @@ -694,16 +731,18 @@ void DataOutBase::write_gnuplot (const vector > &patches, }; -template -void DataOutBase::write_povray (const vector > &patches, - const vector &data_names, - const PovrayFlags &flags, - ostream &out) + +template +void DataOutBase::write_povray (const vector > &patches, + const vector &data_names, + const PovrayFlags &flags, + ostream &out) { AssertThrow (out, ExcIO()); Assert (patches.size() > 0, ExcNoPatches()); - Assert (dim==2, ExcNotImplemented()); // only for 2-D + Assert (dim==2, ExcNotImplemented()); // only for 2-D surfaces on a 2-D plane + Assert (spacedim==2, ExcNotImplemented()); const unsigned int n_data_sets = data_names.size(); @@ -728,26 +767,26 @@ void DataOutBase::write_povray (const vector > &patches, << endl << "*/ " << endl; - // include files + // include files out << "#include \"colors.inc\" " << endl << "#include \"textures.inc\" " << endl; - -// use external include file for textures, - // camera and light + + // use external include file for textures, + // camera and light if (flags.external_data) out << "#include \"data.inc\" " << endl; else // all definitions in data file { - // camera + // camera out << endl << endl << "camera {" << endl << " location <1,4,-7>" << endl << " look_at <0,0,0>" << endl << " angle 30" << endl << "}" << endl; - - // light + + // light out << endl << "light_source {" << endl << " <1,4,-7>" << endl @@ -760,11 +799,11 @@ void DataOutBase::write_povray (const vector > &patches, << "}" << endl; } }; - + // max. and min. heigth of solution double hmin=0, hmax=0; - for (typename vector >::const_iterator patch=patches.begin(); + for (typename vector >::const_iterator patch=patches.begin(); patch != patches.end(); ++patch) { const unsigned int n_subdivisions = patch->n_subdivisions; @@ -814,7 +853,7 @@ void DataOutBase::write_povray (const vector > &patches, } // loop over all patches - for (typename vector >::const_iterator patch=patches.begin(); + for (typename vector >::const_iterator patch=patches.begin(); patch != patches.end(); ++patch) { const unsigned int n_subdivisions = patch->n_subdivisions; @@ -831,7 +870,7 @@ void DataOutBase::write_povray (const vector > &patches, ExcInvalidDatasetSize (patch->data.n(), n_subdivisions+1)); - Point ver[16]; // value for all points in this patch + Point ver[16]; // value for all points in this patch for (unsigned int i=0; i > &patches, }; -template -void DataOutBase::write_eps (const vector > &patches, - const vector &/*data_names*/, - const EpsFlags &flags, - ostream &out) + +template +void DataOutBase::write_eps (const vector > &patches, + const vector &/*data_names*/, + const EpsFlags &flags, + ostream &out) { Assert (out, ExcIO()); Assert (patches.size() > 0, ExcNoPatches()); + Assert (spacedim==dim, ExcNotImplemented()); switch (dim) { @@ -1035,7 +1076,7 @@ void DataOutBase::write_eps (const vector > &patches, // note that since dim==2, we // have exactly four vertices per // patch and per cell - for (typename vector >::const_iterator patch=patches.begin(); + for (typename vector >::const_iterator patch=patches.begin(); patch!=patches.end(); ++patch) { const unsigned int n_subdivisions = patch->n_subdivisions; @@ -1048,7 +1089,7 @@ void DataOutBase::write_eps (const vector > &patches, x_frac1 = (i+1) * 1./n_subdivisions, y_frac1 = (j+1) * 1./n_subdivisions; - const Point points[4] + const Point points[4] = { (((patch->vertices[1] * x_frac) + (patch->vertices[0] * (1-x_frac))) * (1-y_frac) + ((patch->vertices[2] * x_frac) + @@ -1141,7 +1182,7 @@ void DataOutBase::write_eps (const vector > &patches, // compute coordinates of // center of cell - const Point center_point + const Point center_point = (points[0] + points[1] + points[2] + points[3]) / 4; const double center_height = -(heights[0] + heights[1] + heights[2] + heights[3]) / 4; @@ -1331,11 +1372,12 @@ void DataOutBase::write_eps (const vector > &patches, }; -template -void DataOutBase::write_gmv (const vector > &patches, - const vector &data_names, - const GmvFlags &/*flags*/, - ostream &out) + +template +void DataOutBase::write_gmv (const vector > &patches, + const vector &data_names, + const GmvFlags &/*flags*/, + ostream &out) { AssertThrow (out, ExcIO()); @@ -1360,7 +1402,7 @@ void DataOutBase::write_gmv (const vector > &patches, // and cells for later use unsigned int n_cells = 0, n_nodes = 0; - for (typename vector >::const_iterator patch=patches.begin(); + for (typename vector >::const_iterator patch=patches.begin(); patch!=patches.end(); ++patch) switch (dim) { @@ -1413,7 +1455,7 @@ void DataOutBase::write_gmv (const vector > &patches, Threads::ThreadManager thread_manager; Threads::spawn (thread_manager, Threads::encapsulate (&DataOutBase::template - write_gmv_reorder_data_vectors) + write_gmv_reorder_data_vectors) .collect_args(patches, data_vectors)); /////////////////////////////// @@ -1426,14 +1468,14 @@ void DataOutBase::write_gmv (const vector > &patches, out << "nodes " << n_nodes << endl; for (unsigned int d=1; d<=3; ++d) { - for (typename vector >::const_iterator patch=patches.begin(); + for (typename vector >::const_iterator patch=patches.begin(); patch!=patches.end(); ++patch) { const unsigned int n_subdivisions = patch->n_subdivisions; // if we have nonzero values for // this coordinate - if (d<=dim) + if (d<=spacedim) { switch (dim) { @@ -1503,7 +1545,7 @@ void DataOutBase::write_gmv (const vector > &patches, }; } else - // d>dim. write zeros instead + // d>spacedim. write zeros instead { const unsigned int n_points = static_cast(pow (n_subdivisions+1, dim)); @@ -1526,7 +1568,7 @@ void DataOutBase::write_gmv (const vector > &patches, unsigned int first_vertex_of_patch = 0; - for (typename vector >::const_iterator patch=patches.begin(); + for (typename vector >::const_iterator patch=patches.begin(); patch!=patches.end(); ++patch) { const unsigned int n_subdivisions = patch->n_subdivisions; @@ -1644,9 +1686,10 @@ void DataOutBase::write_gmv (const vector > &patches, -template -void DataOutBase::write_gmv_reorder_data_vectors (const vector > &patches, - vector > &data_vectors) +template +void +DataOutBase::write_gmv_reorder_data_vectors (const vector > &patches, + vector > &data_vectors) { // unlike in the main function, we // don't have here the data_names @@ -1662,7 +1705,7 @@ void DataOutBase::write_gmv_reorder_data_vectors (const vector > &pat // loop over all patches unsigned int next_value = 0; - for (typename vector >::const_iterator patch=patches.begin(); + for (typename vector >::const_iterator patch=patches.begin(); patch != patches.end(); ++patch) { const unsigned int n_subdivisions = patch->n_subdivisions; @@ -1735,48 +1778,53 @@ void DataOutBase::write_gmv_reorder_data_vectors (const vector > &pat /* --------------------------- class DataOutInterface ---------------------- */ -template -void DataOutInterface::write_ucd (ostream &out) const +template +void DataOutInterface::write_ucd (ostream &out) const { DataOutBase::write_ucd (get_patches(), get_dataset_names(), ucd_flags, out); }; -template -void DataOutInterface::write_gnuplot (ostream &out) const + +template +void DataOutInterface::write_gnuplot (ostream &out) const { DataOutBase::write_gnuplot (get_patches(), get_dataset_names(), gnuplot_flags, out); }; -template -void DataOutInterface::write_povray (ostream &out) const + +template +void DataOutInterface::write_povray (ostream &out) const { DataOutBase::write_povray (get_patches(), get_dataset_names(), povray_flags, out); }; -template -void DataOutInterface::write_eps (ostream &out) const + +template +void DataOutInterface::write_eps (ostream &out) const { DataOutBase::write_eps (get_patches(), get_dataset_names(), eps_flags, out); }; -template -void DataOutInterface::write_gmv (ostream &out) const + +template +void DataOutInterface::write_gmv (ostream &out) const { DataOutBase::write_gmv (get_patches(), get_dataset_names(), gmv_flags, out); }; -template -void DataOutInterface::write (ostream &out, + +template +void DataOutInterface::write (ostream &out, OutputFormat output_format) const { if (output_format == default_format) @@ -1810,51 +1858,58 @@ void DataOutInterface::write (ostream &out, }; -template -void DataOutInterface::set_default_format(OutputFormat fmt) + +template +void DataOutInterface::set_default_format(OutputFormat fmt) { Assert(fmt != default_format, ExcNotImplemented()); default_fmt = fmt; } -template -void DataOutInterface::set_flags (const UcdFlags &flags) + +template +void DataOutInterface::set_flags (const UcdFlags &flags) { ucd_flags = flags; }; -template -void DataOutInterface::set_flags (const GnuplotFlags &flags) + +template +void DataOutInterface::set_flags (const GnuplotFlags &flags) { gnuplot_flags = flags; }; -template -void DataOutInterface::set_flags (const PovrayFlags &flags) + +template +void DataOutInterface::set_flags (const PovrayFlags &flags) { povray_flags = flags; }; -template -void DataOutInterface::set_flags (const EpsFlags &flags) + +template +void DataOutInterface::set_flags (const EpsFlags &flags) { eps_flags = flags; }; -template -void DataOutInterface::set_flags (const GmvFlags &flags) + +template +void DataOutInterface::set_flags (const GmvFlags &flags) { gmv_flags = flags; }; -template -string DataOutInterface::default_suffix (OutputFormat output_format) const + +template +string DataOutInterface::default_suffix (OutputFormat output_format) const { if (output_format == default_format) output_format = default_fmt; @@ -1883,9 +1938,10 @@ string DataOutInterface::default_suffix (OutputFormat output_format) const }; -template -DataOutInterface::OutputFormat -DataOutInterface::parse_output_format (const string &format_name) + +template +DataOutInterface::OutputFormat +DataOutInterface::parse_output_format (const string &format_name) { if (format_name == "ucd") return ucd; @@ -1909,15 +1965,17 @@ DataOutInterface::parse_output_format (const string &format_name) }; -template -string DataOutInterface::get_output_format_names () + +template +string DataOutInterface::get_output_format_names () { return "ucd|gnuplot|povray|eps|gmv"; } -template -void DataOutInterface::declare_parameters (ParameterHandler &prm) + +template +void DataOutInterface::declare_parameters (ParameterHandler &prm) { prm.declare_entry ("Output format", "gnuplot", Patterns::Selection (get_output_format_names ())); @@ -1944,8 +2002,9 @@ void DataOutInterface::declare_parameters (ParameterHandler &prm) } -template -void DataOutInterface::parse_parameters (ParameterHandler &prm) + +template +void DataOutInterface::parse_parameters (ParameterHandler &prm) { const string& output_name = prm.get ("Output format"); default_fmt = parse_output_format (output_name); @@ -1974,5 +2033,11 @@ void DataOutInterface::parse_parameters (ParameterHandler &prm) // explicit instantiations. functions in DataOutBase are instantiated by // the respective functions in DataOut_Interface -template class DataOutInterface; -template class DataOutBase::Patch; +template class DataOutInterface; +template class DataOutBase::Patch; + +// also enable plotting surfaces of 3d objects +#if data_out_dimension == 3 +template class DataOutInterface; +template class DataOutBase::Patch; +#endif diff --git a/deal.II/doc/news/2000/c-3-0.html b/deal.II/doc/news/2000/c-3-0.html index 37f389869f..18ab0cbad7 100644 --- a/deal.II/doc/news/2000/c-3-0.html +++ b/deal.II/doc/news/2000/c-3-0.html @@ -9,8 +9,22 @@ + +

Changes after Version 3.0

+ +This is a quite extensive list of changes made after the release of +deal.II version 3.0. It is subdivided into changes +made to the three sub-libraries base, +lac, and deal.II, as well as +changes to the general infrastructure, +documentation, etc. + + + +

General

+
  1. New: the step-9 example program is @@ -100,12 +114,25 @@
    (GK 2000/04/05)

    -
+ + +

base

    +
  1. + New: The DataOutBase and + DataOutBase::Patch classes have been + changed so as to allow output of objects that have an other + dimension than the surrounding space, for example writing faces + instead of cells (this might be useful to write only external + faces in 3d computations). +
    + (WB 2000/09/07) +

    +
  2. New: Timer now uses the system function getrusage (RUSAGE_CHILDREN, @@ -170,6 +197,7 @@ +

    lac

      @@ -407,6 +435,7 @@ +

      deal.II