Navigation

Main Page
Download
Support
Installation
Tutorial
Examples
Reference Manual
   Version 1.0.6dev
      Class Index
      File List
   Version 1.0.6
   Version 1.0.5new_solver
   Version 1.0.5dev
   Version 1.0.5b
   Version 1.0.4dev
   Version 1.0.4
Publications


Hosted by Get Ion Beam Simulator at SourceForge.net. Fast, secure and Free Open Source software downloads
FieldGraph Class Reference

Class for drawing fields with colormap. More...

#include <fieldgraph.hpp>

Inheritance diagram for FieldGraph:
Graph3D MeshColormap Graph Colormap Graph

Public Member Functions

 FieldGraph (const Geometry &geom, const Field *field, field_type_e field_type)
 Constructor for plotting field. More...
 
virtual ~FieldGraph ()
 Destructor. More...
 
field_type_e field_type (void) const
 Get field type. More...
 
void enable (bool enable)
 Set field to be plotted. More...
 
void set_zrange (double zmin, double zmax)
 Set zrange for plot. More...
 
void build_plot (void)
 Build plot. More...
 
virtual void plot (cairo_t *cairo, const Coordmapper *cm, const double range[4])
 Plot graph with cairo. More...
 
virtual void plot_sample (cairo_t *cairo, double x, double y, double width, double height)
 Plot sample for legend. More...
 
virtual void get_bbox (double bbox[4])
 Get bounding box of drawable. More...
 
- Public Member Functions inherited from Graph3D
 Graph3D (const Mesh &mesh)
 Constructor. More...
 
virtual ~Graph3D ()
 Virtual destructor. More...
 
void set_view (view_e view, int level)
 Set the view of 3D drawable. More...
 
- Public Member Functions inherited from Graph
virtual ~Graph ()
 Virtual destructor. More...
 
- Public Member Functions inherited from MeshColormap
 MeshColormap ()
 Default constructor for empty colormap graph. More...
 
 MeshColormap (const MeshColormap &colormap)
 Copy constructor. More...
 
 MeshColormap (const double datarange[4], size_t n, size_t m, const std::vector< double > &data)
 Constructor for colormap from data. More...
 
virtual ~MeshColormap ()
 Destructor. More...
 
void clear_data (void)
 Clears colormap data. More...
 
void set_data (const double datarange[4], size_t n, size_t m, const std::vector< double > &data)
 Define colormap from data. More...
 
bool has_data (void) const
 Does colormap have data? More...
 
interpolation_e get_interpolation (void) const
 Set interpolation mode. More...
 
void set_interpolation (interpolation_e interpolation)
 Set interpolation mode. More...
 
virtual double zscale (double val)
 Scale value val according to zscale mode. More...
 
virtual double zscale_inv (double val)
 Inverse scale value val according to zscale mode. More...
 
zscale_e get_zscale (void) const
 Get zscale mode. More...
 
void set_zscale (zscale_e zscale)
 Set zscale mode. More...
 
void set_palette (const Palette &palette)
 Set colormap palette. More...
 
virtual Palettepalette (void)
 Get a reference to colormap palette. More...
 
const Palettepalette (void) const
 Get a reference to colormap palette. More...
 
void get_zrange (double &min, double &max) const
 Get zrange for colormap plot. More...
 
void set_zrange (double min, double max)
 Set zrange for colormap plot. More...
 
double get_value (double x, double y) const
 Get value of interpolated colormap data. More...
 
- Public Member Functions inherited from Colormap
virtual ~Colormap ()
 Destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from Graph3D
const Mesh_mesh
 Mesh of simulation. More...
 
view_e _view
 Geometry view direction. More...
 
int _vb [3]
 Coordinate index for first, second and third axes. More...
 
int _level
 Level of slice in mesh units. More...
 
double _level_si
 Level in meters. More...
 

Detailed Description

Class for drawing fields with colormap.

Implementation of Graph3D. Used in Frame type plots.

Constructor & Destructor Documentation

◆ FieldGraph()

FieldGraph::FieldGraph ( const Geometry geom,
const Field field,
field_type_e  field_type 
)

Constructor for plotting field.

◆ ~FieldGraph()

FieldGraph::~FieldGraph ( )
virtual

Destructor.

Member Function Documentation

◆ build_plot()

void FieldGraph::build_plot ( void  )

Build plot.

Reads in field data and produces the colormap for the plot. Automatically called by plot(), but can be called to produce automatic zranges.

◆ enable()

void FieldGraph::enable ( bool  enable)

Set field to be plotted.

The field_type can be FIELD_NONE and field NULL for no plotting.

Set field to be plotted.

The field_type can be FIELD_NONE and field NULL for no plotting.

Enable/disable plot.

◆ field_type()

field_type_e FieldGraph::field_type ( void  ) const

Get field type.

◆ get_bbox()

void FieldGraph::get_bbox ( double  bbox[4])
virtual

Get bounding box of drawable.

Returns the bounding box of the drawable in array bbox in order xmin, ymin, xmax, ymax.

Implements Graph3D.

◆ plot()

void FieldGraph::plot ( cairo_t *  cairo,
const Coordmapper cm,
const double  range[4] 
)
virtual

Plot graph with cairo.

Plot the graph using cairo and coordinate mapper cm. The visible range of plot is given in array range in order xmin, ymin, xmax, ymax. The graph should be able to handle any range values. Also min > max.

Called by Frame during drawing.

Implements Graph3D.

◆ plot_sample()

void FieldGraph::plot_sample ( cairo_t *  cairo,
double  x,
double  y,
double  width,
double  height 
)
virtual

Plot sample for legend.

Plot graph sample for legend at cairo coordinates x.

Implements Graph3D.

◆ set_zrange()

void FieldGraph::set_zrange ( double  zmin,
double  zmax 
)

Set zrange for plot.

The zrange defaults to automatically scaled range for the whole field for scalarfields and automatically scaled range for the view plane only for vectorfields.


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


Reference manual for Ion Beam Simulator 1.0.6dev
Generated by Doxygen 1.9.1 on Thu Sep 11 2025 09:37:24.