#include <deal.II/base/config.h>
#include <deal.II/base/named_data.h>
+#include <deal.II/algorithms/any_data.h>
#include <deal.II/base/event.h>
#include <deal.II/algorithms/operator.h>
#include <deal.II/dofs/dof_handler.h>
+#include <deal.II/numerics/data_out.h>
#include <fstream>
private:
SmartPointer<DoFHandler<dim, spacedim>,
DoFOutputOperator<VECTOR, dim, spacedim> > dof;
-
+
const std::string filename_base;
const unsigned int digits;
+
+ DataOut<dim> out;
};
template <class VECTOR, int dim, int spacedim>
#include <deal.II/numerics/dof_output_operator.h>
-#include <deal.II/numerics/data_out.h>
DEAL_II_NAMESPACE_OPEN
:
filename_base(filename_base),
digits(digits)
- {}
+ {
+ out.set_default_format(DataOutBase::gnuplot);
+ }
template <class VECTOR, int dim, int spacedim>
const AnyData &data)
{
Assert ((dof!=0), ExcNotInitialized());
- DataOut<dim> out;
- out.set_default_format(DataOutBase::gnuplot);
out.attach_dof_handler (*dof);
for (unsigned int i=0;i<data.size();++i)
{
std::ofstream out_filename (streamOut.str().c_str());
out.build_patches (2);
out.write_gnuplot (out_filename);
+ out.clear ();
return *this;
}
}
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams