Public Member Functions | List of all members
GeomPlot Class Reference

Geometry plotter class. More...

#include <geomplot.hpp>

Inheritance diagram for GeomPlot:
GeomPlotter

Public Member Functions

 GeomPlot (Frame *frame, const Geometry *geom)
 Constructor for new geometry plot.
 ~GeomPlot ()
 Destructor for geometry plotter.
void disable_cache (void)
 Disable plotting caches from use.
void set_epot (const ScalarField *epot)
 Set the electric potential field.
void set_eqlines_manual (const std::vector< double > &pot)
 Set a vector of manual equipotential lines.
std::vector< double > get_eqlines_manual (void) const
 Get a vector of manual equipotential lines.
void set_eqlines_auto (size_t N)
 Set the number of automatic equipotential lines.
size_t get_eqlines_auto (void) const
 Get the number of automatic equipotential lines.
void set_bfield (const VectorField *bfield)
 Set magnetic field.
const VectorFieldget_bfield (void) const
 Get magnetic field.
void set_efield (const VectorField *efield)
 Set electric field.
const VectorFieldget_efield (void) const
 Get electric field.
void set_trajdens (const ScalarField *tdens)
 Set trajectory density field.
const ScalarFieldget_trajdens (void) const
 Get trajectory density field.
void set_scharge (const ScalarField *scharge)
 Set space charge density field.
const ScalarFieldget_scharge (void) const
 Get space charge density field.
void set_fieldgraph_plot (field_type_e fieldplot)
 Set field graph plotting type.
field_type_e get_fieldgraph_plot (void) const
 Get field graph plotting type.
void set_fieldgraph_stepped_palette (int steps)
 Set stepped palette.
void set_fieldgraph_zscale (zscale_e zscale)
 Set field graph zscale setting.
zscale_e get_fieldgraph_zscale (void) const
 Get field graph zscale setting.
void set_particle_database (const ParticleDataBase *pdb)
 Set particle database used for particle plotting.
void set_particledatabase (const ParticleDataBase *pdb)
 Set particle database used for particle plotting.
void set_particle_div (size_t particle_div)
 Set particle divisor.
size_t get_particle_div (void) const
 Get particle divisor.
void set_qm_discretation (bool enable)
 Set q/m particle discretation.
bool get_qm_discretation (void) const
 Get q/m particle discretation.
void set_mesh (bool enable)
 Set mesh plotting.
bool get_mesh (void) const
 Get mesh plotting.
void set_view (view_e view, int level=-1)
 Set view.
void set_view_si (view_e view, double level)
 Set view in SI units.
view_e get_view (void) const
 Get view.
int get_level (void) const
 Get level of view in mesh squares.
double get_level_si (void) const
 Get level of view in SI units.
int vb (int i) const
 Get component i of view base vector.
void get_vb (int vb[3]) const
 Get the view base vector.

Detailed Description

Geometry plotter class.

Collection of graphs for building Geometry plots containing solids, equipotential lines, space charge field, particle trajectories and mesh lines.

Constructor & Destructor Documentation

GeomPlot::GeomPlot ( Frame frame,
const Geometry geom 
)

Constructor for new geometry plot.

Builds a new geometry plot in the plot frame. Default graph (SolidGraph) is added to the plot and view is set as XY-view. The default plane of view is the midplane for 3D geometries and 0 for others.

GeomPlot::~GeomPlot ( )

Destructor for geometry plotter.

Member Function Documentation

void GeomPlot::disable_cache ( void  )

Disable plotting caches from use.

Used by the interactive plotter.

const VectorField* GeomPlot::get_bfield ( void  ) const
inline

Get magnetic field.

const VectorField* GeomPlot::get_efield ( void  ) const
inline

Get electric field.

size_t GeomPlot::get_eqlines_auto ( void  ) const
inline

Get the number of automatic equipotential lines.

std::vector<double> GeomPlot::get_eqlines_manual ( void  ) const
inline

Get a vector of manual equipotential lines.

field_type_e GeomPlot::get_fieldgraph_plot ( void  ) const
inline

Get field graph plotting type.

zscale_e GeomPlot::get_fieldgraph_zscale ( void  ) const
inline

Get field graph zscale setting.

int GeomPlot::get_level ( void  ) const
inline

Get level of view in mesh squares.

double GeomPlot::get_level_si ( void  ) const
inline

Get level of view in SI units.

bool GeomPlot::get_mesh ( void  ) const
inline

Get mesh plotting.

size_t GeomPlot::get_particle_div ( void  ) const
inline

Get particle divisor.

bool GeomPlot::get_qm_discretation ( void  ) const
inline

Get q/m particle discretation.

const ScalarField* GeomPlot::get_scharge ( void  ) const
inline

Get space charge density field.

const ScalarField* GeomPlot::get_trajdens ( void  ) const
inline

Get trajectory density field.

void GeomPlot::get_vb ( int  vb[3]) const
inline

Get the view base vector.

view_e GeomPlot::get_view ( void  ) const
inline

Get view.

void GeomPlot::set_bfield ( const VectorField bfield)
inline

Set magnetic field.

void GeomPlot::set_efield ( const VectorField efield)
inline

Set electric field.

void GeomPlot::set_epot ( const ScalarField epot)

Set the electric potential field.

void GeomPlot::set_eqlines_auto ( size_t  N)

Set the number of automatic equipotential lines.

The automatic lines are plotted at potentials pot = min + (i+0.5)*(max-min)/N ), where i is running from 0 to N and min is the minimum potential in the system and max is the maximum potential in the system.

void GeomPlot::set_eqlines_manual ( const std::vector< double > &  pot)

Set a vector of manual equipotential lines.

void GeomPlot::set_fieldgraph_plot ( field_type_e  fieldplot)

Set field graph plotting type.

void GeomPlot::set_fieldgraph_stepped_palette ( int  steps)

Set stepped palette.

If steps is less than or equal to 1 a regular interpolated palette will be used, otherwise steps is used as the number of separate shades in the palette.

void GeomPlot::set_fieldgraph_zscale ( zscale_e  zscale)

Set field graph zscale setting.

void GeomPlot::set_mesh ( bool  enable)

Set mesh plotting.

If enabled, the mesh squares are plotted. Mesh plotting is disabled by default.

void GeomPlot::set_particle_database ( const ParticleDataBase pdb)
inline

Set particle database used for particle plotting.

void GeomPlot::set_particle_div ( size_t  particle_div)

Set particle divisor.

Zero for no plotting, one for plotting every particle, two for plotting every second particle, three for plotting every third particle, etc. Defaults to 10.

void GeomPlot::set_particledatabase ( const ParticleDataBase pdb)

Set particle database used for particle plotting.

void GeomPlot::set_qm_discretation ( bool  enable)

Set q/m particle discretation.

If enabled, the different q/m values will be plotted with different colors. Otherwise, all particles are plotted with same color.

void GeomPlot::set_scharge ( const ScalarField scharge)

Set space charge density field.

void GeomPlot::set_trajdens ( const ScalarField tdens)

Set trajectory density field.

void GeomPlot::set_view ( view_e  view,
int  level = -1 
)

Set view.

Sets the viewplane to the geometry. The viewplane is set by direction view and depth level set as mesh level. Level is checked and limited to existing levels. Level -1 (default) means half the range (midplane).

void GeomPlot::set_view_si ( view_e  view,
double  level 
)

Set view in SI units.

Sets the viewplane to the geometry. The viewplane is set by direction view and depth level set as coordinates in SI units. The level is limited to existing values.

int GeomPlot::vb ( int  i) const
inline

Get component i of view base vector.


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