Reference documentation for deal.II version 8.4.2
data_out_base.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1999 - 2016 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii__data_out_base_h
17 #define dealii__data_out_base_h
18 
19 
20 #include <deal.II/base/config.h>
21 #include <deal.II/base/point.h>
22 #include <deal.II/base/table.h>
23 #include <deal.II/base/geometry_info.h>
24 #include <deal.II/base/std_cxx11/tuple.h>
25 
26 #include <vector>
27 #include <string>
28 #include <limits>
29 #include <typeinfo>
30 
31 #include <deal.II/base/mpi.h>
32 
33 // Only include the Tecplot API header if the appropriate files
34 // were detected by configure
35 #ifdef DEAL_II_HAVE_TECPLOT
36 # include "TECIO.h"
37 # include <string.h>
38 #endif
39 
40 #include <ostream>
41 
42 DEAL_II_NAMESPACE_OPEN
43 
44 
45 class ParameterHandler;
46 class XDMFEntry;
47 
211 namespace DataOutBase
212 {
237  template <int dim, int spacedim=dim>
238  struct Patch
239  {
243  static const unsigned int space_dim=spacedim;
244 
252 
259  unsigned int neighbors[dim > 0
260  ?
262  :
263  1];
264 
269  unsigned int patch_index;
270 
276  unsigned int n_subdivisions;
277 
299 
313 
318  Patch ();
319 
324  bool operator == (const Patch &patch) const;
325 
332  std::size_t memory_consumption () const;
333 
337  void swap (Patch<dim,spacedim> &other_patch);
338 
342  static const unsigned int no_neighbor = numbers::invalid_unsigned_int;
351  DeclException2 (ExcInvalidCombinationOfDimensions,
352  int, int,
353  << "It is not possible to have a structural dimension of " << arg1
354  << " to be larger than the space dimension of the surrounding"
355  << " space " << arg2);
357  };
358 
359 
371  template<typename FlagsType>
373  {
381  static void declare_parameters (ParameterHandler &prm);
382 
390  void parse_parameters (const ParameterHandler &prm);
391 
398  std::size_t memory_consumption () const;
399  };
400 
401 
402  template<typename FlagsType>
404  {}
405 
406 
407  template<typename FlagsType>
409  {}
410 
411 
412  template<typename FlagsType>
414  {
415  return sizeof(FlagsType);
416  }
417 
418 
424  struct DXFlags : public OutputFlagsBase<DXFlags>
425  {
440 
445 
451 
455  DXFlags (const bool write_neighbors = false,
456  const bool int_binary = false,
457  const bool coordinates_binary = false,
458  const bool data_binary = false);
459 
464  static void declare_parameters (ParameterHandler &prm);
465 
472  void parse_parameters (const ParameterHandler &prm);
473  };
474 
480  struct UcdFlags : public OutputFlagsBase<UcdFlags>
481  {
492 
496  UcdFlags (const bool write_preamble = false);
497 
502  static void declare_parameters (ParameterHandler &prm);
503 
510  void parse_parameters (const ParameterHandler &prm);
511  };
512 
519  struct GnuplotFlags : public OutputFlagsBase<GnuplotFlags>
520  {};
521 
528  struct PovrayFlags : public OutputFlagsBase<PovrayFlags>
529  {
535  bool smooth;
536 
543 
551 
555  PovrayFlags (const bool smooth = false,
556  const bool bicubic_patch = false,
557  const bool external_data = false);
558 
563  static void declare_parameters (ParameterHandler &prm);
564 
571  void parse_parameters (const ParameterHandler &prm);
572  };
573 
574 
581  struct EpsFlags : public OutputFlagsBase<EpsFlags>
582  {
589  unsigned int height_vector;
590 
595  unsigned int color_vector;
596 
602  enum SizeType
603  {
607  height
608  };
609 
614 
622  unsigned int size;
623 
627  double line_width;
628 
634  double azimut_angle;
635 
659  double turn_angle;
660 
671  double z_scaling;
672 
679  bool draw_mesh;
680 
698 
708 
712  struct RgbValues
713  {
714  float red;
715  float green;
716  float blue;
717 
722  bool is_grey () const;
723  };
724 
732  typedef RgbValues (*ColorFunction) (const double value,
733  const double min_value,
734  const double max_value);
735 
741  ColorFunction color_function;
742 
743 
752  static RgbValues
753  default_color_function (const double value,
754  const double min_value,
755  const double max_value);
756 
762  static RgbValues
763  grey_scale_color_function (const double value,
764  const double min_value,
765  const double max_value);
766 
773  static RgbValues
774  reverse_grey_scale_color_function (const double value,
775  const double min_value,
776  const double max_value);
777 
781  EpsFlags (const unsigned int height_vector = 0,
782  const unsigned int color_vector = 0,
783  const SizeType size_type = width,
784  const unsigned int size = 300,
785  const double line_width = 0.5,
786  const double azimut_angle = 60,
787  const double turn_angle = 30,
788  const double z_scaling = 1.0,
789  const bool draw_mesh = true,
790  const bool draw_cells = true,
791  const bool shade_cells = true,
792  const ColorFunction color_function= &default_color_function);
793 
801  static void declare_parameters (ParameterHandler &prm);
802 
809  void parse_parameters (const ParameterHandler &prm);
810  };
811 
818  struct GmvFlags : public OutputFlagsBase<GmvFlags>
819  {};
820 
826  struct TecplotFlags : public OutputFlagsBase<TecplotFlags>
827  {
834 
839  const char *zone_name;
840 
847 
851  TecplotFlags (const char *tecplot_binary_file_name = NULL,
852  const char *zone_name = NULL,
853  const double solution_time = -1.0);
854 
859  std::size_t memory_consumption () const;
860  };
861 
867  struct VtkFlags : public OutputFlagsBase<VtkFlags>
868  {
879  double time;
880 
891  unsigned int cycle;
892 
900 
905  {
906  no_compression,
907  best_speed,
908  best_compression,
909  default_compression
910  };
911 
917 
921  VtkFlags (const double time = std::numeric_limits<double>::min(),
922  const unsigned int cycle = std::numeric_limits<unsigned int>::min(),
923  const bool print_date_and_time = true,
924  const ZlibCompressionLevel compression_level = best_compression);
925  };
926 
927 
933  struct SvgFlags : public OutputFlagsBase<SvgFlags>
934  {
938  unsigned int height;
939 
944  unsigned int width;
945 
952  unsigned int height_vector;
953 
957  int azimuth_angle, polar_angle;
958 
959  unsigned int line_thickness;
960 
964  bool margin;
965 
970 
974  SvgFlags(const unsigned int height_vector = 0,
975  const int azimuth_angle = 37,
976  const int polar_angle = 45,
977  const unsigned int line_thickness = 1,
978  const bool margin = true,
979  const bool draw_colorbar = true);
980  };
981 
982 
989  struct Deal_II_IntermediateFlags : public OutputFlagsBase<Deal_II_IntermediateFlags>
990  {
997  static const unsigned int format_version;
998  };
999 
1007  {
1014 
1020 
1024  DataOutFilterFlags (const bool filter_duplicate_vertices = false,
1025  const bool xdmf_hdf5_output = false);
1026 
1031  static void declare_parameters (ParameterHandler &prm);
1032 
1039  void parse_parameters (const ParameterHandler &prm);
1040 
1045  std::size_t memory_consumption () const;
1046  };
1047 
1070  {
1071  private:
1075  struct Point3Comp
1076  {
1077  bool operator() (const Point<3> &lhs, const Point<3> &rhs) const
1078  {
1079  return (lhs(0) < rhs(0) || (!(rhs(0) < lhs(0)) && (lhs(1) < rhs(1) || (!(rhs(1) < lhs(1)) && lhs(2) < rhs(2)))));
1080  }
1081  };
1082 
1083  typedef std::multimap<Point<3>, unsigned int, Point3Comp> Map3DPoint;
1084 
1087 
1090 
1093 
1095  Map3DPoint existing_points;
1096 
1098  std::map<unsigned int, unsigned int> filtered_points;
1099 
1101  std::map<unsigned int, unsigned int> filtered_cells;
1102 
1104  std::vector<std::string> data_set_names;
1105 
1107  std::vector<unsigned int> data_set_dims;
1108 
1110  std::vector<std::vector<double> > data_sets;
1111 
1115  void internal_add_cell(const unsigned int &cell_index, const unsigned int &pt_index);
1116 
1117  public:
1118  DataOutFilter() : flags(false, true) {};
1119  DataOutFilter(const DataOutBase::DataOutFilterFlags &flags) : flags(flags) {};
1120 
1126  template<int dim>
1127  void write_point(const unsigned int &index, const Point<dim> &p);
1128 
1132  template<int dim>
1133  void write_cell(unsigned int index, unsigned int start, unsigned int d1, unsigned int d2, unsigned int d3);
1134 
1141  void write_data_set(const std::string &name, const unsigned int &dimension, const unsigned int &set_num, const Table<2,double> &data_vectors);
1142 
1147  void fill_node_data(std::vector<double> &node_data) const;
1148 
1153  void fill_cell_data(const unsigned int &local_node_offset, std::vector<unsigned int> &cell_data) const;
1154 
1158  std::string get_data_set_name(const unsigned int &set_num) const
1159  {
1160  return data_set_names.at(set_num);
1161  };
1162 
1166  unsigned int get_data_set_dim(const unsigned int &set_num) const
1167  {
1168  return data_set_dims.at(set_num);
1169  };
1170 
1175  const double *get_data_set(const unsigned int &set_num) const
1176  {
1177  return &data_sets[set_num][0];
1178  };
1179 
1184  unsigned int n_nodes() const
1185  {
1186  return existing_points.size();
1187  };
1188 
1193  unsigned int n_cells() const
1194  {
1195  return filtered_cells.size()/n_cell_verts;
1196  };
1197 
1202  unsigned int n_data_sets() const
1203  {
1204  return data_set_names.size();
1205  };
1206 
1210  void flush_points () {};
1211 
1215  void flush_cells () {};
1216 
1217  };
1218 
1219 
1224  {
1267 
1272 
1277 
1282 
1287 
1292  };
1293 
1294 
1298  template <int dim, int spacedim>
1299  void write_dx (const std::vector<Patch<dim,spacedim> > &patches,
1300  const std::vector<std::string> &data_names,
1301  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1302  const DXFlags &flags,
1303  std::ostream &out);
1304 
1349  template <int spacedim>
1350  void write_eps (const std::vector<Patch<2,spacedim> > &patches,
1351  const std::vector<std::string> &data_names,
1352  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1353  const EpsFlags &flags,
1354  std::ostream &out);
1355 
1361  template <int dim, int spacedim>
1362  void write_eps (const std::vector<Patch<dim,spacedim> > &patches,
1363  const std::vector<std::string> &data_names,
1364  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1365  const EpsFlags &flags,
1366  std::ostream &out);
1367 
1368 
1378  template <int dim, int spacedim>
1379  void write_gmv (const std::vector<Patch<dim,spacedim> > &patches,
1380  const std::vector<std::string> &data_names,
1381  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1382  const GmvFlags &flags,
1383  std::ostream &out);
1384 
1441  template <int dim, int spacedim>
1442  void write_gnuplot (const std::vector<Patch<dim,spacedim> > &patches,
1443  const std::vector<std::string> &data_names,
1444  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1445  const GnuplotFlags &flags,
1446  std::ostream &out);
1447 
1493  template <int dim, int spacedim>
1494  void write_povray (const std::vector<Patch<dim,spacedim> > &patches,
1495  const std::vector<std::string> &data_names,
1496  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1497  const PovrayFlags &flags,
1498  std::ostream &out);
1499 
1506  template <int dim, int spacedim>
1507  void write_tecplot (const std::vector<Patch<dim,spacedim> > &patches,
1508  const std::vector<std::string> &data_names,
1509  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1510  const TecplotFlags &flags,
1511  std::ostream &out);
1512 
1532  template <int dim, int spacedim>
1533  void write_tecplot_binary (
1534  const std::vector<Patch<dim,spacedim> > &patches,
1535  const std::vector<std::string> &data_names,
1536  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1537  const TecplotFlags &flags,
1538  std::ostream &out);
1539 
1554  template <int dim, int spacedim>
1555  void write_ucd (const std::vector<Patch<dim,spacedim> > &patches,
1556  const std::vector<std::string> &data_names,
1557  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1558  const UcdFlags &flags,
1559  std::ostream &out);
1560 
1580  template <int dim, int spacedim>
1581  void write_vtk (const std::vector<Patch<dim,spacedim> > &patches,
1582  const std::vector<std::string> &data_names,
1583  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1584  const VtkFlags &flags,
1585  std::ostream &out);
1586 
1587 
1611  template <int dim, int spacedim>
1612  void write_vtu (const std::vector<Patch<dim,spacedim> > &patches,
1613  const std::vector<std::string> &data_names,
1614  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1615  const VtkFlags &flags,
1616  std::ostream &out);
1617 
1623  void write_vtu_header (std::ostream &out,
1624  const VtkFlags &flags);
1625 
1631  void write_vtu_footer (std::ostream &out);
1632 
1638  template <int dim, int spacedim>
1639  void write_vtu_main (const std::vector<Patch<dim,spacedim> > &patches,
1640  const std::vector<std::string> &data_names,
1641  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1642  const VtkFlags &flags,
1643  std::ostream &out);
1644 
1665  template <int spacedim>
1666  void write_svg (const std::vector<Patch<2,spacedim> > &patches,
1667  const std::vector<std::string> &data_names,
1668  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1669  const SvgFlags &flags,
1670  std::ostream &out);
1671 
1709  template <int dim, int spacedim>
1711  const std::vector<Patch<dim,spacedim> > &patches,
1712  const std::vector<std::string> &data_names,
1713  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1714  const Deal_II_IntermediateFlags &flags,
1715  std::ostream &out);
1716 
1721  template <int dim, int spacedim>
1722  void write_hdf5_parallel (const std::vector<Patch<dim,spacedim> > &patches,
1723  const DataOutFilter &data_filter,
1724  const std::string &filename,
1725  MPI_Comm comm);
1726 
1734  template <int dim, int spacedim>
1735  void write_hdf5_parallel (const std::vector<Patch<dim,spacedim> > &patches,
1736  const DataOutFilter &data_filter,
1737  const bool write_mesh_file,
1738  const std::string &mesh_filename,
1739  const std::string &solution_filename,
1740  MPI_Comm comm);
1741 
1748  template <int dim, int spacedim>
1749  void write_filtered_data (const std::vector<Patch<dim,spacedim> > &patches,
1750  const std::vector<std::string> &data_names,
1751  const std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
1752  DataOutFilter &filtered_data);
1753 
1765  std::pair<unsigned int, unsigned int>
1766  determine_intermediate_format_dimensions (std::istream &input);
1767 
1779  OutputFormat parse_output_format (const std::string &format_name);
1780 
1786  std::string get_output_format_names ();
1787 
1806  std::string default_suffix (const OutputFormat output_format);
1807 
1816  DeclException2 (ExcInvalidDatasetSize,
1817  int, int,
1818  << "The number of points in this data set is " << arg1
1819  << ", but we expected " << arg2 << " in each space direction.");
1823  DeclException0 (ExcNoPatches);
1827  DeclException0 (ExcTecplotAPIError);
1831  DeclException1 (ExcErrorOpeningTecplotFile,
1832  char *,
1833  << "There was an error opening Tecplot file " << arg1
1834  << " for output");
1835 
1837 }
1838 
1839 
1840 
1841 
1953 template <int dim, int spacedim=dim>
1955 {
1956 public:
1960  DataOutInterface ();
1961 
1966  virtual ~DataOutInterface ();
1967 
1972  void write_dx (std::ostream &out) const;
1973 
1978  void write_eps (std::ostream &out) const;
1979 
1984  void write_gmv (std::ostream &out) const;
1985 
1990  void write_gnuplot (std::ostream &out) const;
1991 
1996  void write_povray (std::ostream &out) const;
1997 
2002  void write_tecplot (std::ostream &out) const;
2003 
2009  void write_tecplot_binary (std::ostream &out) const;
2010 
2015  void write_ucd (std::ostream &out) const;
2016 
2028  void write_vtk (std::ostream &out) const;
2029 
2044  void write_vtu (std::ostream &out) const;
2045 
2054  void write_vtu_in_parallel (const char *filename, MPI_Comm comm) const;
2055 
2086  void write_pvtu_record (std::ostream &out,
2087  const std::vector<std::string> &piece_names) const;
2088 
2138  void write_pvd_record (std::ostream &out,
2139  const std::vector<std::pair<double,std::string> > &times_and_names) const;
2140 
2152  void write_visit_record (std::ostream &out,
2153  const std::vector<std::string> &piece_names) const;
2154 
2184  void write_visit_record (std::ostream &out,
2185  const std::vector<std::vector<std::string> > &piece_names) const;
2186 
2191  void write_svg(std::ostream &out) const;
2192 
2203  void write_deal_II_intermediate (std::ostream &out) const;
2204 
2210  XDMFEntry create_xdmf_entry (const DataOutBase::DataOutFilter &data_filter,
2211  const std::string &h5_filename,
2212  const double cur_time,
2213  MPI_Comm comm) const;
2214 
2220  XDMFEntry create_xdmf_entry (const DataOutBase::DataOutFilter &data_filter,
2221  const std::string &h5_mesh_filename,
2222  const std::string &h5_solution_filename,
2223  const double cur_time,
2224  MPI_Comm comm) const;
2225 
2246  void write_xdmf_file (const std::vector<XDMFEntry> &entries,
2247  const std::string &filename,
2248  MPI_Comm comm) const;
2249 
2263  void write_hdf5_parallel (const DataOutBase::DataOutFilter &data_filter,
2264  const std::string &filename,
2265  MPI_Comm comm) const;
2266 
2274  void write_hdf5_parallel (const DataOutBase::DataOutFilter &data_filter,
2275  const bool write_mesh_file,
2276  const std::string &mesh_filename,
2277  const std::string &solution_filename,
2278  MPI_Comm comm) const;
2279 
2286  void write_filtered_data (DataOutBase::DataOutFilter &filtered_data) const;
2287 
2288 
2297  void write (std::ostream &out,
2298  const DataOutBase::OutputFormat output_format = DataOutBase::default_format) const;
2299 
2304  void set_default_format (const DataOutBase::OutputFormat default_format);
2305 
2306 
2311  template<typename FlagType>
2312  void set_flags (const FlagType &flags);
2313 
2314 
2322  std::string
2324 
2339  static void declare_parameters (ParameterHandler &prm);
2340 
2348  void parse_parameters (ParameterHandler &prm);
2349 
2355  std::size_t memory_consumption () const;
2356 
2357 protected:
2365  virtual
2366  const std::vector<DataOutBase::Patch<dim,spacedim> > &
2367  get_patches () const = 0;
2368 
2373  virtual
2374  std::vector<std::string>
2375  get_dataset_names () const = 0;
2376 
2395  virtual
2396  std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> >
2397  get_vector_data_ranges () const;
2398 
2404  unsigned int default_subdivisions;
2405 
2406 private:
2413 
2419 
2425 
2431 
2437 
2443 
2449 
2455 
2461 
2467 
2473 };
2474 
2475 
2476 
2525 template <int dim, int spacedim=dim>
2526 class DataOutReader : public DataOutInterface<dim,spacedim>
2527 {
2528 public:
2534  void read (std::istream &in);
2535 
2559  void merge (const DataOutReader<dim,spacedim> &other);
2560 
2564  DeclException0 (ExcNoPatches);
2568  DeclException0 (ExcIncompatibleDatasetNames);
2572  DeclException0 (ExcIncompatiblePatchLists);
2576  DeclException4 (ExcIncompatibleDimensions,
2577  int, int, int, int,
2578  << "Either the dimensions <" << arg1 << "> and <"
2579  << arg2 << "> or the space dimensions <"
2580  << arg3 << "> and <" << arg4
2581  << "> do not match!");
2582 
2583 protected:
2592  virtual const std::vector<::DataOutBase::Patch<dim,spacedim> > &
2593  get_patches () const;
2594 
2601  virtual std::vector<std::string> get_dataset_names () const;
2602 
2621  virtual
2622  std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> >
2623  get_vector_data_ranges () const;
2624 
2625 private:
2630  std::vector<::DataOutBase::Patch<dim,spacedim> > patches;
2631  std::vector<std::string> dataset_names;
2632 
2637  std::vector<std_cxx11::tuple<unsigned int, unsigned int, std::string> >
2639 };
2640 
2641 
2642 
2643 
2653 {
2654 private:
2656  bool valid;
2658  std::string h5_sol_filename, h5_mesh_filename;
2660  double entry_time;
2662  unsigned int num_nodes, num_cells, dimension;
2664  std::map<std::string, unsigned int> attribute_dims;
2665 
2667  std::string indent(const unsigned int indent_level) const
2668  {
2669  std::string res = "";
2670  for (unsigned int i=0; i<indent_level; ++i) res += " ";
2671  return res;
2672  }
2673 
2674 public:
2675  XDMFEntry() : valid(false) {};
2676  XDMFEntry(const std::string filename, const double time, const unsigned int nodes, const unsigned int cells, const unsigned int dim) : valid(true), h5_sol_filename(filename), h5_mesh_filename(filename), entry_time(time), num_nodes(nodes), num_cells(cells), dimension(dim) {};
2677  XDMFEntry(const std::string mesh_filename, const std::string solution_filename, const double time, const unsigned int nodes, const unsigned int cells, const unsigned int dim) : valid(true), h5_sol_filename(solution_filename), h5_mesh_filename(mesh_filename), entry_time(time), num_nodes(nodes), num_cells(cells), dimension(dim) {};
2678 
2682  void add_attribute(const std::string &attr_name, const unsigned int dimension)
2683  {
2684  attribute_dims[attr_name] = dimension;
2685  }
2686 
2690  template <class Archive>
2691  void serialize(Archive &ar, const unsigned int /*version*/)
2692  {
2693  ar &valid
2694  &h5_sol_filename
2695  &h5_mesh_filename
2696  &entry_time
2697  &num_nodes
2698  &num_cells
2699  &dimension
2700  &attribute_dims;
2701  }
2702 
2705  std::string get_xdmf_content(const unsigned int indent_level) const;
2706 };
2707 
2708 
2709 
2710 /* -------------------- inline functions ------------------- */
2711 
2712 namespace DataOutBase
2713 {
2714  inline
2715  bool
2717  {
2718  return (red == green) && (red == blue);
2719  }
2720 
2721 
2722  /* -------------------- template functions ------------------- */
2723 
2732  template <int dim, int spacedim>
2733  std::ostream &
2734  operator << (std::ostream &out,
2735  const Patch<dim,spacedim> &patch);
2736 
2737 
2738 
2747  template <int dim, int spacedim>
2748  std::istream &
2749  operator >> (std::istream &in,
2750  Patch<dim,spacedim> &patch);
2751 }
2752 
2753 
2754 DEAL_II_NAMESPACE_CLOSE
2755 
2756 #endif
void write_gmv(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > &vector_data_ranges, const GmvFlags &flags, std::ostream &out)
static const unsigned int invalid_unsigned_int
Definition: types.h:164
Map3DPoint existing_points
Map of points to an internal index.
unsigned int height_vector
void write_vtu_footer(std::ostream &out)
static void declare_parameters(ParameterHandler &prm)
void write_ucd(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > &vector_data_ranges, const UcdFlags &flags, std::ostream &out)
DeclException0(ExcNoPatches)
std::size_t memory_consumption() const
std::map< unsigned int, unsigned int > filtered_cells
Map of cells to the filtered points.
std::pair< unsigned int, unsigned int > determine_intermediate_format_dimensions(std::istream &input)
void swap(Patch< dim, spacedim > &other_patch)
bool valid
Whether this entry is valid and contains data to be written.
unsigned int neighbors[dim > 0 ? GeometryInfo< dim >::faces_per_cell :1]
void write_vtu_header(std::ostream &out, const VtkFlags &flags)
unsigned int n_nodes() const
double entry_time
The simulation time associated with this entry.
ZlibCompressionLevel compression_level
std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > vector_data_ranges
void write_filtered_data(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > &vector_data_ranges, DataOutFilter &filtered_data)
unsigned int default_subdivisions
std::vector< unsigned int > data_set_dims
Data set dimensions.
Point< spacedim > vertices[GeometryInfo< dim >::vertices_per_cell]
std::vector< std::vector< double > > data_sets
Data set data.
std::map< std::string, unsigned int > attribute_dims
The attributes associated with this entry and their dimension.
const char * tecplot_binary_file_name
int n_cell_verts
Number of vertices per cell.
DataOutBase::PovrayFlags povray_flags
std::string get_data_set_name(const unsigned int &set_num) const
DataOutBase::DataOutFilterFlags flags
Flags used to specify filtering behavior.
unsigned int n_data_sets() const
std::string default_suffix(const OutputFormat output_format)
unsigned int patch_index
std::istream & operator>>(std::istream &in, Patch< dim, spacedim > &patch)
std::string indent(const unsigned int indent_level) const
Small function to create indentation for XML file.
unsigned int n_cells() const
void serialize(Archive &ar, const unsigned int)
std::vector< std::string > data_set_names
Data set names.
void add_attribute(const std::string &attr_name, const unsigned int dimension)
void write_povray(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > &vector_data_ranges, const PovrayFlags &flags, std::ostream &out)
void write_eps(const std::vector< Patch< 2, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > &vector_data_ranges, const EpsFlags &flags, std::ostream &out)
void parse_parameters(const ParameterHandler &prm)
DataOutBase::Deal_II_IntermediateFlags deal_II_intermediate_flags
int node_dim
Dimensionality of the nodes, used to properly output filtered data.
OutputFormat parse_output_format(const std::string &format_name)
void write_svg(const std::vector< Patch< 2, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > &vector_data_ranges, const SvgFlags &flags, std::ostream &out)
void write_dx(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > &vector_data_ranges, const DXFlags &flags, std::ostream &out)
ColorFunction color_function
unsigned int n_subdivisions
DataOutBase::TecplotFlags tecplot_flags
Scale to given width.
std::ostream & operator<<(std::ostream &out, const Patch< dim, spacedim > &patch)
DataOutBase::SvgFlags svg_flags
std::string h5_sol_filename
The name of the HDF5 heavy data solution and/or mesh files this entry references. ...
const double * get_data_set(const unsigned int &set_num) const
unsigned int get_data_set_dim(const unsigned int &set_num) const
void write_vtk(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > &vector_data_ranges, const VtkFlags &flags, std::ostream &out)
bool operator==(const Patch &patch) const
DeclException1(ExcErrorOpeningTecplotFile, char *,<< "There was an error opening Tecplot file "<< arg1<< " for output")
void write_vtu(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > &vector_data_ranges, const VtkFlags &flags, std::ostream &out)
static const unsigned int no_neighbor
DataOutBase::GmvFlags gmv_flags
DataOutBase::VtkFlags vtk_flags
static const unsigned int format_version
std::vector<::DataOutBase::Patch< dim, spacedim > > patches
void write_tecplot_binary(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > &vector_data_ranges, const TecplotFlags &flags, std::ostream &out)
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)
static const unsigned int space_dim
DataOutBase::GnuplotFlags gnuplot_flags
unsigned int num_nodes
The number of nodes, cells and dimensionality associated with the data.
#define DeclException4(Exception4, type1, type2, type3, type4, outsequence)
Definition: exceptions.h:572
void write_tecplot(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > &vector_data_ranges, const TecplotFlags &flags, std::ostream &out)
unsigned int color_vector
void write_vtu_main(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > &vector_data_ranges, const VtkFlags &flags, std::ostream &out)
DataOutBase::OutputFormat default_fmt
void write_hdf5_parallel(const std::vector< Patch< dim, spacedim > > &patches, const DataOutFilter &data_filter, const std::string &filename, MPI_Comm comm)
DataOutBase::EpsFlags eps_flags
void write_deal_II_intermediate(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > &vector_data_ranges, const Deal_II_IntermediateFlags &flags, std::ostream &out)
void write_gnuplot(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std_cxx11::tuple< unsigned int, unsigned int, std::string > > &vector_data_ranges, const GnuplotFlags &flags, std::ostream &out)
std::size_t memory_consumption() const
std::map< unsigned int, unsigned int > filtered_points
Map of actual point index to internal point index.
std::string get_output_format_names()
DataOutBase::UcdFlags ucd_flags
Table< 2, float > data
unsigned int height_vector
DataOutBase::DXFlags dx_flags