using DataOutBase::deal_II_intermediate;
using DataOutBase::parse_output_format;
using DataOutBase::get_output_format_names;
+
+ /**
+ * Constructor.
+ */
+ DataOutInterface ();
/**
* Destructor. Does nothing, but is
*/
virtual std::vector<std::string> get_dataset_names () const = 0;
+ /**
+ * 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
/* --------------------------- class DataOutInterface ---------------------- */
+template <int dim, int spacedim>
+DataOutInterface<dim,spacedim>::DataOutInterface ()
+ : default_subdivisions(1)
+{}
+
+
template <int dim, int spacedim>
DataOutInterface<dim,spacedim>::~DataOutInterface ()
{}
prm.declare_entry ("Output format", "gnuplot",
Patterns::Selection (get_output_format_names ()),
"A name for the output format to be used");
+ prm.declare_entry("Subdivisions", "1", Patterns::Integer(),
+ "Number of subdivisions of each mesh cell");
prm.enter_subsection ("DX output parameters");
DXFlags::declare_parameters (prm);
{
const std::string& output_name = prm.get ("Output format");
default_fmt = parse_output_format (output_name);
-
+ default_subdivisions = prm.get_integer ("Subdivisions");
+
prm.enter_subsection ("DX output parameters");
dx_flags.parse_parameters (prm);
prm.leave_subsection ();
* documentation of this class
* for further information.
*
+ * The default value <tt>0</tt>
+ * of <tt>n_subdivisions</tt>
+ * indicates that the value
+ * stored in
+ * DataOutInterface::default_subdivisions
+ * is to be used.
+ *
* The function supports
* multithreading, if deal.II is
* compiled in multithreading
* the patches is set to
* <tt>multithread_info.n_default_threads</tt>.
*/
- virtual void build_patches (const unsigned int n_subdivisions = 1,
+ virtual void build_patches (const unsigned int n_subdivisions = 0,
const unsigned int n_threads = multithread_info.n_default_threads);
/**
* deformation of each vertex.
*/
virtual void build_patches (const Mapping<DH::dimension> &mapping,
- const unsigned int n_subdivisions = 1,
+ const unsigned int n_subdivisions = 0,
const unsigned int n_threads = multithread_info.n_default_threads);
/**
* <tt>multithread_info.n_default_threads</tt>.
*/
virtual void
- build_patches (const unsigned int n_subdivisions = 1,
+ build_patches (const unsigned int n_subdivisions = 0,
const unsigned int n_threads = multithread_info.n_default_threads);
/**
* <tt>multithread_info.n_default_threads</tt>.
*/
virtual void build_patches (const unsigned int n_patches_per_circle,
- const unsigned int n_subdivisions = 1,
+ const unsigned int n_subdivisions = 0,
const unsigned int n_threads = multithread_info.n_default_threads);
/**
* is always the same as the one is space
* direction for technical reasons.
*/
- void build_patches (const unsigned int n_subdivisions = 1);
+ void build_patches (const unsigned int n_subdivisions = 0);
/**
* Release all data that is no
template <int dim, class DH>
void DataOut<dim,DH>::build_patches (const Mapping<DH::dimension> &mapping,
- const unsigned int n_subdivisions,
+ const unsigned int nnnn_subdivisions,
const unsigned int n_threads_)
{
+ unsigned int n_subdivisions = (nnnn_subdivisions != 0)
+ ? nnnn_subdivisions
+ : this->default_subdivisions;
+
Assert (n_subdivisions >= 1,
ExcInvalidNumberOfSubdivisions(n_subdivisions));
template <int dim, class DH>
-void DataOutFaces<dim,DH>::build_patches (const unsigned int n_subdivisions,
+void DataOutFaces<dim,DH>::build_patches (const unsigned int nnnn_subdivisions,
const unsigned int n_threads_)
{
+ unsigned int n_subdivisions = (nnnn_subdivisions != 0)
+ ? nnnn_subdivisions
+ : this->default_subdivisions;
+
Assert (n_subdivisions >= 1,
ExcInvalidNumberOfSubdivisions(n_subdivisions));
template <int dim, class DH>
-void DataOutRotation<dim,DH>::build_patches (const unsigned int n_patches_per_circle,
- const unsigned int n_subdivisions,
- const unsigned int n_threads_)
+void DataOutRotation<dim,DH>::build_patches (
+ const unsigned int n_patches_per_circle,
+ const unsigned int nnnn_subdivisions,
+ const unsigned int n_threads_)
{
// Check consistency of redundant
// template parameter
Assert (dim==DH::dimension, ExcDimensionMismatch(dim, DH::dimension));
+ unsigned int n_subdivisions = (nnnn_subdivisions != 0)
+ ? nnnn_subdivisions
+ : this->default_subdivisions;
+
Assert (n_subdivisions >= 1,
ExcInvalidNumberOfSubdivisions(n_subdivisions));
template <int dim, class DH>
-void DataOutStack<dim,DH>::build_patches (const unsigned int n_subdivisions)
+void DataOutStack<dim,DH>::build_patches (const unsigned int nnnn_subdivisions)
{
// this is mostly copied from the
// DataOut class
+ unsigned int n_subdivisions = (nnnn_subdivisions != 0)
+ ? nnnn_subdivisions
+ : this->default_subdivisions;
+
Assert (n_subdivisions >= 1,
ExcInvalidNumberOfSubdivisions(n_subdivisions));
Assert (dof_handler != 0, ExcNoDoFHandlerSelected());
<ol>
+
<li> <p>
Changed: Lower dimensional objects have been removed from the
hierachical structure of levels in <code
<ol>
+ <li> <p> Changed: The default number of subdivisions in the <code
+ class="member">build_patches</code> functions of the DataOut classes is
+ now part of the parameters red by <code
+ class="member">parse_parameters</code>. This default value is used
+ whenever patches with zero subdivisions are being built.
+ <br>
+ (GK 2006/06/18)
+ </p>
+
<li> <p>New: a configuration parameter <tt>--with-boost</tt> has been
introduced, allowing the selection of a previously installed boost
library instead of the contibuted.