Reference documentation for deal.II version Git 283ce71 2014-12-19 22:22:25 +0100
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
DataOutBase::EpsFlags Struct Reference

#include <deal.II/base/data_out_base.h>


struct  RgbValues

Public Types

enum  SizeType { width, height }
typedef RgbValues(* ColorFunction )(const double value, const double min_value, const double max_value)

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

Detailed Description

Flags controlling the details of output in encapsulated postscript format.

Definition at line 577 of file data_out_base.h.

Member Typedef Documentation

typedef RgbValues(* DataOutBase::EpsFlags::ColorFunction)(const double value, const double min_value, const double max_value)

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 728 of file data_out_base.h.

Member Enumeration Documentation

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.


Scale to given width.


Scale to given height.

Definition at line 598 of file data_out_base.h.

Constructor & Destructor Documentation

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 


Member Function Documentation

static RgbValues DataOutBase::EpsFlags::default_color_function ( const double  value,
const double  min_value,
const double  max_value 

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 defition of the color scale refer to the implementation.

This function was originally written by Stefan Nauber.

static RgbValues DataOutBase::EpsFlags::grey_scale_color_function ( const double  value,
const double  min_value,
const double  max_value 

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.

static RgbValues DataOutBase::EpsFlags::reverse_grey_scale_color_function ( const double  value,
const double  min_value,
const double  max_value 

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.

static void DataOutBase::EpsFlags::declare_parameters ( ParameterHandler prm)

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.

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.

std::size_t DataOutBase::EpsFlags::memory_consumption ( ) const

Determine an estimate for the memory consumption (in bytes) of this object. Since sometimes the size of objects can not be determined exactly (for example: what is the memory consumption of an STL std::map type with a certain number of elements?), this is only an estimate. however often quite close to the true value.

Member Data Documentation

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 585 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 591 of file data_out_base.h.

SizeType DataOutBase::EpsFlags::size_type

See above. Default is width.

Definition at line 609 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 618 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 623 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 630 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 655 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 667 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 675 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 693 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 703 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 737 of file data_out_base.h.

The documentation for this struct was generated from the following file: