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>
523 <<
"It is not possible to have a structural dimension of " << arg1
524 <<
" to be larger than the space dimension of the surrounding"
525 <<
" space " << arg2);
541 template <
typename FlagsType>
575 template <
typename FlagsType>
581 template <
typename FlagsType>
587 template <
typename FlagsType>
591 return sizeof(FlagsType);
740 "There should be at least one space dimension per spatial "
741 "dimension (extras are ignored).");
958 const double min_value,
959 const double max_value);
979 const double min_value,
980 const double max_value);
989 const double min_value,
990 const double max_value);
1000 const double min_value,
1001 const double max_value);
1009 const unsigned int size = 300,
1234 const bool margin =
true,
1360 const unsigned int start,
1361 const unsigned int d1,
1362 const unsigned int d2,
1363 const unsigned int d3);
1371 const unsigned int start,
1372 const unsigned int n_points);
1382 const unsigned int dimension,
1383 const unsigned int set_num,
1399 std::vector<unsigned int> &cell_data)
const;
1477 return (
one(0) < two(0) ||
1478 (!(two(0) <
one(0)) &&
1479 (
one(1) < two(1) || (!(two(1) <
one(1)) &&
one(2) < two(2)))));
1538 const unsigned int pt_index);
1630 template <
int dim,
int spacedim>
1633 const std::vector<Patch<dim, spacedim>> &patches,
1634 const std::vector<std::string> & data_names,
1636 std::tuple<
unsigned int,
1640 & nonscalar_data_ranges,
1641 const DXFlags &flags,
1642 std::ostream & out);
1688 template <
int spacedim>
1691 const std::vector<Patch<2, spacedim>> &patches,
1692 const std::vector<std::string> & data_names,
1694 std::tuple<
unsigned int,
1698 & nonscalar_data_ranges,
1699 const EpsFlags &flags,
1700 std::ostream & out);
1707 template <
int dim,
int spacedim>
1710 const std::vector<Patch<dim, spacedim>> &patches,
1711 const std::vector<std::string> & data_names,
1713 std::tuple<
unsigned int,
1717 & nonscalar_data_ranges,
1718 const EpsFlags &flags,
1719 std::ostream & out);
1731 template <
int dim,
int spacedim>
1734 const std::vector<Patch<dim, spacedim>> &patches,
1735 const std::vector<std::string> & data_names,
1737 std::tuple<
unsigned int,
1741 & nonscalar_data_ranges,
1742 const GmvFlags &flags,
1743 std::ostream & out);
1800 template <
int dim,
int spacedim>
1803 const std::vector<Patch<dim, spacedim>> &patches,
1804 const std::vector<std::string> & data_names,
1806 std::tuple<
unsigned int,
1810 & nonscalar_data_ranges,
1811 const GnuplotFlags &flags,
1812 std::ostream & out);
1859 template <
int dim,
int spacedim>
1862 const std::vector<Patch<dim, spacedim>> &patches,
1863 const std::vector<std::string> & data_names,
1865 std::tuple<
unsigned int,
1869 & nonscalar_data_ranges,
1870 const PovrayFlags &flags,
1871 std::ostream & out);
1879 template <
int dim,
int spacedim>
1882 const std::vector<Patch<dim, spacedim>> &patches,
1883 const std::vector<std::string> & data_names,
1885 std::tuple<
unsigned int,
1889 & nonscalar_data_ranges,
1890 const TecplotFlags &flags,
1891 std::ostream & out);
1907 template <
int dim,
int spacedim>
1910 const std::vector<Patch<dim, spacedim>> &patches,
1911 const std::vector<std::string> & data_names,
1913 std::tuple<
unsigned int,
1917 & nonscalar_data_ranges,
1918 const UcdFlags &flags,
1919 std::ostream & out);
1940 template <
int dim,
int spacedim>
1943 const std::vector<Patch<dim, spacedim>> &patches,
1944 const std::vector<std::string> & data_names,
1946 std::tuple<
unsigned int,
1950 & nonscalar_data_ranges,
1951 const VtkFlags &flags,
1952 std::ostream & out);
1978 template <
int dim,
int spacedim>
1981 const std::vector<Patch<dim, spacedim>> &patches,
1982 const std::vector<std::string> & data_names,
1984 std::tuple<
unsigned int,
1988 & nonscalar_data_ranges,
1989 const VtkFlags &flags,
1990 std::ostream & out);
2015 template <
int dim,
int spacedim>
2018 const std::vector<Patch<dim, spacedim>> &patches,
2019 const std::vector<std::string> & data_names,
2021 std::tuple<
unsigned int,
2025 & nonscalar_data_ranges,
2026 const VtkFlags &flags,
2027 std::ostream & out);
2073 const std::vector<std::string> &piece_names,
2074 const std::vector<std::string> &data_names,
2076 std::tuple<
unsigned int,
2080 &nonscalar_data_ranges);
2133 const std::vector<std::pair<double, std::string>> ×_and_names);
2148 const std::vector<std::string> &piece_names);
2179 const std::vector<std::vector<std::string>> &piece_names);
2216 const std::vector<std::pair<
double, std::vector<std::string>>>
2217 ×_and_piece_names);
2239 template <
int spacedim>
2242 const std::vector<Patch<2, spacedim>> &patches,
2243 const std::vector<std::string> & data_names,
2245 std::tuple<
unsigned int,
2249 & nonscalar_data_ranges,
2250 const SvgFlags &flags,
2251 std::ostream & out);
2290 template <
int dim,
int spacedim>
2293 const std::vector<Patch<dim, spacedim>> &patches,
2294 const std::vector<std::string> & data_names,
2296 std::tuple<
unsigned int,
2300 & nonscalar_data_ranges,
2301 const Deal_II_IntermediateFlags &flags,
2302 std::ostream & out);
2308 template <
int dim,
int spacedim>
2311 const DataOutFilter & data_filter,
2312 const std::string & filename,
2322 template <
int dim,
int spacedim>
2325 const DataOutFilter & data_filter,
2326 const bool write_mesh_file,
2327 const std::string & mesh_filename,
2328 const std::string &solution_filename,
2337 template <
int dim,
int spacedim>
2340 const std::vector<Patch<dim, spacedim>> &patches,
2341 const std::vector<std::string> & data_names,
2343 std::tuple<
unsigned int,
2347 & nonscalar_data_ranges,
2348 DataOutFilter &filtered_data);
2361 std::pair<unsigned int, unsigned int>
2420 <<
"The number of points in this data set is " << arg1
2421 <<
", but we expected " << arg2
2422 <<
" in each space direction.");
2427 "You are trying to write graphical data into a file, but "
2428 "no data is available in the intermediate format that "
2429 "the DataOutBase functions require. Did you forget to "
2430 "call a function such as DataOut::build_patches()?");
2435 "The error code of one of the Tecplot functions was "
2436 "not zero as expected.");
2442 <<
"There was an error opening Tecplot file " << arg1
2556template <
int dim,
int spacedim = dim>
2698 const std::vector<std::string> &piece_names)
const;
2760 const std::string &directory,
2761 const std::string &filename_without_extension,
2762 const unsigned int counter,
2765 const unsigned int n_groups = 0)
const;
2794 const std::string & h5_filename,
2795 const double cur_time,
2805 const std::string & h5_mesh_filename,
2806 const std::string & h5_solution_filename,
2807 const double cur_time,
2836 const std::string & filename,
2855 const std::string & filename,
2867 const bool write_mesh_file,
2868 const std::string & mesh_filename,
2869 const std::string & solution_filename,
2891 write(std::ostream & out,
2907 template <
typename FlagType>
2966 virtual const std::vector<DataOutBase::Patch<dim, spacedim>> &
2973 virtual std::vector<std::string>
2994 virtual std::vector<
2995 std::tuple<
unsigned int,
3134template <
int dim,
int spacedim = dim>
3144 read(std::istream &in);
3174 "You are trying to merge two sets of patches for which the "
3175 "declared names of the variables do not match.");
3180 "You are trying to merge two sets of patches for which the "
3181 "number of subdivisions or the number of vector components "
3191 <<
"Either the dimensions <" << arg1 <<
"> and <" << arg2
3192 <<
"> or the space dimensions <" << arg3 <<
"> and <" << arg4
3193 <<
"> do not match!");
3204 virtual const std::vector<::DataOutBase::Patch<dim, spacedim>> &
3213 virtual std::vector<std::string>
3234 virtual std::vector<
3235 std::tuple<
unsigned int,
3246 std::vector<::DataOutBase::Patch<dim, spacedim>>
patches;
3254 std::tuple<
unsigned int,
3285 const unsigned int nodes,
3286 const unsigned int cells,
3287 const unsigned int dim);
3293 XDMFEntry(
const std::string &mesh_filename,
3294 const std::string &solution_filename,
3296 const unsigned int nodes,
3297 const unsigned int cells,
3298 const unsigned int dim);
3303 XDMFEntry(
const std::string &mesh_filename,
3304 const std::string &solution_filename,
3306 const unsigned int nodes,
3307 const unsigned int cells,
3308 const unsigned int dim,
3309 const unsigned int spacedim);
3322 template <
class Archive>
3418 template <
int dim,
int spacedim>
3430 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
PovrayFlags(const bool smooth=false, const bool bicubic_patch=false, const bool external_data=false)
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 write_cell_single(const unsigned int index, const unsigned int start, const unsigned int n_points)
EpsFlags(const unsigned int height_vector=0, const unsigned int color_vector=0, const SizeType size_type=width, const unsigned int size=300, const double line_width=0.5, const double azimut_angle=60, const double turn_angle=30, const double z_scaling=1.0, const bool draw_mesh=true, const bool draw_cells=true, const bool shade_cells=true, const ColorFunction color_function=&default_color_function)
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
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
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)
SvgFlags(const unsigned int height_vector=0, const int azimuth_angle=37, const int polar_angle=45, const unsigned int line_thickness=1, const bool margin=true, const bool draw_colorbar=true)
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
TecplotFlags(const char *zone_name=nullptr, const double solution_time=-1.0)
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)
static unsigned int n_subdivisions
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
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)
DataOutFilterFlags(const bool filter_duplicate_vertices=false, const bool xdmf_hdf5_output=false)
void write_point(const unsigned int index, const Point< dim > &p)
bool points_are_available
UcdFlags(const bool write_preamble=false)
static ::ExceptionBase & ExcErrorOpeningTecplotFile(char *arg1)
std::size_t memory_consumption() const
ReferenceCell reference_cell
void parse_parameters(const ParameterHandler &prm)
DXFlags(const bool write_neighbors=false, const bool int_binary=false, const bool coordinates_binary=false, const bool data_binary=false)
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
VtkFlags(const double time=std::numeric_limits< double >::min(), const unsigned int cycle=std::numeric_limits< unsigned int >::min(), const bool print_date_and_time=true, const ZlibCompressionLevel compression_level=best_compression, const bool write_higher_order_cells=false)
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)
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)
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 reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell &reference_cell)
static const types::blas_int one
static const unsigned int invalid_unsigned_int
*braid_SplitCommworld & comm