deal.II version GIT relicensing-2165-gc91f007519 2024-11-20 01:40:00+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
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>

Inheritance diagram for DataOutBase::EpsFlags:
Inheritance graph
[legend]

Classes

struct  RgbValues
 

Public Types

enum  SizeType { width , height }
 
using ColorFunction = RgbValues(*)(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 827 of file data_out_base.h.

Member Typedef Documentation

◆ ColorFunction

using DataOutBase::EpsFlags::ColorFunction = RgbValues (*)(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 979 of file data_out_base.h.

Member Enumeration Documentation

◆ SizeType

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.

Constructor & Destructor Documentation

◆ EpsFlags()

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 2169 of file data_out_base.cc.

Member Function Documentation

◆ default_color_function()

EpsFlags::RgbValues DataOutBase::EpsFlags::default_color_function ( const double  value,
const double  min_value,
const double  max_value 
)
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 2198 of file data_out_base.cc.

◆ grey_scale_color_function()

EpsFlags::RgbValues DataOutBase::EpsFlags::grey_scale_color_function ( const double  value,
const double  min_value,
const double  max_value 
)
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 2286 of file data_out_base.cc.

◆ reverse_grey_scale_color_function()

EpsFlags::RgbValues DataOutBase::EpsFlags::reverse_grey_scale_color_function ( const double  value,
const double  min_value,
const double  max_value 
)
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 2299 of file data_out_base.cc.

◆ declare_parameters()

void DataOutBase::EpsFlags::declare_parameters ( ParameterHandler prm)
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 2312 of file data_out_base.cc.

◆ parse_parameters()

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 2379 of file data_out_base.cc.

◆ memory_consumption()

std::size_t DataOutBase::OutputFlagsBase< EpsFlags >::memory_consumption ( ) const
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.

Member Data Documentation

◆ height_vector

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.

◆ color_vector

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.

◆ size_type

SizeType DataOutBase::EpsFlags::size_type

See above. Default is width.

Definition at line 859 of file data_out_base.h.

◆ size

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.

◆ line_width

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.

◆ azimut_angle

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.

◆ turn_angle

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.

◆ z_scaling

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.

◆ draw_mesh

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.

◆ draw_cells

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.

◆ shade_cells

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.

◆ color_function

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.


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