fermisurfer  2.0.0
fermisurfer
variable.hpp
Go to the documentation of this file.
1 /*
2 The MIT License (MIT)
3 
4 Copyright (c) 2014 Mitsuaki KAWAMURA
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 THE SOFTWARE.
23 */
24 /**
25 @file
26 @brief Global variables
27 */
28 #if ! defined(FERMISURFER_VARIABLE_H)
29 #define FERMISURFER_VARIABLE_H
30 
31 #include "menu.hpp"
32 #include <wx/wx.h>
33 #if defined(HAVE_CONFIG_H)
34 #include <config.h>
35 #endif
36 #if defined(HAVE_GL_GL_H)
37 #include <GL/gl.h>
38 #elif defined(HAVE_OPENGL_GL_H)
39 #include <OpenGL/gl.h>
40 #endif
41 
42 /*
43  Input variables
44 */
45 extern int ng0[3]; //!< @f$k@f$-point grid in the input file
46 extern int shiftk[3]; //!< Wherether @f$k@f$-grid is shifted or not
47 extern int nb; //!< The number of Bands
48 extern GLfloat avec[3][3]; //!< Direct lattice vector
49 extern GLfloat bvec[3][3]; //!< Reciprocal lattice vector
50 extern GLfloat ****eig0; //!< Eigenvalues @f$\varepsilon_{n k}@f$[::nb][::ng0[0]][::ng0[1]][::ng0[2]]
51 extern GLfloat *****mat0; //!< Matrix element [::nb][::ng0[0]][::ng0[1]][::ng0[2]][3]
52 /*
53  Interpolation
54 */
55 extern int ng[3]; //!< @b Interpolated @f$k@f$-grids
56 extern GLfloat ****eig; //!< Eigenvalues @f$\varepsilon_{n k}@f$ [::nb][::ng[0]][::ng[1]][::ng[2]]
57 extern GLfloat *****mat; //!< Matrix element @f$\delta_{n k}@f$ [::nb][::ng[0]][::ng[1]][::ng[2]][3]
58 extern GLfloat *****vf; //!< Matrix element @f$\{\bf v}_{{\rm f} n k}@f$ [::nb][::ng[0]][::ng[1]][::ng[2]][3]
59 extern int interpol; //!< Ratio of interpolation
60 /*
61  Switch for some modes
62 */
63 extern int color_scale; //!< Switch for full color scale mode
64 extern int fbz; //!< Switch for 1st Brillouin zone mode
65 extern int nodeline; //!< Switch for node lines
66 extern int lcolorbar; //!< Switch for colorbar
67 extern int lstereo; //!< Switch for the stereogram
68 extern int lmouse; //!< Switch for the mouse function
69 extern int lsection; //!< Switch for the 2D Fermi lines
70 extern int lequator; //!< Switch for equator
71 extern int BZ_number[3]; //!< Number of BZ
72 /*
73  Variables for Brillouin zone boundaries
74 */
75 extern int nbzl; //!< The number of Lines of 1st Brillouin zone
76 extern GLfloat bzl[676][2][3]; //!< Lines of 1st BZ [nbzl(max:26*26=676)][2][3]
77 extern GLfloat bragg[26][3]; //!< Bragg plane vectors
78 extern GLfloat brnrm[26]; //!< Norms of Bragg plane vectors
79 extern GLfloat brnrm_min; //!< Minimum scale of the reciplocal space
80 extern int nbragg; //!< Number of Bragg plane og 1st BZ
81 /*
82  Variables for patchs
83 */
84 extern int *ntri; //!< The number of triangle patch [::nb]
85 extern int *draw_band; //!< Switch for drawn bands [::nb]
86 extern GLfloat** rgb_band; //!< Switch for drawn bands [::nb]
87 extern GLfloat ****nmlp; //!< Normal vector of patchs [::nb][::ntri][3][3]
88 extern GLfloat***** arw;
89 extern GLfloat ****kvp; //!< @f$k@f$-vectors of points [::nb][::ntri][3][3]
90 extern GLfloat **nmlp_rot; //!< Normal vector of patchs [::nb][::ntri*3*3]
91 extern GLfloat **kvp_rot; //!< @f$k@f$-vectors of points [::nb][::ntri*3*3]
92 extern GLfloat **arw_rot;
93 extern GLfloat ****matp; //!< Matrix elements of points [::nb][::ntri][3][3]
94 extern GLfloat **clr; //!< Colors of points [::nb][::ntri*3*4]
95 extern int itet; //!< Counter for tetrahedron
96 extern GLfloat side; //!< Which side is lighted
97 extern GLfloat patch_max; //!< Max value across patch
98 extern GLfloat patch_min; //!< Max value across patch
99 /*
100  Variables for nodeline
101 */
102 extern int *nnl; //!< The number of nodeline
103 extern GLfloat ****kvnl; //!< @f$k@f$-vector of nodeline [::nb][::nnl][2][3]
104 extern GLfloat **kvnl_rot; //!< @f$k@f$-vector of nodeline [::nb][::nnl*2*3]
105 /*
106  2D Fermi line
107 */
108 extern GLfloat secvec[3]; //!< @f$k@f$-vector to define section
109 extern GLfloat secvec_fr[3]; //!< @f$k@f$-vector to define section
110 extern GLfloat secscale; //!< 0.0 (across @f$\Gamma@f$) or 1.0
111 extern GLfloat axis2d[2][3]; //!< @f$k@f$-vector to define section
112 extern int *n2d; //!< Number of line segment
113 extern GLfloat **kv2d; //!< @f$k@f$-vector for 2D plot [::nb][::n2d*2*3]
114 extern GLfloat **clr2d; //!< Matrix element for 2D plot [::nb][::n2d*2*4]
115 extern int nbzl2d; //!< The number of Lines of 1st Brillouin zone
116 extern GLfloat bzl2d[26][3]; //!< Lines of 1st BZ [::nbzl2d (max:26)][3]
117 extern GLfloat bzl2d_proj[26][3]; //!< Lines of 1st BZ [::nbzl2d (max:26)][3], projected into 2D plane
118 /*
119  Equator
120 */
121 extern GLfloat eqvec[3]; //!< @f$k@f$-vector for equator
122 extern GLfloat eqvec_fr[3]; //!< @f$k@f$-vector for equator
123 extern int *nequator; //!< The number of equator
124 extern GLfloat ****kveq; //!< @f$k@f$-vector of equator [::nb][::nequator][2][3]
125 extern GLfloat **kveq_rot; //!< @f$k@f$-vector of equator [::nb][::nequator*2*3]
126 /*
127  Variables for mouse & cursorkey
128 */
129 extern GLfloat sx; //!< Scale of mouse movement
130 extern GLfloat sy; //!< Scale of mouse movement
131 extern int cx; //!< Starting point of drug
132 extern int cy; //!< Starting point of drug
133 extern GLfloat scl; //!< Initial scale
134 extern GLfloat trans[3]; //!< Translation
135 extern GLfloat rot[3][3]; //!< Rotation matrix
136 extern GLfloat thetax; //!< Rotation angle
137 extern GLfloat thetay; //!< Rotation angle
138 extern GLfloat thetaz; //!< Rotation angle
139 extern GLfloat linewidth; //!< BZ/nodal-line/Fermiline width
140 /*
141  Colors
142 */
143 extern GLfloat black[4]; //!< Black color code
144 extern GLfloat gray[4]; //!< Gray color code
145 extern GLfloat wgray[4]; //!< Gray color code
146 extern GLfloat bgray[4]; //!< Gray color code
147 extern GLfloat white[4]; //!< White color code
148 extern GLfloat cyan[4]; //!< Cyan color code
149 extern GLfloat magenta[4]; //!< Magenta color code
150 extern GLfloat yellow[4]; //!< Yellow color code
151 extern GLfloat red[4]; //!< Red color code
152 extern GLfloat green[4]; //!< Green color code
153 extern GLfloat blue[4]; //!< Blue color code
154 extern GLfloat BackGroundColor[4];//!< Background color code
155 extern GLfloat LineColor[4];//!< Line color code
156 extern GLfloat SectionColor[4];//!< Line color code
157 extern GLfloat BarColor[5][4];
158 extern GLfloat arrow[2][3];
159 /*
160  Others
161 */
162 extern int corner[6][4]; //!< Corners of tetrahedron
163 extern GLfloat EF; //!< Fermi energy
164 enum
165 {
166  MOUSE_SCROLL_UP = 3, //!< Mouse wheel up
167  MOUSE_SCROLL_DOWN = 4 //!< Mouse wheel down
168 };
169 extern int nthreads;//!< Number of OpenMP threads
170 extern GLfloat sphere_v[190][2][3];//!< Vertex for wireflame sphere: 10*10+10*90
171 extern GLfloat sphere_r;//!< Radius of wireflame sphere
172 extern GLfloat sphere_c[3];//!< Center of wireflame sphere
173 /*
174 Batch mode
175 */
176 extern wxString batch_name;
177 extern wxString frmsf_file_name;
178 extern int lbatch;
179 
180 extern wxTextCtrl* terminal;
181 extern int refresh_interpol;
182 extern int refresh_patch;
183 extern int refresh_color;
184 extern int refresh_nodeline;
185 extern int refresh_equator;
186 extern int refresh_section;
187 extern int skip_minmax;
188 extern MyFrame* myf;
189 
190 #endif
green
GLfloat green[4]
Green color code.
Definition: fermisurfer.cpp:206
corner
int corner[6][4]
Corners of tetrahedron.
Definition: fermisurfer.cpp:217
bvec
GLfloat bvec[3][3]
Reciprocal lattice vector.
Definition: fermisurfer.cpp:101
refresh_section
int refresh_section
Definition: fermisurfer.cpp:243
patch_max
GLfloat patch_max
Max value across patch.
Definition: fermisurfer.cpp:149
itet
int itet
Counter for tetrahedron.
Definition: fermisurfer.cpp:147
nbzl
int nbzl
The number of Lines of 1st Brillouin zone.
Definition: fermisurfer.cpp:127
ng0
int ng0[3]
-point grid in the input file
Definition: fermisurfer.cpp:97
lstereo
int lstereo
Switch for the stereogram.
Definition: fermisurfer.cpp:119
interpol
int interpol
Ratio of interpolation.
Definition: fermisurfer.cpp:111
rot
GLfloat rot[3][3]
Rotation matrix.
Definition: fermisurfer.cpp:187
sphere_v
GLfloat sphere_v[190][2][3]
Vertex for wireflame sphere: 10*10+10*90.
Definition: fermisurfer.cpp:219
myf
MyFrame * myf
Definition: fermisurfer.cpp:235
trans
GLfloat trans[3]
Translation.
Definition: fermisurfer.cpp:186
eig
GLfloat **** eig
Eigenvalues [nb][ng[0]][ng[1]][ng[2]].
Definition: fermisurfer.cpp:108
BackGroundColor
GLfloat BackGroundColor[4]
Background color code.
Definition: fermisurfer.cpp:208
secscale
GLfloat secscale
0.0 (across ) or 1.0
Definition: fermisurfer.cpp:162
nequator
int * nequator
The number of equator.
Definition: fermisurfer.cpp:175
sx
GLfloat sx
Scale of mouse movement.
Definition: fermisurfer.cpp:181
patch_min
GLfloat patch_min
Max value across patch.
Definition: fermisurfer.cpp:150
batch_name
wxString batch_name
Definition: fermisurfer.cpp:231
kveq
GLfloat **** kveq
-vector of equator [nb][nequator][2][3]
Definition: fermisurfer.cpp:176
yellow
GLfloat yellow[4]
Yellow color code.
Definition: fermisurfer.cpp:204
refresh_equator
int refresh_equator
Definition: fermisurfer.cpp:242
bzl2d
GLfloat bzl2d[26][3]
Lines of 1st BZ [nbzl2d (max:26)][3].
Definition: fermisurfer.cpp:168
color_scale
int color_scale
Switch for full color scale mode.
Definition: fermisurfer.cpp:115
nmlp_rot
GLfloat ** nmlp_rot
Normal vector of patchs [nb][ntri*3*3].
Definition: fermisurfer.cpp:142
nbzl2d
int nbzl2d
The number of Lines of 1st Brillouin zone.
Definition: fermisurfer.cpp:167
nthreads
int nthreads
Number of OpenMP threads.
Definition: fermisurfer.cpp:227
wgray
GLfloat wgray[4]
Gray color code.
Definition: fermisurfer.cpp:199
bgray
GLfloat bgray[4]
Gray color code.
Definition: fermisurfer.cpp:200
nodeline
int nodeline
Switch for node lines.
Definition: fermisurfer.cpp:117
cyan
GLfloat cyan[4]
Cyan color code.
Definition: fermisurfer.cpp:202
nnl
int * nnl
The number of nodeline.
Definition: fermisurfer.cpp:154
sphere_c
GLfloat sphere_c[3]
Center of wireflame sphere.
Definition: fermisurfer.cpp:221
bzl
GLfloat bzl[676][2][3]
Lines of 1st BZ [nbzl(max:26*26=676)][2][3].
Definition: fermisurfer.cpp:128
blue
GLfloat blue[4]
Blue color code.
Definition: fermisurfer.cpp:207
fbz
int fbz
Switch for 1st Brillouin zone mode.
Definition: fermisurfer.cpp:116
frmsf_file_name
wxString frmsf_file_name
Definition: fermisurfer.cpp:232
gray
GLfloat gray[4]
Gray color code.
Definition: fermisurfer.cpp:198
eqvec_fr
GLfloat eqvec_fr[3]
-vector for equator
Definition: fermisurfer.cpp:174
lmouse
int lmouse
Switch for the mouse function.
Definition: fermisurfer.cpp:120
EF
GLfloat EF
Fermi energy.
Definition: fermisurfer.cpp:218
nbragg
int nbragg
Number of Bragg plane og 1st BZ.
Definition: fermisurfer.cpp:132
menu.hpp
terminal
wxTextCtrl * terminal
Definition: fermisurfer.cpp:237
mat
GLfloat ***** mat
Matrix element [nb][ng[0]][ng[1]][ng[2]][3].
Definition: fermisurfer.cpp:109
refresh_color
int refresh_color
Definition: fermisurfer.cpp:240
MOUSE_SCROLL_UP
@ MOUSE_SCROLL_UP
Mouse wheel up.
Definition: variable.hpp:166
scl
GLfloat scl
Initial scale.
Definition: fermisurfer.cpp:185
kvp
GLfloat **** kvp
-vectors of points [nb][ntri][3][3]
Definition: fermisurfer.cpp:140
MyFrame
Definition: menu.hpp:36
cx
int cx
Starting point of drug.
Definition: fermisurfer.cpp:183
secvec
GLfloat secvec[3]
-vector to define section
Definition: fermisurfer.cpp:160
rgb_band
GLfloat ** rgb_band
Switch for drawn bands [nb].
Definition: fermisurfer.cpp:138
kveq_rot
GLfloat ** kveq_rot
-vector of equator [nb][nequator*2*3]
Definition: fermisurfer.cpp:177
bragg
GLfloat bragg[26][3]
Bragg plane vectors.
Definition: fermisurfer.cpp:129
lbatch
int lbatch
Definition: fermisurfer.cpp:233
lequator
int lequator
Switch for equator.
Definition: fermisurfer.cpp:122
bzl2d_proj
GLfloat bzl2d_proj[26][3]
Lines of 1st BZ [nbzl2d (max:26)][3], projected into 2D plane.
Definition: fermisurfer.cpp:169
BZ_number
int BZ_number[3]
Number of BZ.
Definition: fermisurfer.cpp:123
nb
int nb
The number of Bands.
Definition: fermisurfer.cpp:99
ng
int ng[3]
Interpolated -grids
Definition: fermisurfer.cpp:107
kv2d
GLfloat ** kv2d
-vector for 2D plot [nb][n2d*2*3]
Definition: fermisurfer.cpp:165
kvnl_rot
GLfloat ** kvnl_rot
-vector of nodeline [nb][nnl*2*3]
Definition: fermisurfer.cpp:156
thetax
GLfloat thetax
Rotation angle.
Definition: fermisurfer.cpp:190
refresh_nodeline
int refresh_nodeline
Definition: fermisurfer.cpp:241
cy
int cy
Starting point of drug.
Definition: fermisurfer.cpp:184
arrow
GLfloat arrow[2][3]
Definition: fermisurfer.cpp:213
side
GLfloat side
Which side is lighted.
Definition: fermisurfer.cpp:148
refresh_patch
int refresh_patch
Definition: fermisurfer.cpp:239
thetay
GLfloat thetay
Rotation angle.
Definition: fermisurfer.cpp:191
sy
GLfloat sy
Scale of mouse movement.
Definition: fermisurfer.cpp:182
clr2d
GLfloat ** clr2d
Matrix element for 2D plot [nb][n2d*2*4].
Definition: fermisurfer.cpp:166
n2d
int * n2d
Number of line segment.
Definition: fermisurfer.cpp:164
kvnl
GLfloat **** kvnl
-vector of nodeline [nb][nnl][2][3]
Definition: fermisurfer.cpp:155
BarColor
GLfloat BarColor[5][4]
Definition: fermisurfer.cpp:211
black
GLfloat black[4]
Black color code.
Definition: fermisurfer.cpp:197
axis2d
GLfloat axis2d[2][3]
-vector to define section
Definition: fermisurfer.cpp:163
avec
GLfloat avec[3][3]
Direct lattice vector.
Definition: fermisurfer.cpp:100
nmlp
GLfloat **** nmlp
Normal vector of patchs [nb][ntri][3][3].
Definition: fermisurfer.cpp:139
lsection
int lsection
Switch for the 2D Fermi lines.
Definition: fermisurfer.cpp:121
arw_rot
GLfloat ** arw_rot
Definition: fermisurfer.cpp:144
eqvec
GLfloat eqvec[3]
-vector for equator
Definition: fermisurfer.cpp:173
SectionColor
GLfloat SectionColor[4]
Line color code.
Definition: fermisurfer.cpp:210
arw
GLfloat ***** arw
Definition: fermisurfer.cpp:141
clr
GLfloat ** clr
Colors of points [nb][ntri*3*4].
Definition: fermisurfer.cpp:146
ntri
int * ntri
The number of triangle patch [nb].
Definition: fermisurfer.cpp:136
secvec_fr
GLfloat secvec_fr[3]
-vector to define section
Definition: fermisurfer.cpp:161
vf
GLfloat ***** vf
Matrix element [nb][ng[0]][ng[1]][ng[2]][3].
Definition: fermisurfer.cpp:110
mat0
GLfloat ***** mat0
Matrix element [nb][ng0[0]][ng0[1]][ng0[2]][3].
Definition: fermisurfer.cpp:103
thetaz
GLfloat thetaz
Rotation angle.
Definition: fermisurfer.cpp:192
matp
GLfloat **** matp
Matrix elements of points [nb][ntri][3][3].
Definition: fermisurfer.cpp:145
linewidth
GLfloat linewidth
BZ/nodal-line/Fermiline width.
Definition: fermisurfer.cpp:193
magenta
GLfloat magenta[4]
Magenta color code.
Definition: fermisurfer.cpp:203
refresh_interpol
int refresh_interpol
Definition: fermisurfer.cpp:238
white
GLfloat white[4]
White color code.
Definition: fermisurfer.cpp:201
eig0
GLfloat **** eig0
Eigenvalues [nb][ng0[0]][ng0[1]][ng0[2]].
Definition: fermisurfer.cpp:102
lcolorbar
int lcolorbar
Switch for colorbar.
Definition: fermisurfer.cpp:118
red
GLfloat red[4]
Red color code.
Definition: fermisurfer.cpp:205
kvp_rot
GLfloat ** kvp_rot
-vectors of points [nb][ntri*3*3]
Definition: fermisurfer.cpp:143
LineColor
GLfloat LineColor[4]
Line color code.
Definition: fermisurfer.cpp:209
sphere_r
GLfloat sphere_r
Radius of wireflame sphere.
Definition: fermisurfer.cpp:220
brnrm
GLfloat brnrm[26]
Norms of Bragg plane vectors.
Definition: fermisurfer.cpp:130
draw_band
int * draw_band
Switch for drawn bands [nb].
Definition: fermisurfer.cpp:137
shiftk
int shiftk[3]
Wherether -grid is shifted or not.
Definition: fermisurfer.cpp:98
skip_minmax
int skip_minmax
Definition: fermisurfer.cpp:244
brnrm_min
GLfloat brnrm_min
Minimum scale of the reciplocal space.
Definition: fermisurfer.cpp:131
MOUSE_SCROLL_DOWN
@ MOUSE_SCROLL_DOWN
Mouse wheel down.
Definition: variable.hpp:167