Reference documentation for deal.II version 9.6.0
|
#include <deal.II/base/data_out_base.h>
Classes | |
struct | RgbValues |
Public Types | |
enum | SizeType { width , height } |
using | ColorFunction |
Public Member Functions | |
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::size_t | memory_consumption () const |
Static Public Member Functions | |
static RgbValues | default_color_function (const double value, const double min_value, const double max_value) |
static RgbValues | grey_scale_color_function (const double value, const double min_value, const double max_value) |
static RgbValues | reverse_grey_scale_color_function (const double value, const double min_value, const double max_value) |
static void | declare_parameters (ParameterHandler &prm) |
Public Attributes | |
unsigned int | height_vector |
unsigned int | color_vector |
SizeType | size_type |
unsigned int | size |
double | line_width |
double | azimut_angle |
double | turn_angle |
double | z_scaling |
bool | draw_mesh |
bool | draw_cells |
bool | shade_cells |
ColorFunction | color_function |
Flags controlling the details of output in encapsulated postscript format.
Definition at line 827 of file data_out_base.h.
Definition of a function pointer type taking a value and returning a triple of color values in RGB values.
Besides the actual value by which the color is to be computed, min and max values of the data to be colorized are given as well.
Definition at line 979 of file data_out_base.h.
Enum denoting the possibilities whether the scaling should be done such that the given size
equals the width or the height of the resulting picture.
Enumerator | |
---|---|
width | Scale to given width. |
height | Scale to given height. |
Definition at line 848 of file data_out_base.h.
DataOutBase::EpsFlags::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 ) |
Constructor.
Definition at line 2163 of file data_out_base.cc.
|
static |
Default colorization function. This one does what one usually wants: It shifts colors from black (lowest value) through blue, green and red to white (highest value). For the exact definition of the color scale refer to the implementation.
This function was originally written by Stefan Nauber.
Definition at line 2192 of file data_out_base.cc.
|
static |
This is an alternative color function producing a grey scale between black (lowest values) and white (highest values). You may use it by setting the color_function variable to the address of this function.
Definition at line 2280 of file data_out_base.cc.
|
static |
This is one more alternative color function producing a grey scale between white (lowest values) and black (highest values), i.e. the scale is reversed to the previous one. You may use it by setting the color_function variable to the address of this function.
Definition at line 2293 of file data_out_base.cc.
|
static |
Declare all flags with name and type as offered by this class, for use in input files.
For coloring, only the color functions declared in this class are offered.
Definition at line 2306 of file data_out_base.cc.
void DataOutBase::EpsFlags::parse_parameters | ( | const ParameterHandler & | prm | ) |
Read the parameters declared in declare_parameters() and set the flags for this output format accordingly.
The flags thus obtained overwrite all previous contents of this object.
Definition at line 2373 of file data_out_base.cc.
|
inherited |
Return an estimate for the memory consumption, in bytes, of this object. This is not exact (but will usually be close) because calculating the memory usage of trees (e.g., std::map
) is difficult.
Definition at line 593 of file data_out_base.h.
unsigned int DataOutBase::EpsFlags::height_vector |
This denotes the number of the data vector which shall be used for generating the height information. By default, the first data vector is taken, i.e. height_vector==0
, if there is any data vector. If there is no data vector, no height information is generated.
Definition at line 835 of file data_out_base.h.
unsigned int DataOutBase::EpsFlags::color_vector |
Number of the vector which is to be taken to colorize cells. The same applies as for height_vector.
Definition at line 841 of file data_out_base.h.
SizeType DataOutBase::EpsFlags::size_type |
See above. Default is width
.
Definition at line 859 of file data_out_base.h.
unsigned int DataOutBase::EpsFlags::size |
Width or height of the output as given in postscript units This usually is given by the strange unit 1/72 inch. Whether this is height or width is specified by the flag size_type
.
Default is 300, which represents a size of roughly 10 cm.
Definition at line 868 of file data_out_base.h.
double DataOutBase::EpsFlags::line_width |
Width of a line in postscript units. Default is 0.5.
Definition at line 873 of file data_out_base.h.
double DataOutBase::EpsFlags::azimut_angle |
Angle of the line origin-viewer against the z-axis in degrees.
Default is the Gnuplot-default of 60.
Definition at line 880 of file data_out_base.h.
double DataOutBase::EpsFlags::turn_angle |
Angle by which the viewers position projected onto the x-y-plane is rotated around the z-axis, in positive sense when viewed from above. The unit are degrees, and zero equals a position above or below the negative y-axis.
Default is the Gnuplot-default of 30. An example of a Gnuplot-default of 0 is the following:
* * 3________7 * / /| * / / | * 2/______6/ | * | | | | * O--> | 0___|___4 * | / | / * | / | / * 1|/______5/ * *
Definition at line 905 of file data_out_base.h.
double DataOutBase::EpsFlags::z_scaling |
Factor by which the z-axis is to be stretched as compared to the x- and y-axes. This is to compensate for the different sizes that coordinate and solution values may have and to prevent that the plot looks to much out-of-place (no elevation at all if solution values are much smaller than coordinate values, or the common "extremely mountainous area" in the opposite case.
Default is 1.0
.
Definition at line 917 of file data_out_base.h.
bool DataOutBase::EpsFlags::draw_mesh |
Flag the determines whether the lines bounding the cells (or the parts of each patch) are to be plotted.
Default: true
.
Definition at line 925 of file data_out_base.h.
bool DataOutBase::EpsFlags::draw_cells |
Flag whether to fill the regions between the lines bounding the cells or not. If not, no hidden line removal is performed, which in this crude implementation is done through writing the cells in a back-to-front order, thereby hiding the cells in the background by cells in the foreground.
If this flag is false
and draw_mesh is false
as well, nothing will be printed.
If this flag is true
, then the cells will be drawn either colored by one of the data sets (if shade_cells is true
), or pure white (if shade_cells is false or if there are no data sets).
Default is true
.
Definition at line 943 of file data_out_base.h.
bool DataOutBase::EpsFlags::shade_cells |
Flag to determine whether the cells shall be colorized by the data set denoted by color_vector, or simply be painted in white. This flag only makes sense if draw_cells==true
. Colorization is done through color_function.
Default is true
.
Definition at line 953 of file data_out_base.h.
ColorFunction DataOutBase::EpsFlags::color_function |
This is a pointer to the function which is used to colorize the cells. By default, it points to the static function default_color_function() which is a member of this class.
Definition at line 988 of file data_out_base.h.