const Deal_II_IntermediateFlags &flags,
std::ostream &out);
+
+ /**
+ * Given an input stream that contains
+ * data written by
+ * write_deal_II_intermediate, determine
+ * the <tt>dim</tt> and <tt>spacedim</tt>
+ * 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.
+ */
+ static
+ std::pair<unsigned int, unsigned int>
+ determine_intermediate_format_dimensions (std::istream &input);
+
/**
* Determine an estimate for
* the memory consumption (in
const Deal_II_IntermediateFlags &/*flags*/,
std::ostream &out)
{
+ // first write tokens indicating the
+ // template parameters. we need this in
+ // here because we may want to read in data
+ // again even if we don't know in advance
+ // the template parameters, see step-19
+ out << dim << ' ' << spacedim << std::endl;
+
+ // then write a header
out << "[deal.II intermediate format graphics data]" << std::endl
<< "[written by deal.II version "
<< DEAL_II_MAJOR << '.' << DEAL_II_MINOR << "]" << std::endl;
+std::pair<unsigned int, unsigned int>
+DataOutBase::
+determine_intermediate_format_dimensions (std::istream &input)
+{
+ Assert (input, ExcIO());
+
+ int dim, spacedim;
+ input >> dim >> spacedim;
+
+ return std::make_pair (dim, spacedim);
+}
+
+
+
template <int dim, int spacedim>
void
DataOutBase::write_gmv_reorder_data_vectors (const std::vector<Patch<dim,spacedim> > &patches,