17 #ifndef __deal2__grid_out_h
18 #define __deal2__grid_out_h
22 #include <deal.II/base/config.h>
24 #include <deal.II/base/point.h>
25 #include <deal.II/grid/tria.h>
26 #include <deal.II/fe/mapping.h>
34 template <
int dim,
int spacedim>
class Mapping;
84 DX (
const bool write_cells =
true,
85 const bool write_faces =
false,
86 const bool write_diameter =
false,
87 const bool write_measure =
false,
88 const bool write_all_faces =
true);
141 Msh (
const bool write_faces =
false,
142 const bool write_lines =
false);
207 Ucd (
const bool write_preamble =
false,
208 const bool write_faces =
false,
209 const bool write_lines =
false);
260 Gnuplot (
const bool write_cell_number =
false,
261 const unsigned int n_boundary_face_points = 2,
262 const bool curved_inner_cells =
false);
344 const unsigned int size = 300,
345 const double line_width = 0.5,
346 const bool color_lines_on_user_flag =
false,
347 const unsigned int n_boundary_face_points = 2,
348 const bool color_lines_level =
false);
389 const unsigned int size = 300,
390 const double line_width = 0.5,
391 const bool color_lines_on_user_flag =
false,
392 const unsigned int n_boundary_face_points = 2);
443 const unsigned int size = 300,
444 const double line_width = 0.5,
445 const bool color_lines_on_user_flag =
false,
446 const unsigned int n_boundary_face_points = 2,
447 const bool write_cell_numbers =
false,
448 const bool write_cell_number_level =
true,
449 const bool write_vertex_numbers =
false,
450 const bool color_lines_level =
false);
491 const unsigned int size = 300,
492 const double line_width = 0.5,
493 const bool color_lines_on_user_flag =
false,
494 const unsigned int n_boundary_face_points = 2,
495 const double azimut_angle = 60,
496 const double turn_angle = 30);
682 bool label_cell_index;
683 bool label_material_id;
684 bool label_subdomain_id;
685 bool label_level_subdomain_id;
695 Svg(
const unsigned int line_thickness = 2,
696 const unsigned int boundary_line_thickness = 4,
699 const int azimuth_angle = 0,
700 const int polar_angle = 0,
702 const bool convert_level_number_to_height =
false,
703 const bool label_level_number =
true,
704 const bool label_cell_index =
true,
705 const bool label_material_id =
false,
706 const bool label_subdomain_id =
false,
707 const bool draw_colorbar =
true,
708 const bool draw_legend =
true);
881 std::ostream &out)
const;
945 template <
int dim,
int spacedim>
969 template <
int dim,
int spacedim>
971 std::ostream &out)
const;
993 template <
int dim,
int spacedim>
995 std::ostream &out)
const;
1079 template <
int dim,
int spacedim>
1081 std::ostream &out)
const;
1084 std::ostream &out)
const;
1103 std::ostream &out)
const;
1109 template <
int dim,
int spacedim>
1118 template <
int dim,
int spacedim>
1329 template <
int dim,
int spacedim>
1331 const unsigned int starting_index,
1332 std::ostream &out)
const;
1340 const unsigned int starting_index,
1341 std::ostream &out)
const;
1348 const unsigned int starting_index,
1349 std::ostream &out)
const;
1351 const unsigned int starting_index,
1352 std::ostream &out)
const;
1373 template <
int dim,
int spacedim>
1375 const unsigned int starting_index,
1376 std::ostream &out)
const;
1383 const unsigned int starting_index,
1384 std::ostream &out)
const;
1391 const unsigned int starting_index,
1392 std::ostream &out)
const;
1394 const unsigned int starting_index,
1395 std::ostream &out)
const;
1401 const unsigned int starting_index,
1402 std::ostream &out)
const;
1408 const unsigned int starting_index,
1409 std::ostream &out)
const;
1430 template <
int dim,
int spacedim>
1432 const unsigned int starting_index,
1433 std::ostream &out)
const;
1440 const unsigned int starting_index,
1441 std::ostream &out)
const;
1448 const unsigned int starting_index,
1449 std::ostream &out)
const;
1451 const unsigned int starting_index,
1452 std::ostream &out)
const;
1474 template <
int dim,
int spacedim>
1476 const unsigned int starting_index,
1477 std::ostream &out)
const;
1484 const unsigned int starting_index,
1485 std::ostream &out)
const;
1491 const unsigned int starting_index,
1492 std::ostream &out)
const;
1494 const unsigned int starting_index,
1495 std::ostream &out)
const;
1503 const unsigned int starting_index,
1504 std::ostream &out)
const;
1510 const unsigned int starting_index,
1511 std::ostream &out)
const;
1528 float camera_focus);
1544 template <
int dim,
int spacedim>
1572 template <
int dim,
int spacedim>
1602 DEAL_II_NAMESPACE_CLOSE
void parse_parameters(ParameterHandler ¶m)
void parse_parameters(ParameterHandler ¶m)
write() calls write_svg()
void write_ucd(const Triangulation< dim, spacedim > &tria, std::ostream &out) const
OutputFormat default_format
void write_eps(const Triangulation< dim > &tria, std::ostream &out, const Mapping< dim > *mapping=0) const
DX(const bool write_cells=true, const bool write_faces=false, const bool write_diameter=false, const bool write_measure=false, const bool write_all_faces=true)
void write_msh_faces(const Triangulation< dim, spacedim > &tria, const unsigned int starting_index, std::ostream &out) const
bool margin
Margin around the plotted area.
Convert the material id into the cell color.
Gnuplot(const bool write_cell_number=false, const unsigned int n_boundary_face_points=2, const bool curved_inner_cells=false)
void write_gnuplot(const Triangulation< dim, spacedim > &tria, std::ostream &out, const Mapping< dim, spacedim > *mapping=0) const
unsigned int n_boundary_face_points
static void declare_parameters(ParameterHandler ¶m)
GridOutFlags::Eps< 2 > eps_flags_2
bool draw_legend
Draw a legend next to the plotted grid, explaining the label of the cells.
void parse_parameters(ParameterHandler ¶m)
bool level_color DEAL_II_DEPRECATED
write() calls write_msh()
void write_dx(const Triangulation< dim > &tria, std::ostream &out) const
unsigned int line_thickness
Thickness of the lines between cells.
unsigned int n_boundary_face_points
bool convert_level_number_to_height
Interpret the level number of the cells as altitude over the x-y-plane (useful in the perpspective vi...
static void declare_parameters(ParameterHandler ¶m)
unsigned int boundary_line_thickness
Thickness of lines at the boundary.
write() calls write_gnuplot()
DeclException0(ExcInvalidState)
write() calls write_mathgl()
void parse_parameters(ParameterHandler ¶m)
::ExceptionBase & ExcInvalidState()
static void declare_parameters(ParameterHandler ¶m)
void write_msh(const Triangulation< dim, spacedim > &tria, std::ostream &out) const
GridOutFlags::Gnuplot gnuplot_flags
void write_mathgl(const Triangulation< dim > &tria, std::ostream &out) const
write() calls write_eps()
void write_svg(const Triangulation< dim, spacedim > &tria, std::ostream &out) const
GridOutFlags::MathGL mathgl_flags
GridOutFlags::DX dx_flags
GridOutFlags::Msh msh_flags
GridOutFlags::Eps< 1 > eps_flags_1
static Point< 2 > svg_project_point(Point< 3 > point, Point< 3 > camera_position, Point< 3 > camera_direction, Point< 3 > camera_horizontal, float camera_focus)
Convert the material id into the cell color (default)
bool write_cell_number_level
EpsFlagsBase(const SizeType size_type=width, const unsigned int size=300, const double line_width=0.5, const bool color_lines_on_user_flag=false, const unsigned int n_boundary_face_points=2, const bool color_lines_level=false)
Convert the level subdomain id into the cell color.
std::string default_suffix() const
GridOutFlags::XFig xfig_flags
static void declare_parameters(ParameterHandler ¶m)
Ucd(const bool write_preamble=false, const bool write_faces=false, const bool write_lines=false)
Convert the subdomain id into the cell color.
Msh(const bool write_faces=false, const bool write_lines=false)
GridOutFlags::Ucd ucd_flags
Use transparent value of SVG.
Convert the global subdomain id into the cell color.
void write_xfig(const Triangulation< dim > &tria, std::ostream &out, const Mapping< dim > *mapping=0) const
write() calls write_xfig()
void write_ucd_lines(const Triangulation< dim, spacedim > &tria, const unsigned int starting_index, std::ostream &out) const
bool write_vertex_numbers
Convert the level into the cell color.
std::size_t memory_consumption() const
void parse_parameters(ParameterHandler ¶m)
unsigned int n_boundary_lines(const Triangulation< dim, spacedim > &tria) const
Convert the level subdomain id into the cell color.
unsigned int n_boundary_face_points
static void declare_parameters(ParameterHandler ¶m)
unsigned int n_boundary_faces(const Triangulation< dim, spacedim > &tria) const
static OutputFormat parse_output_format(const std::string &format_name)
void write_ucd_faces(const Triangulation< dim, spacedim > &tria, const unsigned int starting_index, std::ostream &out) const
write() calls write_ucd()
GridOutFlags::Svg svg_flags
Svg(const unsigned int line_thickness=2, const unsigned int boundary_line_thickness=4, bool margin=true, const Background background=white, const int azimuth_angle=0, const int polar_angle=0, const Coloring coloring=level_number, const bool convert_level_number_to_height=false, const bool label_level_number=true, const bool label_cell_index=true, const bool label_material_id=false, const bool label_subdomain_id=false, const bool draw_colorbar=true, const bool draw_legend=true)
bool color_lines_on_user_flag
void parse_parameters(ParameterHandler ¶m)
static void declare_parameters(ParameterHandler ¶m)
static void declare_parameters(ParameterHandler ¶m)
static void declare_parameters(ParameterHandler ¶m)
GridOutFlags::Eps< 3 > eps_flags_3
void write(const Triangulation< dim, spacedim > &tria, std::ostream &out, const OutputFormat output_format, const Mapping< dim, spacedim > *mapping=0) const
static std::string get_output_format_names()
void set_flags(const GridOutFlags::DX &flags)
void parse_parameters(ParameterHandler ¶m)
Convert the level number into the cell color.
bool draw_colorbar
Draw a colorbar next to the plotted grid with respect to the chosen coloring of the cells...
void write_msh_lines(const Triangulation< dim, spacedim > &tria, const unsigned int starting_index, std::ostream &out) const
void parse_parameters(ParameterHandler ¶m)