15#ifndef dealii_data_out_base_h
16#define dealii_data_out_base_h
31#include <boost/serialization/map.hpp>
254 template <
int dim,
int spacedim = dim>
291 std::array<unsigned int, GeometryInfo<dim>::faces_per_cell>
neighbors;
393 <<
"It is not possible to have a structural dimension of " << arg1
394 <<
" to be larger than the space dimension of the surrounding"
395 <<
" space " << arg2);
416 template <
int spacedim>
545 <<
"It is not possible to have a structural dimension of " << arg1
546 <<
" to be larger than the space dimension of the surrounding"
547 <<
" space " << arg2);
563 template <
typename FlagsType>
597 template <
typename FlagsType>
603 template <
typename FlagsType>
609 template <
typename FlagsType>
613 return sizeof(FlagsType);
762 "There should be at least one space dimension per spatial "
763 "dimension (extras are ignored).");
980 const double min_value,
981 const double max_value);
1001 const double min_value,
1002 const double max_value);
1011 const double min_value,
1012 const double max_value);
1022 const double min_value,
1023 const double max_value);
1031 const unsigned int size = 300,
1213 const double time = std::numeric_limits<double>::min(),
1214 const unsigned int cycle = std::numeric_limits<unsigned int>::min(),
1272 const bool margin =
true,
1409 const unsigned int start,
1410 const std::array<unsigned int, dim> &offsets);
1418 const unsigned int start,
1419 const unsigned int n_points,
1430 const unsigned int dimension,
1431 const unsigned int set_num,
1447 std::vector<unsigned int> &cell_data)
const;
1525 return (one[0] < two[0] ||
1526 (!(two[0] < one[0]) &&
1527 (one[1] < two[1] || (!(two[1] < one[1]) && one[2] < two[2]))));
1587 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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
2354 template <
int dim,
int spacedim>
2357 const std::vector<Patch<dim, spacedim>> &patches,
2358 const std::vector<std::string> &data_names,
2360 std::tuple<
unsigned int,
2364 &nonscalar_data_ranges,
2365 const Deal_II_IntermediateFlags &flags,
2366 const std::string &filename,
2374 template <
int dim,
int spacedim>
2377 const DataOutFilter &data_filter,
2379 const std::string &filename,
2389 template <
int dim,
int spacedim>
2392 const DataOutFilter &data_filter,
2394 const bool write_mesh_file,
2395 const std::string &mesh_filename,
2396 const std::string &solution_filename,
2405 template <
int dim,
int spacedim>
2408 const std::vector<Patch<dim, spacedim>> &patches,
2409 const std::vector<std::string> &data_names,
2411 std::tuple<
unsigned int,
2415 &nonscalar_data_ranges,
2416 DataOutFilter &filtered_data);
2429 std::pair<unsigned int, unsigned int>
2487 <<
"The number of points in this data set is " << arg1
2488 <<
", but we expected " << arg2
2489 <<
" in each space direction.");
2494 "You are trying to write graphical data into a file, but "
2495 "no data is available in the intermediate format that "
2496 "the DataOutBase functions require. Did you forget to "
2497 "call a function such as DataOut::build_patches()?");
2502 "The error code of one of the Tecplot functions was "
2503 "not zero as expected.");
2509 <<
"There was an error opening Tecplot file " << arg1
2623template <
int dim,
int spacedim = dim>
2766 const std::vector<std::string> &piece_names)
const;
2831 const std::string &directory,
2832 const std::string &filename_without_extension,
2833 const unsigned int counter,
2836 const unsigned int n_groups = 0)
const;
2866 const std::string &filename,
2877 const std::string &h5_filename,
2878 const double cur_time,
2888 const std::string &h5_mesh_filename,
2889 const std::string &h5_solution_filename,
2890 const double cur_time,
2919 const std::string &filename,
2938 const std::string &filename,
2950 const bool write_mesh_file,
2951 const std::string &mesh_filename,
2952 const std::string &solution_filename,
2974 write(std::ostream &out,
2990 template <
typename FlagType>
3049 virtual const std::vector<DataOutBase::Patch<dim, spacedim>> &
3056 virtual std::vector<std::string>
3077 virtual std::vector<
3078 std::tuple<
unsigned int,
3223template <
int dim,
int spacedim = dim>
3233 read(std::istream &in);
3271 "You are trying to merge two sets of patches for which the "
3272 "declared names of the variables do not match.");
3277 "You are trying to merge two sets of patches for which the "
3278 "number of subdivisions or the number of vector components "
3288 <<
"Either the dimensions <" << arg1 <<
"> and <" << arg2
3289 <<
"> or the space dimensions <" << arg3 <<
"> and <" << arg4
3290 <<
"> do not match!");
3301 virtual const std::vector<::DataOutBase::Patch<dim, spacedim>> &
3310 virtual std::vector<std::string>
3331 virtual std::vector<
3332 std::tuple<
unsigned int,
3343 std::vector<::DataOutBase::Patch<dim, spacedim>>
patches;
3351 std::tuple<
unsigned int,
3382 const std::uint64_t nodes,
3383 const std::uint64_t cells,
3384 const unsigned int dim,
3391 XDMFEntry(
const std::string &mesh_filename,
3392 const std::string &solution_filename,
3394 const std::uint64_t nodes,
3395 const std::uint64_t cells,
3396 const unsigned int dim,
3402 XDMFEntry(
const std::string &mesh_filename,
3403 const std::string &solution_filename,
3405 const std::uint64_t nodes,
3406 const std::uint64_t cells,
3407 const unsigned int dim,
3408 const unsigned int spacedim,
3422 template <
class Archive>
3512 template <
int dim,
int spacedim>
3524 template <
int dim,
int spacedim>
const double * get_data_set(const unsigned int set_num) const
std::map< unsigned int, unsigned int > filtered_points
std::string get_data_set_name(const unsigned int set_num) const
std::multimap< Point< 3 >, unsigned int, Point3Comp > Map3DPoint
void internal_add_cell(const unsigned int cell_index, const unsigned int pt_index)
void write_cell(const unsigned int index, const unsigned int start, const std::array< unsigned int, dim > &offsets)
std::vector< unsigned int > data_set_dims
unsigned int n_nodes() const
void fill_node_data(std::vector< double > &node_data) const
std::vector< std::vector< double > > data_sets
unsigned int get_data_set_dim(const unsigned int set_num) const
void write_data_set(const std::string &name, const unsigned int dimension, const unsigned int set_num, const Table< 2, double > &data_vectors)
std::map< unsigned int, unsigned int > filtered_cells
void write_cell_single(const unsigned int index, const unsigned int start, const unsigned int n_points, const ReferenceCell &reference_cell)
std::vector< std::string > data_set_names
void fill_cell_data(const unsigned int local_node_offset, std::vector< unsigned int > &cell_data) const
void write_point(const unsigned int index, const Point< dim > &p)
unsigned int n_cells() const
DataOutBase::DataOutFilterFlags flags
Map3DPoint existing_points
unsigned int n_data_sets() const
XDMFEntry create_xdmf_entry(const DataOutBase::DataOutFilter &data_filter, const std::string &h5_filename, const double cur_time, const MPI_Comm comm) const
virtual std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > get_nonscalar_data_ranges() const
unsigned int default_subdivisions
void parse_parameters(ParameterHandler &prm)
DataOutBase::Deal_II_IntermediateFlags deal_II_intermediate_flags
void write_filtered_data(DataOutBase::DataOutFilter &filtered_data) const
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
DataOutBase::TecplotFlags tecplot_flags
void write_ucd(std::ostream &out) const
void write_povray(std::ostream &out) const
std::string default_suffix(const DataOutBase::OutputFormat output_format=DataOutBase::default_format) const
void write_xdmf_file(const std::vector< XDMFEntry > &entries, const std::string &filename, const MPI_Comm comm) const
DataOutBase::GmvFlags gmv_flags
std::size_t memory_consumption() const
void set_default_format(const DataOutBase::OutputFormat default_format)
DataOutBase::Hdf5Flags hdf5_flags
DataOutBase::PovrayFlags povray_flags
DataOutBase::UcdFlags ucd_flags
void write(std::ostream &out, const DataOutBase::OutputFormat output_format=DataOutBase::default_format) const
DataOutBase::OutputFormat default_fmt
DataOutBase::GnuplotFlags gnuplot_flags
void write_gnuplot(std::ostream &out) const
virtual ~DataOutInterface()=default
void write_vtu(std::ostream &out) const
void write_hdf5_parallel(const DataOutBase::DataOutFilter &data_filter, const std::string &filename, const MPI_Comm comm) const
void write_tecplot(std::ostream &out) const
void write_deal_II_intermediate_in_parallel(const std::string &filename, const MPI_Comm comm, const DataOutBase::CompressionLevel compression) const
void write_svg(std::ostream &out) const
void write_vtu_in_parallel(const std::string &filename, const MPI_Comm comm) const
DataOutBase::SvgFlags svg_flags
void validate_dataset_names() const
void set_flags(const FlagType &flags)
void write_vtk(std::ostream &out) const
virtual const std::vector< DataOutBase::Patch< dim, spacedim > > & get_patches() const =0
DataOutBase::VtkFlags vtk_flags
void write_gmv(std::ostream &out) const
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
DataOutBase::EpsFlags eps_flags
void write_eps(std::ostream &out) const
DataOutBase::DXFlags dx_flags
void write_dx(std::ostream &out) const
void write_deal_II_intermediate(std::ostream &out) const
void merge(const DataOutReader< dim, spacedim > &other)
void read_whole_parallel_file(std::istream &in)
std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > nonscalar_data_ranges
virtual const std::vector<::DataOutBase::Patch< dim, spacedim > > & get_patches() const override
void read(std::istream &in)
virtual std::vector< std::tuple< unsigned int, unsigned int, std::string, DataComponentInterpretation::DataComponentInterpretation > > get_nonscalar_data_ranges() const override
virtual std::vector< std::string > get_dataset_names() const override
std::vector< std::string > dataset_names
std::vector<::DataOutBase::Patch< dim, spacedim > > patches
std::string h5_sol_filename
void serialize(Archive &ar, const unsigned int)
std::string h5_mesh_filename
std::string get_xdmf_content(const unsigned int indent_level) const
void add_attribute(const std::string &attr_name, const unsigned int dimension)
std::map< std::string, unsigned int > attribute_dims
unsigned int space_dimension
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcIncompatiblePatchLists()
#define DeclException4(Exception4, type1, type2, type3, type4, outsequence)
static ::ExceptionBase & ExcNotEnoughSpaceDimensionLabels()
static ::ExceptionBase & ExcInvalidCombinationOfDimensions(int arg1, int arg2)
static ::ExceptionBase & ExcNoPatches()
static ::ExceptionBase & ExcTecplotAPIError()
#define DeclException2(Exception2, type1, type2, outsequence)
static ::ExceptionBase & ExcIncompatibleDimensions(int arg1, int arg2, int arg3, int arg4)
#define DeclExceptionMsg(Exception, defaulttext)
static ::ExceptionBase & ExcIncompatibleDatasetNames()
#define DeclException1(Exception1, type1, outsequence)
static ::ExceptionBase & ExcInvalidDatasetSize(int arg1, int arg2)
static ::ExceptionBase & ExcErrorOpeningTecplotFile(char *arg1)
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)
std::ostream & operator<<(std::ostream &out, const Patch< dim, spacedim > &patch)
void write_deal_II_intermediate_in_parallel(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, const std::string &filename, const MPI_Comm comm, const CompressionLevel compression)
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_hdf5_parallel(const std::vector< Patch< dim, spacedim > > &patches, const DataOutFilter &data_filter, const DataOutBase::Hdf5Flags &flags, const std::string &filename, const MPI_Comm comm)
std::istream & operator>>(std::istream &in, Patch< dim, spacedim > &patch)
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
void parse_parameters(const ParameterHandler &prm)
static void declare_parameters(ParameterHandler &prm)
static void declare_parameters(ParameterHandler &prm)
std::size_t memory_consumption() const
void parse_parameters(const ParameterHandler &prm)
bool filter_duplicate_vertices
bool operator()(const Point< 3 > &one, const Point< 3 > &two) const
static void declare_parameters(ParameterHandler &prm)
static RgbValues default_color_function(const double value, const double min_value, const double max_value)
void parse_parameters(const ParameterHandler &prm)
ColorFunction color_function
RgbValues(*)(const double value, const double min_value, const double max_value) ColorFunction
static RgbValues grey_scale_color_function(const double value, const double min_value, const double max_value)
unsigned int color_vector
static RgbValues reverse_grey_scale_color_function(const double value, const double min_value, const double max_value)
@ width
Scale to given width.
@ height
Scale to given height.
unsigned int height_vector
std::vector< std::string > space_dimension_labels
std::size_t memory_consumption() const
DataOutBase::CompressionLevel compression_level
std::size_t memory_consumption() const
static void declare_parameters(ParameterHandler &prm)
void parse_parameters(const ParameterHandler &prm)
static const unsigned int n_subdivisions
static const ReferenceCell reference_cell
bool points_are_available
std::size_t memory_consumption() const
ReferenceCell reference_cell
static const unsigned int no_neighbor
bool operator==(const Patch &patch) const
void swap(Patch< dim, spacedim > &other_patch) noexcept
static const unsigned int space_dim
unsigned int n_subdivisions
std::array< Point< spacedim >, GeometryInfo< dim >::vertices_per_cell > vertices
bool points_are_available
std::array< unsigned int, GeometryInfo< dim >::faces_per_cell > neighbors
static void declare_parameters(ParameterHandler &prm)
void parse_parameters(const ParameterHandler &prm)
unsigned int height_vector
unsigned int line_thickness
std::size_t memory_consumption() const
void parse_parameters(const ParameterHandler &prm)
static void declare_parameters(ParameterHandler &prm)
std::map< std::string, std::string > physical_units
bool write_higher_order_cells
DataOutBase::CompressionLevel compression_level