16#ifndef dealii_data_out_base_h
17#define dealii_data_out_base_h
32#include <boost/serialization/map.hpp>
42#ifdef DEAL_II_HAVE_TECPLOT
245 template <
int dim,
int spacedim = dim>
272 std::array<unsigned int, GeometryInfo<dim>::faces_per_cell>
neighbors;
374 <<
"It is not possible to have a structural dimension of " << arg1
375 <<
" to be larger than the space dimension of the surrounding"
376 <<
" space " << arg2);
397 template <
int spacedim>
526 <<
"It is not possible to have a structural dimension of " << arg1
527 <<
" to be larger than the space dimension of the surrounding"
528 <<
" space " << arg2);
544 template <
typename FlagsType>
578 template <
typename FlagsType>
584 template <
typename FlagsType>
590 template <
typename FlagsType>
594 return sizeof(FlagsType);
743 "There should be at least one space dimension per spatial "
744 "dimension (extras are ignored).");
961 const double min_value,
962 const double max_value);
982 const double min_value,
983 const double max_value);
992 const double min_value,
993 const double max_value);
1003 const double min_value,
1004 const double max_value);
1012 const unsigned int size = 300,
1203 const double time = std::numeric_limits<double>::min(),
1204 const unsigned int cycle = std::numeric_limits<unsigned int>::min(),
1262 const bool margin =
true,
1399 const unsigned int start,
1400 const unsigned int d1,
1401 const unsigned int d2,
1402 const unsigned int d3);
1410 const unsigned int start,
1411 const unsigned int n_points,
1422 const unsigned int dimension,
1423 const unsigned int set_num,
1439 std::vector<unsigned int> &cell_data)
const;
1517 return (one(0) < two(0) ||
1518 (!(two(0) < one(0)) &&
1519 (one(1) < two(1) || (!(two(1) < one(1)) && one(2) < two(2)))));
1579 const unsigned int pt_index);
1671 template <
int dim,
int spacedim>
1674 const std::vector<Patch<dim, spacedim>> &patches,
1675 const std::vector<std::string> & data_names,
1677 std::tuple<
unsigned int,
1681 & nonscalar_data_ranges,
1682 const DXFlags &flags,
1683 std::ostream & out);
1729 template <
int spacedim>
1732 const std::vector<Patch<2, spacedim>> &patches,
1733 const std::vector<std::string> & data_names,
1735 std::tuple<
unsigned int,
1739 & nonscalar_data_ranges,
1740 const EpsFlags &flags,
1741 std::ostream & out);
1748 template <
int dim,
int spacedim>
1751 const std::vector<Patch<dim, spacedim>> &patches,
1752 const std::vector<std::string> & data_names,
1754 std::tuple<
unsigned int,
1758 & nonscalar_data_ranges,
1759 const EpsFlags &flags,
1760 std::ostream & out);
1772 template <
int dim,
int spacedim>
1775 const std::vector<Patch<dim, spacedim>> &patches,
1776 const std::vector<std::string> & data_names,
1778 std::tuple<
unsigned int,
1782 & nonscalar_data_ranges,
1783 const GmvFlags &flags,
1784 std::ostream & out);
1841 template <
int dim,
int spacedim>
1844 const std::vector<Patch<dim, spacedim>> &patches,
1845 const std::vector<std::string> & data_names,
1847 std::tuple<
unsigned int,
1851 & nonscalar_data_ranges,
1852 const GnuplotFlags &flags,
1853 std::ostream & out);
1900 template <
int dim,
int spacedim>
1903 const std::vector<Patch<dim, spacedim>> &patches,
1904 const std::vector<std::string> & data_names,
1906 std::tuple<
unsigned int,
1910 & nonscalar_data_ranges,
1911 const PovrayFlags &flags,
1912 std::ostream & out);
1920 template <
int dim,
int spacedim>
1923 const std::vector<Patch<dim, spacedim>> &patches,
1924 const std::vector<std::string> & data_names,
1926 std::tuple<
unsigned int,
1930 & nonscalar_data_ranges,
1931 const TecplotFlags &flags,
1932 std::ostream & out);
1948 template <
int dim,
int spacedim>
1951 const std::vector<Patch<dim, spacedim>> &patches,
1952 const std::vector<std::string> & data_names,
1954 std::tuple<
unsigned int,
1958 & nonscalar_data_ranges,
1959 const UcdFlags &flags,
1960 std::ostream & out);
1981 template <
int dim,
int spacedim>
1984 const std::vector<Patch<dim, spacedim>> &patches,
1985 const std::vector<std::string> & data_names,
1987 std::tuple<
unsigned int,
1991 & nonscalar_data_ranges,
1992 const VtkFlags &flags,
1993 std::ostream & out);
2019 template <
int dim,
int spacedim>
2022 const std::vector<Patch<dim, spacedim>> &patches,
2023 const std::vector<std::string> & data_names,
2025 std::tuple<
unsigned int,
2029 & nonscalar_data_ranges,
2030 const VtkFlags &flags,
2031 std::ostream & out);
2056 template <
int dim,
int spacedim>
2059 const std::vector<Patch<dim, spacedim>> &patches,
2060 const std::vector<std::string> & data_names,
2062 std::tuple<
unsigned int,
2066 & nonscalar_data_ranges,
2067 const VtkFlags &flags,
2068 std::ostream & out);
2114 const std::vector<std::string> &piece_names,
2115 const std::vector<std::string> &data_names,
2117 std::tuple<
unsigned int,
2121 & nonscalar_data_ranges,
2122 const VtkFlags &flags);
2175 const std::vector<std::pair<double, std::string>> ×_and_names);
2190 const std::vector<std::string> &piece_names);
2221 const std::vector<std::vector<std::string>> &piece_names);
2258 const std::vector<std::pair<
double, std::vector<std::string>>>
2259 ×_and_piece_names);
2281 template <
int spacedim>
2284 const std::vector<Patch<2, spacedim>> &patches,
2285 const std::vector<std::string> & data_names,
2287 std::tuple<
unsigned int,
2291 & nonscalar_data_ranges,
2292 const SvgFlags &flags,
2293 std::ostream & out);
2332 template <
int dim,
int spacedim>
2335 const std::vector<Patch<dim, spacedim>> &patches,
2336 const std::vector<std::string> & data_names,
2338 std::tuple<
unsigned int,
2342 & nonscalar_data_ranges,
2343 const Deal_II_IntermediateFlags &flags,
2344 std::ostream & out);
2350 template <
int dim,
int spacedim>
2353 const DataOutFilter & data_filter,
2354 const std::string & filename,
2364 template <
int dim,
int spacedim>
2367 const DataOutFilter & data_filter,
2368 const bool write_mesh_file,
2369 const std::string & mesh_filename,
2370 const std::string &solution_filename,
2379 template <
int dim,
int spacedim>
2382 const std::vector<Patch<dim, spacedim>> &patches,
2383 const std::vector<std::string> & data_names,
2385 std::tuple<
unsigned int,
2389 & nonscalar_data_ranges,
2390 DataOutFilter &filtered_data);
2403 std::pair<unsigned int, unsigned int>
2462 <<
"The number of points in this data set is " << arg1
2463 <<
", but we expected " << arg2
2464 <<
" in each space direction.");
2469 "You are trying to write graphical data into a file, but "
2470 "no data is available in the intermediate format that "
2471 "the DataOutBase functions require. Did you forget to "
2472 "call a function such as DataOut::build_patches()?");
2477 "The error code of one of the Tecplot functions was "
2478 "not zero as expected.");
2484 <<
"There was an error opening Tecplot file " << arg1
2598template <
int dim,
int spacedim = dim>
2740 const std::vector<std::string> &piece_names)
const;
2802 const std::string &directory,
2803 const std::string &filename_without_extension,
2804 const unsigned int counter,
2807 const unsigned int n_groups = 0)
const;
2836 const std::string & h5_filename,
2837 const double cur_time,
2847 const std::string & h5_mesh_filename,
2848 const std::string & h5_solution_filename,
2849 const double cur_time,
2878 const std::string & filename,
2897 const std::string & filename,
2909 const bool write_mesh_file,
2910 const std::string & mesh_filename,
2911 const std::string & solution_filename,
2933 write(std::ostream & out,
2949 template <
typename FlagType>
3008 virtual const std::vector<DataOutBase::Patch<dim, spacedim>> &
3015 virtual std::vector<std::string>
3036 virtual std::vector<
3037 std::tuple<
unsigned int,
3176template <
int dim,
int spacedim = dim>
3186 read(std::istream &in);
3216 "You are trying to merge two sets of patches for which the "
3217 "declared names of the variables do not match.");
3222 "You are trying to merge two sets of patches for which the "
3223 "number of subdivisions or the number of vector components "
3233 <<
"Either the dimensions <" << arg1 <<
"> and <" << arg2
3234 <<
"> or the space dimensions <" << arg3 <<
"> and <" << arg4
3235 <<
"> do not match!");
3246 virtual const std::vector<::DataOutBase::Patch<dim, spacedim>> &
3255 virtual std::vector<std::string>
3276 virtual std::vector<
3277 std::tuple<
unsigned int,
3288 std::vector<::DataOutBase::Patch<dim, spacedim>>
patches;
3296 std::tuple<
unsigned int,
3327 const std::uint64_t nodes,
3328 const std::uint64_t cells,
3329 const unsigned int dim);
3335 XDMFEntry(
const std::string & mesh_filename,
3336 const std::string & solution_filename,
3338 const std::uint64_t nodes,
3339 const std::uint64_t cells,
3340 const unsigned int dim);
3345 XDMFEntry(
const std::string & mesh_filename,
3346 const std::string & solution_filename,
3348 const std::uint64_t nodes,
3349 const std::uint64_t cells,
3350 const unsigned int dim,
3351 const unsigned int spacedim);
3364 template <
class Archive>
3460 template <
int dim,
int spacedim>
3472 template <
int dim,
int spacedim>
#define DEAL_II_DEPRECATED
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
std::size_t memory_consumption() const
static void declare_parameters(ParameterHandler &prm)
virtual std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > get_nonscalar_data_ranges() const
const double * get_data_set(const unsigned int set_num) const
unsigned int default_subdivisions
std::size_t memory_consumption() const
static void declare_parameters(ParameterHandler &prm)
std::string write_vtu_with_pvtu_record(const std::string &directory, const std::string &filename_without_extension, const unsigned int counter, const MPI_Comm &mpi_communicator, const unsigned int n_digits_for_counter=numbers::invalid_unsigned_int, const unsigned int n_groups=0) const
static void declare_parameters(ParameterHandler &prm)
void parse_parameters(ParameterHandler &prm)
DataOutBase::Deal_II_IntermediateFlags deal_II_intermediate_flags
static RgbValues default_color_function(const double value, const double min_value, const double max_value)
std::map< unsigned int, unsigned int > filtered_points
void write_filtered_data(DataOutBase::DataOutFilter &filtered_data) const
std::ostream & operator<<(std::ostream &out, const Patch< dim, spacedim > &patch)
std::vector< std::string > space_dimension_labels
void write_pvtu_record(std::ostream &out, const std::vector< std::string > &piece_names) const
static void declare_parameters(ParameterHandler &prm)
virtual std::vector< std::string > get_dataset_names() const =0
std::size_t memory_consumption() const
void write_hdf5_parallel(const DataOutBase::DataOutFilter &data_filter, const std::string &filename, const MPI_Comm &comm) const
DataOutBase::TecplotFlags tecplot_flags
void parse_parameters(const ParameterHandler &prm)
ColorFunction color_function
std::string get_data_set_name(const unsigned int set_num) const
void write_ucd(std::ostream &out) const
static ::ExceptionBase & ExcIncompatiblePatchLists()
void merge(const DataOutReader< dim, spacedim > &other)
ReferenceCell reference_cell
void write_povray(std::ostream &out) const
RgbValues(*)(const double value, const double min_value, const double max_value) ColorFunction
std::string default_suffix(const DataOutBase::OutputFormat output_format=DataOutBase::default_format) const
static RgbValues grey_scale_color_function(const double value, const double min_value, const double max_value)
std::multimap< Point< 3 >, unsigned int, Point3Comp > Map3DPoint
void internal_add_cell(const unsigned int cell_index, const unsigned int pt_index)
#define DeclException4(Exception4, type1, type2, type3, type4, outsequence)
static void declare_parameters(ParameterHandler &prm)
void write_cell(const unsigned int index, const unsigned int start, const unsigned int d1, const unsigned int d2, const unsigned int d3)
ZlibCompressionLevel compression_level
static ::ExceptionBase & ExcNotEnoughSpaceDimensionLabels()
bool operator()(const Point< 3 > &one, const Point< 3 > &two) const
XDMFEntry create_xdmf_entry(const DataOutBase::DataOutFilter &data_filter, const std::string &h5_filename, const double cur_time, const MPI_Comm &comm) const
static const unsigned int format_version
static const unsigned int no_neighbor
std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > nonscalar_data_ranges
std::size_t memory_consumption() const
void write_vtu_in_parallel(const std::string &filename, const MPI_Comm &comm) const
virtual const std::vector<::DataOutBase::Patch< dim, spacedim > > & get_patches() const override
unsigned int height_vector
DataOutBase::GmvFlags gmv_flags
void parse_parameters(const ParameterHandler &prm)
std::vector< unsigned int > data_set_dims
std::size_t memory_consumption() const
void set_default_format(const DataOutBase::OutputFormat default_format)
unsigned int n_nodes() const
std::map< std::string, std::string > physical_units
void parse_parameters(const ParameterHandler &prm)
unsigned int color_vector
Point< spacedim > vertices[GeometryInfo< dim >::vertices_per_cell]
DataOutBase::PovrayFlags povray_flags
DataOutBase::UcdFlags ucd_flags
void write(std::ostream &out, const DataOutBase::OutputFormat output_format=DataOutBase::default_format) const
static void declare_parameters(ParameterHandler &prm)
void fill_node_data(std::vector< double > &node_data) const
std::vector< std::vector< double > > data_sets
bool operator==(const Patch &patch) const
std::string h5_sol_filename
static const unsigned int n_subdivisions
DataOutBase::OutputFormat default_fmt
DataOutBase::GnuplotFlags gnuplot_flags
unsigned int get_data_set_dim(const unsigned int set_num) const
void write_gnuplot(std::ostream &out) const
virtual ~DataOutInterface()=default
static ::ExceptionBase & ExcInvalidCombinationOfDimensions(int arg1, int arg2)
static ::ExceptionBase & ExcNoPatches()
static ::ExceptionBase & ExcTecplotAPIError()
void read(std::istream &in)
#define DeclException2(Exception2, type1, type2, outsequence)
void serialize(Archive &ar, const unsigned int)
static RgbValues reverse_grey_scale_color_function(const double value, const double min_value, const double max_value)
void write_vtu(std::ostream &out) const
static const unsigned int space_dim
void write_tecplot(std::ostream &out) const
static const ReferenceCell reference_cell
void write_data_set(const std::string &name, const unsigned int dimension, const unsigned int set_num, const Table< 2, double > &data_vectors)
void parse_parameters(const ParameterHandler &prm)
std::string h5_mesh_filename
void parse_parameters(const ParameterHandler &prm)
static ::ExceptionBase & ExcIncompatibleDimensions(int arg1, int arg2, int arg3, int arg4)
std::string get_xdmf_content(const unsigned int indent_level) const
bool write_higher_order_cells
std::map< unsigned int, unsigned int > filtered_cells
bool points_are_available
void add_attribute(const std::string &attr_name, const unsigned int dimension)
virtual std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > get_nonscalar_data_ranges() const override
std::map< std::string, unsigned int > attribute_dims
#define DeclExceptionMsg(Exception, defaulttext)
virtual std::vector< std::string > get_dataset_names() const override
void write_svg(std::ostream &out) const
void write_cell_single(const unsigned int index, const unsigned int start, const unsigned int n_points, const ReferenceCell &reference_cell)
unsigned int height_vector
DataOutBase::SvgFlags svg_flags
unsigned int n_subdivisions
void write_xdmf_file(const std::vector< XDMFEntry > &entries, const std::string &filename, const MPI_Comm &comm) const
void validate_dataset_names() const
std::vector< std::string > dataset_names
void set_flags(const FlagType &flags)
std::vector< std::string > data_set_names
void write_vtk(std::ostream &out) const
static ::ExceptionBase & ExcIncompatibleDatasetNames()
unsigned int line_thickness
#define DeclException1(Exception1, type1, outsequence)
std::vector<::DataOutBase::Patch< dim, spacedim > > patches
void swap(Patch< dim, spacedim > &other_patch)
void fill_cell_data(const unsigned int local_node_offset, std::vector< unsigned int > &cell_data) const
bool filter_duplicate_vertices
std::istream & operator>>(std::istream &in, Patch< dim, spacedim > &patch)
virtual const std::vector< DataOutBase::Patch< dim, spacedim > > & get_patches() const =0
static ::ExceptionBase & ExcInvalidDatasetSize(int arg1, int arg2)
void write_point(const unsigned int index, const Point< dim > &p)
bool points_are_available
static ::ExceptionBase & ExcErrorOpeningTecplotFile(char *arg1)
std::size_t memory_consumption() const
void parse_parameters(const ParameterHandler &prm)
DataOutBase::VtkFlags vtk_flags
std::array< unsigned int, GeometryInfo< dim >::faces_per_cell > neighbors
void write_gmv(std::ostream &out) const
DataOutBase::EpsFlags eps_flags
void write_eps(std::ostream &out) const
DataOutBase::DXFlags dx_flags
unsigned int n_cells() const
unsigned int space_dimension
static void declare_parameters(ParameterHandler &prm)
DataOutBase::DataOutFilterFlags flags
Map3DPoint existing_points
void write_dx(std::ostream &out) const
unsigned int n_data_sets() const
void write_deal_II_intermediate(std::ostream &out) const
@ width
Scale to given width.
@ height
Scale to given height.
DataComponentInterpretation
void write_eps(const std::vector< Patch< 2, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > &nonscalar_data_ranges, const EpsFlags &flags, std::ostream &out)
std::pair< unsigned int, unsigned int > determine_intermediate_format_dimensions(std::istream &input)
void write_hdf5_parallel(const std::vector< Patch< dim, spacedim > > &patches, const DataOutFilter &data_filter, const std::string &filename, const MPI_Comm &comm)
void write_ucd(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > &nonscalar_data_ranges, const UcdFlags &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::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > &nonscalar_data_ranges, const DXFlags &flags, std::ostream &out)
void write_vtu_header(std::ostream &out, const VtkFlags &flags)
void write_vtu(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > &nonscalar_data_ranges, const VtkFlags &flags, std::ostream &out)
void write_gmv(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > &nonscalar_data_ranges, const GmvFlags &flags, std::ostream &out)
void write_vtu_main(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > &nonscalar_data_ranges, const VtkFlags &flags, std::ostream &out)
void write_pvd_record(std::ostream &out, const std::vector< std::pair< double, std::string > > ×_and_names)
void write_deal_II_intermediate(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > &nonscalar_data_ranges, const Deal_II_IntermediateFlags &flags, std::ostream &out)
void write_vtu_footer(std::ostream &out)
void write_tecplot(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > &nonscalar_data_ranges, const TecplotFlags &flags, std::ostream &out)
void write_filtered_data(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > &nonscalar_data_ranges, DataOutFilter &filtered_data)
OutputFormat parse_output_format(const std::string &format_name)
std::string get_output_format_names()
void write_svg(const std::vector< Patch< 2, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > &nonscalar_data_ranges, const SvgFlags &flags, std::ostream &out)
void write_visit_record(std::ostream &out, const std::vector< std::string > &piece_names)
std::string default_suffix(const OutputFormat output_format)
void write_povray(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > &nonscalar_data_ranges, const PovrayFlags &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::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > &nonscalar_data_ranges, const GnuplotFlags &flags, std::ostream &out)
void write_vtk(const std::vector< Patch< dim, spacedim > > &patches, const std::vector< std::string > &data_names, const std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > &nonscalar_data_ranges, const VtkFlags &flags, std::ostream &out)
void write_pvtu_record(std::ostream &out, const std::vector< std::string > &piece_names, const std::vector< std::string > &data_names, const std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > &nonscalar_data_ranges, const VtkFlags &flags)
static const unsigned int invalid_unsigned_int