Navigation

Main Page
Download
Support
Installation
Tutorial
Examples
Reference Manual
   Version 1.0.6
      Class Index
      File List
   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
gtkgeomwindow.hpp
Go to the documentation of this file.
1 
5 /* Copyright (c) 2005-2013 Taneli Kalvas. All rights reserved.
6  *
7  * You can redistribute this software and/or modify it under the terms
8  * of the GNU General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * This library is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this library (file "COPYING" included in the package);
19  * if not, write to the Free Software Foundation, Inc., 51 Franklin
20  * Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  * If you have questions about your rights to use or distribute this
23  * software, please contact Berkeley Lab's Technology Transfer
24  * Department at TTD@lbl.gov. Other questions, comments and bug
25  * reports should be sent directly to the author via email at
26  * taneli.kalvas@jyu.fi.
27  *
28  * NOTICE. This software was developed under partial funding from the
29  * U.S. Department of Energy. As such, the U.S. Government has been
30  * granted for itself and others acting on its behalf a paid-up,
31  * nonexclusive, irrevocable, worldwide license in the Software to
32  * reproduce, prepare derivative works, and perform publicly and
33  * display publicly. Beginning five (5) years after the date
34  * permission to assert copyright is obtained from the U.S. Department
35  * of Energy, and subject to any subsequent five (5) year renewals,
36  * the U.S. Government is granted for itself and others acting on its
37  * behalf a paid-up, nonexclusive, irrevocable, worldwide license in
38  * the Software to reproduce, prepare derivative works, distribute
39  * copies to the public, perform publicly and display publicly, and to
40  * permit others to do so.
41  */
42 
43 #ifndef GTKGEOMWINDOW_HPP
44 #define GTKGEOMWINDOW_HPP 1
45 
46 
47 #include <vector>
48 
49 #include "gtkframewindow.hpp"
50 #include "geomplot.hpp"
51 #include "meshscalarfield.hpp"
52 #include "epot_field.hpp"
53 #include "epot_efield.hpp"
54 #include "vectorfield.hpp"
55 
56 
57 
60 class GTKGeomWindow : public GTKFrameWindow {
61 
62  struct PreferencesData {
63  GtkWidget *manual_eqlines_entry;
64  GtkWidget *automatic_eqlines_spin;
65  GtkWidget *particle_div_spin;
66  GtkWidget *particle_offset_spin;
67 
68  GtkWidget *qmdiscretation_check;
69  GtkWidget *meshen_check;
70 
71  GtkWidget *field_none_radio;
72  GtkWidget *field_J_radio;
73  GtkWidget *field_rho_radio;
74  GtkWidget *field_phi_radio;
75 
76  GtkWidget *field_E_radio;
77  GtkWidget *field_Ex_radio;
78  GtkWidget *field_Ey_radio;
79  GtkWidget *field_Ez_radio;
80 
81  GtkWidget *field_B_radio;
82  GtkWidget *field_Bx_radio;
83  GtkWidget *field_By_radio;
84  GtkWidget *field_Bz_radio;
85 
86  GtkWidget *int_closest_radio;
87  GtkWidget *int_bilinear_radio;
88  GtkWidget *int_bicubic_radio;
89 
90  GtkWidget *zscale_lin_radio;
91  GtkWidget *zscale_log_radio;
92  GtkWidget *zscale_rellog_radio;
93 
94  GtkWidget *zmin_entry;
95  GtkWidget *zmax_entry;
96 
97  GtkWidget *palette_steps_entry;
98  };
99 
100  GeomPlot _geomplot;
101 
102  const Geometry &_geom;
103  const EpotField *_epot;
104  const EpotEfield *_efield;
105  const MeshScalarField *_scharge;
106  const MeshScalarField *_tdens;
107  const VectorField *_bfield;
108  const ParticleDataBase *_pdb;
109 
110  int _tool;
111  int _start[2];
112  int _end[2];
113 
114  GtkWidget *_spinbutton;
115  GtkWidget *_combobox;
116 
117  PreferencesData *_prefdata;
118 
119  void update_view();
120 
121  virtual void zoom_fit( void );
122  virtual std::string track_text( double x, double y );
123 
124  virtual void *build_preferences( GtkWidget *notebook );
125  virtual void read_preferences( GtkWidget *notebook, void *pdata );
126 
127  void combobox( GtkComboBox *combobox );
128  void spinbutton( GtkSpinButton *spinbutton );
129  void menuitem_tool_change( GtkToolButton *button );
130  void field_diag( int action, double x, double y );
131  void particle_diag( int action, double x, double y );
132  void darea_motion2( GdkEventMotion *event );
133  void darea_button2( GdkEventButton *event );
134  void field_activate( void );
135  void geom3d_launch( void );
136 
137  static void combobox_signal( GtkComboBox *combobox,
138  gpointer object );
139  static void spinbutton_signal( GtkSpinButton *spinbutton,
140  gpointer object );
141  static void menuitem_tool_change_signal( GtkToolButton *button,
142  gpointer object );
143  static void menuitem_geom3d_signal( GtkToolButton *button,
144  gpointer object );
145  static gboolean darea_motion_signal2( GtkWidget *widget,
146  GdkEventMotion *event,
147  gpointer object );
148  static gboolean darea_button_signal2( GtkWidget *widget,
149  GdkEventButton *event,
150  gpointer object );
151  static void field_toggled( GtkToggleButton *togglebutton,
152  gpointer user_data );
153 
154 public:
155 
158  GTKGeomWindow( class GTKPlotter &plotter,
159  const Geometry &geom,
160  const EpotField *epot,
161  const EpotEfield *efield,
162  const MeshScalarField *scharge,
163  const MeshScalarField *tdens,
164  const VectorField *bfield,
165  const ParticleDataBase *pdb );
166 
169  virtual ~GTKGeomWindow();
170 };
171 
172 
173 #endif
Geometry plotting
GTKGeomWindow(class GTKPlotter &plotter, const Geometry &geom, const EpotField *epot, const EpotEfield *efield, const MeshScalarField *scharge, const MeshScalarField *tdens, const VectorField *bfield, const ParticleDataBase *pdb)
Constructor.
Definition: gtkgeomwindow.cpp:58
virtual ~GTKGeomWindow()
Destructor.
Definition: gtkgeomwindow.cpp:369
Vector field.
Definition: vectorfield.hpp:56
Electric potential field.
Electric potential base electric field.
Scalar field class.
Definition: meshscalarfield.hpp:70
GTK Plotter class.
Definition: gtkplotter.hpp:66
Vector field based on interpolation of electric potential.
Definition: epot_efield.hpp:72
Interactive geometry plotter window.
Definition: gtkgeomwindow.hpp:60
Geometry defining class.
Definition: geometry.hpp:179
Electric potential field.
Definition: epot_field.hpp:55
Base class for interactive plotters.
Definition: gtkframewindow.hpp:61
Geometry plotter class.
Definition: geomplot.hpp:70
Particle database base class.
Definition: particledatabase.hpp:191
Mesh based scalar fields.
Window for GTK plots with frames.
Vector field base.


Reference manual for Ion Beam Simulator 1.0.6
Generated by Doxygen 1.8.5 on Mon Jun 15 2015 09:59:32.