fermisurfer  2.0.0
fermisurfer
fermisurfer.cpp
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 /**@file
25  @brief Main routine
26 */
27 /**@mainpage FermiSurfer Main Page
28 
29 Fermisurfer displays Fermi surfaces
30 with a color-plot of the arbitraly matrix element
31 
32 @section Notation
33 
34 - @f$\varepsilon_{n k}@f$ : Energy
35 - @f$\Delta_{n k}@f$ : Any @f$(n, k)@f$-dependent value for the color-plot.
36 - @f$N_b@f$ : Number of bands
37 
38 @section sec_routine Important routines
39 - Main routine: main()
40 - Right click menu : FS_CreateMenu(), FS_ModifyMenu(int status)
41 
42 @section sec_file Important files
43 - Main routine : fermisurfer.cpp
44 - Global valiable : variable.hpp
45 
46 @section sec_flow Flow
47 
48 - main() :
49  - read_file() : Read .frmsf file
50  - compute_patch_segment() : Compute patch and segment
51  - fermi_patch() : Compute patches constructing Fermi surface
52  - display() : Display figures with OpenGL
53 
54 */
55 #if defined(HAVE_CONFIG_H)
56 #include <config.h>
57 #endif
58 #if defined(HAVE_GL_GL_H)
59 #include <GL/gl.h>
60 #elif defined(HAVE_OPENGL_GL_H)
61 #include <OpenGL/gl.h>
62 #endif
63 #include <cstdlib>
64 #include <cstdio>
65 #include <cstring>
66 #if defined(_OPENMP)
67 #include <omp.h>
68 #endif
69 #include <wx/wx.h>
70 #include <wx/cmdline.h>
71 #include "read_file.hpp"
72 #include "menu.hpp"
73 #include "operation.hpp"
74 #include "initialize.hpp"
75 #include "draw.hpp"
76 #include "fermi_patch.hpp"
77 #include "calc_nodeline.hpp"
78 #include "bz_lines.hpp"
79 #include "free_patch.hpp"
80 #include "section.hpp"
81 #include "kumo.hpp"
82 #include "equator.hpp"
83 
84 class MyApp : public wxApp
85 {
86 public:
87  virtual bool OnInit();
88  virtual void OnInitCmdLine(wxCmdLineParser& parser);
89  virtual bool OnCmdLineParsed(wxCmdLineParser& parser);
90 };
91 
92 IMPLEMENT_APP(MyApp)
93 
94 /*
95  Input variables
96 */
97 int ng0[3]; //!< @f$k@f$-point grid in the input file
98 int shiftk[3]; //!< Wherether @f$k@f$-grid is shifted or not
99 int nb; //!< The number of Bands
100 GLfloat avec[3][3]; //!< Direct lattice vector
101 GLfloat bvec[3][3]; //!< Reciprocal lattice vector
102 GLfloat ****eig0; //!< Eigenvalues @f$\varepsilon_{n k}@f$[::nb][::ng0[0]][::ng0[1]][::ng0[2]]
103 GLfloat *****mat0; //!< Matrix element [::nb][::ng0[0]][::ng0[1]][::ng0[2]][3]
104 /*
105  Interpolation
106 */
107 int ng[3]; //!< @b Interpolated @f$k@f$-grids
108 GLfloat ****eig; //!< Eigenvalues @f$\varepsilon_{n k}@f$ [::nb][::ng[0]][::ng[1]][::ng[2]]
109 GLfloat *****mat; //!< Matrix element @f$\delta_{n k}@f$ [::nb][::ng[0]][::ng[1]][::ng[2]][3]
110 GLfloat *****vf; //!< Matrix element @f$\{\bf v}_{{\rm f} n k}@f$ [::nb][::ng[0]][::ng[1]][::ng[2]][3]
111 int interpol = 1; //!< Ratio of interpolation
112 /*
113  Switch for some modes
114 */
115 int color_scale = 1; //!< Switch for full color scale mode
116 int fbz = 1; //!< Switch for 1st Brillouin zone mode
117 int nodeline = 0; //!< Switch for node lines
118 int lcolorbar = 1; //!< Switch for colorbar
119 int lstereo = 1; //!< Switch for the stereogram
120 int lmouse = 1; //!< Switch for the mouse function
121 int lsection = 0; //!< Switch for the 2D Fermi lines
122 int lequator = 0; //!< Switch for equator
123 int BZ_number[3] = { 1, 1, 1 };
124 /*
125  Variables for Brillouin zone boundaries
126 */
127 int nbzl; //!< The number of Lines of 1st Brillouin zone
128 GLfloat bzl[676][2][3]; //!< Lines of 1st BZ [nbzl(max:26*26=676)][2][3]
129 GLfloat bragg[26][3]; //!< Bragg plane vectors
130 GLfloat brnrm[26]; //!< Norms of Bragg plane vectors
131 GLfloat brnrm_min; //!< Minimum scale of the reciplocal space
132 int nbragg; //!< Number of Bragg plane og 1st BZ
133 /*
134  Variables for patchs
135 */
136 int *ntri; //!< The number of triangle patch [::nb]
137 int *draw_band; //!< Switch for drawn bands [::nb]
138 GLfloat**rgb_band; //!< Switch for drawn bands [::nb]
139 GLfloat ****nmlp; //!< Normal vector of patchs [::nb][::ntri][3][3]
140 GLfloat ****kvp; //!< @f$k@f$-vectors of points [::nb][::ntri][3][3]
141 GLfloat***** arw;
142 GLfloat **nmlp_rot; //!< Normal vector of patchs [::nb][::ntri*3*3]
143 GLfloat **kvp_rot; //!< @f$k@f$-vectors of points [::nb][::ntri*3*3]
144 GLfloat** arw_rot;
145 GLfloat ****matp; //!< Matrix elements of points [::nb][::ntri][3][3]
146 GLfloat **clr; //!< Colors of points [::nb][::ntri*3*4]
147 int itet = 0; //!< Counter for tetrahedron
148 GLfloat side = 1.0; //!< Which side is lighted
149 GLfloat patch_max; //!< Max value across patch
150 GLfloat patch_min; //!< Max value across patch
151 /*
152  Variables for nodeline
153 */
154 int *nnl; //!< The number of nodeline
155 GLfloat ****kvnl; //!< @f$k@f$-vector of nodeline [::nb][::nnl][2][3]
156 GLfloat **kvnl_rot; //!< @f$k@f$-vector of nodeline [::nb][::nnl*2*3]
157 /*
158  2D Fermi line
159 */
160 GLfloat secvec[3]; //!< @f$k@f$-vector to define section
161 GLfloat secvec_fr[3]; //!< @f$k@f$-vector to define section
162 GLfloat secscale; //!< 0.0 (across @f$\Gamma@f$) or 1.0
163 GLfloat axis2d[2][3]; //!< @f$k@f$-vector to define section
164 int *n2d; //!< Number of line segment
165 GLfloat **kv2d; //!< @f$k@f$-vector for 2D plot [::nb][::n2d*2*3]
166 GLfloat **clr2d; //!< Matrix element for 2D plot [::nb][::n2d*2*4]
167 int nbzl2d; //!< The number of Lines of 1st Brillouin zone
168 GLfloat bzl2d[26][3]; //!< Lines of 1st BZ [::nbzl2d (max:26)][3]
169 GLfloat bzl2d_proj[26][3]; //!< Lines of 1st BZ [::nbzl2d (max:26)][3], projected into 2D plane
170 /*
171  Equator
172 */
173 GLfloat eqvec[3]; //!< @f$k@f$-vector for equator
174 GLfloat eqvec_fr[3]; //!< @f$k@f$-vector for equator
175 int *nequator; //!< The number of equator
176 GLfloat ****kveq; //!< @f$k@f$-vector of equator [::nb][::nequator][2][3]
177 GLfloat **kveq_rot; //!< @f$k@f$-vector of equator [::nb][::nequator*2*3]
178 /*
179  Variables for mouse & cursorkey
180 */
181 GLfloat sx; //!< Scale of mouse movement
182 GLfloat sy; //!< Scale of mouse movement
183 int cx; //!< Starting point of drug
184 int cy; //!< Starting point of drug
185 GLfloat scl = 1.0; //!< Initial scale
186 GLfloat trans[3] = { 0.0, 0.0, 0.0 }; //!< Translation
187 GLfloat rot[3][3] = { { 1.0, 0.0, 0.0 },
188  { 0.0, 1.0, 0.0 },
189  { 0.0, 0.0, 1.0 } }; //!< Rotation matrix
190 GLfloat thetax = 0.0; //!< Rotation angle
191 GLfloat thetay = 0.0; //!< Rotation angle
192 GLfloat thetaz = 0.0; //!< Rotation angle
193 GLfloat linewidth = 3.0; //!< BZ/nodal-line/Fermiline width
194 /*
195  Colors
196 */
197 GLfloat black[4] = { 0.0, 0.0, 0.0, 1.0 }; //!< Black color code
198 GLfloat gray[4] = { 0.5f, 0.5f, 0.5f, 1.0 }; //!< Gray color code
199 GLfloat wgray[4] = { 0.9f, 0.9f, 0.9f, 1.0 }; //!< Gray color code
200 GLfloat bgray[4] = { 0.1f, 0.1f, 0.1f, 1.0 }; //!< Gray color code
201 GLfloat white[4] = { 1.0, 1.0, 1.0, 1.0 }; //!< White color code
202 GLfloat cyan[4] = { 0.0, 1.0, 1.0, 1.0 }; //!< Cyan color code
203 GLfloat magenta[4] = { 1.0, 0.0, 1.0, 1.0 }; //!< Magenta color code
204 GLfloat yellow[4] = { 1.0, 1.0, 0.0, 1.0 }; //!< Yellow color code
205 GLfloat red[4] = { 1.0, 0.0, 0.0, 1.0 }; //!< Red color code
206 GLfloat green[4] = { 0.0, 1.0, 0.0, 1.0 }; //!< Green color code
207 GLfloat blue[4] = { 0.0, 0.0, 1.0, 1.0 }; //!< Blue color code
208 GLfloat BackGroundColor[4] = { 0.0, 0.0, 0.0, 1.0 };//!< BackGround color code
209 GLfloat LineColor[4] = { 1.0, 1.0, 1.0, 1.0 };//!< Line color code
210 GLfloat SectionColor[4] = { 0.5f, 0.5f, 0.5f, 1.0 };//!< Line color code
211 GLfloat BarColor[5][4] = { { 0.0, 0.0, 1.0, 1.0 } , { 0.0, 1.0, 1.0, 1.0 } ,
212 { 0.0, 1.0, 0.0, 1.0 } ,{ 1.0, 1.0, 0.0, 1.0 } ,{ 1.0, 0.0, 0.0, 1.0 } };
213 GLfloat arrow[2][3];
214 /*
215  Others
216 */
217 int corner[6][4]; //!< Corners of tetrahedron
218 GLfloat EF = 0.0; //!< Fermi energy
219 GLfloat sphere_v[190][2][3]; //!< Vertices for wisreflame sphere
220 GLfloat sphere_r;//!< Radius of wireflame sphere
221 GLfloat sphere_c[3];//!< Center of wireflame sphere
222 enum
223 {
224  MOUSE_SCROLL_UP = 3, //!< Mouse wheel up
225  MOUSE_SCROLL_DOWN = 4 //!< Mouse wheel down
226 };
227 int nthreads;//!< Number of OpenMP threads
228 /*
229 Batch mode
230 */
231 wxString batch_name;
233 int lbatch = 0;
234 
236 
237 wxTextCtrl* terminal;
244 int skip_minmax = 0;
245 int windowx = 1100;
246 int windowy = 850;
247 /**
248  @brief Glut Display function
249  called by glutDisplayFunc
250 */
252 {
253  int iminmax;
254  GLfloat minmax[3][2];
255 
256  printf("\n Batch mode.\n");
257 
258  read_batch();
260 }
261 /**
262  @brief Main routine of FermiSurfer
263 
264 */
266 {
267  int ierr, i0, i1, i2;
268 
269  if (!wxApp::OnInit()) return false;
270 
271  myf = new MyFrame(NULL, argv[1], wxDefaultPosition, wxSize(windowx, windowy));
272 
273  *terminal << wxT("\n");
274  *terminal << wxT("##### Welocome to FermiSurfer ver. ") <<
275  wxT(VERSION) << wxT(" #####\n");
276  *terminal << wxT("\n");
277  if (argc < 2) {
278  printf("\n");
279  printf(" Input file is not specified !\n");
280  printf(" Press any key to exit.\n");
281  ierr = getchar();
282  exit(-1);
283  }
284  /**/
285 #if defined(_OPENMP)
286 #pragma omp parallel
287 #pragma omp master
288  nthreads = omp_get_num_threads();
289 #else
290  nthreads = 1;
291 #endif
292  *terminal << wxT(" Number of threads : ") << nthreads << wxT("\n");
293  *terminal << wxT("\n");
294  *terminal << wxT(" Initialize variables ...\n");
295  *terminal << wxT("\n");
296  /*
297  Input from BXSF or FRMSF file
298  */
299  if (frmsf_file_name.AfterLast(wxUniChar('.')).CmpNoCase(wxT("bxsf")) == 0) {
300  read_bxsf();
301  }
302  else {
304  if (color_scale == 0)color_scale = 4;
305  }
306  /*
307  Malloc only nb
308  */
309  kvp = new GLfloat ***[nb];
310  kvp_rot = new GLfloat *[nb];
311  nmlp = new GLfloat * **[nb];
312  nmlp_rot = new GLfloat *[nb];
313  matp = new GLfloat * **[nb];
314  clr = new GLfloat *[nb];
315  arw = new GLfloat * ***[nb];
316  arw_rot = new GLfloat *[nb];
317  kvnl = new GLfloat * **[nb];
318  kvnl_rot = new GLfloat *[nb];
319  kv2d = new GLfloat * [nb];
320  clr2d = new GLfloat * [nb];
321  kveq = new GLfloat *** [nb];
322  kveq_rot = new GLfloat *[nb];
323  /**/
324  interpol_energy();
325  bragg_vector();
326  init_corner();
327  myf->modify_band();
328  /*
329  Brillouin zone
330  */
331  bz_lines();
332  calc_2dbz();
333  /**/
334  max_and_min_bz();
335  /**/
337  /*
338  Description
339  */
340  *terminal << wxT("\n");
341  *terminal << wxT(" ## How to handle ###################\n");
342  *terminal << wxT("\n");
343  *terminal << wxT(" mouse drag : Rotate objects\n");
344  *terminal << wxT(" mousewheel : Resize objects\n");
345  *terminal << wxT(" cursorkey or w,a,s,d : Move objects\n");
346  *terminal << wxT("\n");
347  //
348  // Variables for wireflame sphere
349  //
350  for (i0 = 0; i0 < 190; i0++)
351  for (i1 = 0; i1 < 2; i1++)
352  for (i2 = 0; i2 < 3; i2++)
353  sphere_v[i0][i1][i2] = 0.0f;
354  for (i0 = 0; i0 < 3; i0++) sphere_c[i0] = 0.0f;
355  sphere_r = 0.0f;
356  //
357  if (lbatch == 1) {
358  batch_draw();
359  }
360  return true;
361 } /* main */
362 
363 void MyApp::OnInitCmdLine(wxCmdLineParser& parser)
364 {
365  wxApp::OnInitCmdLine(parser);
366 
367  parser.AddParam("FRMSF file to plot.",
368  wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION_MANDATORY);
369  parser.AddParam("Batch file",
370  wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
371  parser.AddParam("Window Size x",
372  wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
373  parser.AddParam("Window Size y",
374  wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL);
375 }
376 
377 bool MyApp::OnCmdLineParsed(wxCmdLineParser& parser)
378 {
379  if (parser.GetParamCount() > 0) {
380  frmsf_file_name = parser.GetParam(0);
381  if (parser.GetParamCount() > 1) {
382  batch_name = parser.GetParam(1);
383  lbatch = 1;
384  if (parser.GetParamCount() > 2) {
385  windowx = wxAtoi(parser.GetParam(2));
386  if (parser.GetParamCount() > 3) {
387  windowy = wxAtoi(parser.GetParam(3));
388  }
389  }
390  }
391  }
392 
393  return wxApp::OnCmdLineParsed(parser);
394 }
interpol_energy
void interpol_energy()
Interpolation of energy and matrix with the French-curve (Kumo) interpolation.
Definition: kumo.cpp:66
secvec
GLfloat secvec[3]
-vector to define section
Definition: fermisurfer.cpp:160
magenta
GLfloat magenta[4]
Magenta color code.
Definition: fermisurfer.cpp:203
operation.hpp
eig0
GLfloat **** eig0
Eigenvalues [nb][ng0[0]][ng0[1]][ng0[2]].
Definition: fermisurfer.cpp:102
kvp
GLfloat **** kvp
-vectors of points [nb][ntri][3][3]
Definition: fermisurfer.cpp:140
wgray
GLfloat wgray[4]
Gray color code.
Definition: fermisurfer.cpp:199
bgray
GLfloat bgray[4]
Gray color code.
Definition: fermisurfer.cpp:200
side
GLfloat side
Which side is lighted.
Definition: fermisurfer.cpp:148
refresh_section
int refresh_section
Definition: fermisurfer.cpp:243
green
GLfloat green[4]
Green color code.
Definition: fermisurfer.cpp:206
refresh_equator
int refresh_equator
Definition: fermisurfer.cpp:242
n2d
int * n2d
Number of line segment.
Definition: fermisurfer.cpp:164
section.hpp
mat0
GLfloat ***** mat0
Matrix element [nb][ng0[0]][ng0[1]][ng0[2]][3].
Definition: fermisurfer.cpp:103
read_file.hpp
frmsf_file_name
wxString frmsf_file_name
Definition: fermisurfer.cpp:232
read_file
int read_file()
Input from Fermi surface file.
Definition: read_file.cpp:125
eqvec_fr
GLfloat eqvec_fr[3]
-vector for equator
Definition: fermisurfer.cpp:174
kveq_rot
GLfloat ** kveq_rot
-vector of equator [nb][nequator*2*3]
Definition: fermisurfer.cpp:177
ntri
int * ntri
The number of triangle patch [nb].
Definition: fermisurfer.cpp:136
kv2d
GLfloat ** kv2d
-vector for 2D plot [nb][n2d*2*3]
Definition: fermisurfer.cpp:165
interpol
int interpol
Ratio of interpolation.
Definition: fermisurfer.cpp:111
linewidth
GLfloat linewidth
BZ/nodal-line/Fermiline width.
Definition: fermisurfer.cpp:193
bragg_vector
void bragg_vector()
Compute Bragg vetor.
Definition: initialize.cpp:204
secvec_fr
GLfloat secvec_fr[3]
-vector to define section
Definition: fermisurfer.cpp:161
trans
GLfloat trans[3]
Translation.
Definition: fermisurfer.cpp:186
black
GLfloat black[4]
Black color code.
Definition: fermisurfer.cpp:197
axis2d
GLfloat axis2d[2][3]
-vector to define section
Definition: fermisurfer.cpp:163
cy
int cy
Starting point of drug.
Definition: fermisurfer.cpp:184
draw.hpp
EF
GLfloat EF
Fermi energy.
Definition: fermisurfer.cpp:218
MOUSE_SCROLL_DOWN
@ MOUSE_SCROLL_DOWN
Mouse wheel down.
Definition: fermisurfer.cpp:225
lstereo
int lstereo
Switch for the stereogram.
Definition: fermisurfer.cpp:119
patch_max
GLfloat patch_max
Max value across patch.
Definition: fermisurfer.cpp:149
skip_minmax
int skip_minmax
Definition: fermisurfer.cpp:244
thetax
GLfloat thetax
Rotation angle.
Definition: fermisurfer.cpp:190
refresh_patch
int refresh_patch
Definition: fermisurfer.cpp:239
LineColor
GLfloat LineColor[4]
Line color code.
Definition: fermisurfer.cpp:209
sphere_c
GLfloat sphere_c[3]
Center of wireflame sphere.
Definition: fermisurfer.cpp:221
MyFrame::modify_band
void modify_band()
Definition: menu.cpp:1271
read_batch
void read_batch()
Definition: read_file.cpp:249
SectionColor
GLfloat SectionColor[4]
Line color code.
Definition: fermisurfer.cpp:210
avec
GLfloat avec[3][3]
Direct lattice vector.
Definition: fermisurfer.cpp:100
bz_lines.hpp
batch_name
wxString batch_name
Definition: fermisurfer.cpp:231
arw_rot
GLfloat ** arw_rot
Definition: fermisurfer.cpp:144
nmlp
GLfloat **** nmlp
Normal vector of patchs [nb][ntri][3][3].
Definition: fermisurfer.cpp:139
menu.hpp
color_scale
int color_scale
Switch for full color scale mode.
Definition: fermisurfer.cpp:115
kveq
GLfloat **** kveq
-vector of equator [nb][nequator][2][3]
Definition: fermisurfer.cpp:176
kvp_rot
GLfloat ** kvp_rot
-vectors of points [nb][ntri*3*3]
Definition: fermisurfer.cpp:143
arrow
GLfloat arrow[2][3]
Definition: fermisurfer.cpp:213
compute_patch_segment
void compute_patch_segment()
Definition: menu.cpp:53
bragg
GLfloat bragg[26][3]
Bragg plane vectors.
Definition: fermisurfer.cpp:129
free_patch.hpp
clr
GLfloat ** clr
Colors of points [nb][ntri*3*4].
Definition: fermisurfer.cpp:146
arw
GLfloat ***** arw
Definition: fermisurfer.cpp:141
thetaz
GLfloat thetaz
Rotation angle.
Definition: fermisurfer.cpp:192
nodeline
int nodeline
Switch for node lines.
Definition: fermisurfer.cpp:117
MyFrame
Definition: menu.hpp:36
calc_nodeline.hpp
BackGroundColor
GLfloat BackGroundColor[4]
BackGround color code.
Definition: fermisurfer.cpp:208
sx
GLfloat sx
Scale of mouse movement.
Definition: fermisurfer.cpp:181
kumo.hpp
fbz
int fbz
Switch for 1st Brillouin zone mode.
Definition: fermisurfer.cpp:116
initialize.hpp
read_bxsf
void read_bxsf()
Definition: read_file.cpp:408
MyApp::OnInitCmdLine
virtual void OnInitCmdLine(wxCmdLineParser &parser)
Definition: fermisurfer.cpp:363
windowy
int windowy
Definition: fermisurfer.cpp:246
lbatch
int lbatch
Definition: fermisurfer.cpp:233
rgb_band
GLfloat ** rgb_band
Switch for drawn bands [nb].
Definition: fermisurfer.cpp:138
bzl2d
GLfloat bzl2d[26][3]
Lines of 1st BZ [nbzl2d (max:26)][3].
Definition: fermisurfer.cpp:168
lequator
int lequator
Switch for equator.
Definition: fermisurfer.cpp:122
MyApp::OnInit
virtual bool OnInit()
Main routine of FermiSurfer.
Definition: fermisurfer.cpp:265
kvnl
GLfloat **** kvnl
-vector of nodeline [nb][nnl][2][3]
Definition: fermisurfer.cpp:155
init_corner
void init_corner()
Specify corners of tetrahedron.
Definition: initialize.cpp:43
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
red
GLfloat red[4]
Red color code.
Definition: fermisurfer.cpp:205
sy
GLfloat sy
Scale of mouse movement.
Definition: fermisurfer.cpp:182
bzl
GLfloat bzl[676][2][3]
Lines of 1st BZ [nbzl(max:26*26=676)][2][3].
Definition: fermisurfer.cpp:128
MyApp::OnCmdLineParsed
virtual bool OnCmdLineParsed(wxCmdLineParser &parser)
Definition: fermisurfer.cpp:377
refresh_color
int refresh_color
Definition: fermisurfer.cpp:240
itet
int itet
Counter for tetrahedron.
Definition: fermisurfer.cpp:147
sphere_v
GLfloat sphere_v[190][2][3]
Vertices for wisreflame sphere.
Definition: fermisurfer.cpp:219
nb
int nb
The number of Bands.
Definition: fermisurfer.cpp:99
nbzl
int nbzl
The number of Lines of 1st Brillouin zone.
Definition: fermisurfer.cpp:127
mat
GLfloat ***** mat
Matrix element [nb][ng[0]][ng[1]][ng[2]][3].
Definition: fermisurfer.cpp:109
max_and_min_bz
void max_and_min_bz()
Print max and minimum in the whole Brillouine zone.
Definition: initialize.cpp:262
brnrm_min
GLfloat brnrm_min
Minimum scale of the reciplocal space.
Definition: fermisurfer.cpp:131
gray
GLfloat gray[4]
Gray color code.
Definition: fermisurfer.cpp:198
MOUSE_SCROLL_UP
@ MOUSE_SCROLL_UP
Mouse wheel up.
Definition: fermisurfer.cpp:224
matp
GLfloat **** matp
Matrix elements of points [nb][ntri][3][3].
Definition: fermisurfer.cpp:145
eqvec
GLfloat eqvec[3]
-vector for equator
Definition: fermisurfer.cpp:173
bzl2d_proj
GLfloat bzl2d_proj[26][3]
Lines of 1st BZ [nbzl2d (max:26)][3], projected into 2D plane.
Definition: fermisurfer.cpp:169
blue
GLfloat blue[4]
Blue color code.
Definition: fermisurfer.cpp:207
draw_band
int * draw_band
Switch for drawn bands [nb].
Definition: fermisurfer.cpp:137
corner
int corner[6][4]
Corners of tetrahedron.
Definition: fermisurfer.cpp:217
eig
GLfloat **** eig
Eigenvalues [nb][ng[0]][ng[1]][ng[2]].
Definition: fermisurfer.cpp:108
bvec
GLfloat bvec[3][3]
Reciprocal lattice vector.
Definition: fermisurfer.cpp:101
batch_draw
void batch_draw()
Glut Display function called by glutDisplayFunc.
Definition: fermisurfer.cpp:251
myf
MyFrame * myf
Definition: fermisurfer.cpp:235
kvnl_rot
GLfloat ** kvnl_rot
-vector of nodeline [nb][nnl*2*3]
Definition: fermisurfer.cpp:156
vf
GLfloat ***** vf
Matrix element [nb][ng[0]][ng[1]][ng[2]][3].
Definition: fermisurfer.cpp:110
sphere_r
GLfloat sphere_r
Radius of wireflame sphere.
Definition: fermisurfer.cpp:220
cyan
GLfloat cyan[4]
Cyan color code.
Definition: fermisurfer.cpp:202
brnrm
GLfloat brnrm[26]
Norms of Bragg plane vectors.
Definition: fermisurfer.cpp:130
nnl
int * nnl
The number of nodeline.
Definition: fermisurfer.cpp:154
lmouse
int lmouse
Switch for the mouse function.
Definition: fermisurfer.cpp:120
clr2d
GLfloat ** clr2d
Matrix element for 2D plot [nb][n2d*2*4].
Definition: fermisurfer.cpp:166
equator.hpp
refresh_interpol
int refresh_interpol
Definition: fermisurfer.cpp:238
white
GLfloat white[4]
White color code.
Definition: fermisurfer.cpp:201
BarColor
GLfloat BarColor[5][4]
Definition: fermisurfer.cpp:211
calc_2dbz
void calc_2dbz()
Compute boundary of 2D BZ.
Definition: section.cpp:181
BZ_number
int BZ_number[3]
Number of BZ.
Definition: fermisurfer.cpp:123
ng
int ng[3]
Interpolated -grids
Definition: fermisurfer.cpp:107
thetay
GLfloat thetay
Rotation angle.
Definition: fermisurfer.cpp:191
rot
GLfloat rot[3][3]
Rotation matrix.
Definition: fermisurfer.cpp:187
secscale
GLfloat secscale
0.0 (across ) or 1.0
Definition: fermisurfer.cpp:162
lcolorbar
int lcolorbar
Switch for colorbar.
Definition: fermisurfer.cpp:118
bz_lines
void bz_lines()
Compute Brillouin zone boundariy lines.
Definition: bz_lines.cpp:163
fermi_patch.hpp
terminal
wxTextCtrl * terminal
Definition: fermisurfer.cpp:237
ng0
int ng0[3]
-point grid in the input file
Definition: fermisurfer.cpp:97
yellow
GLfloat yellow[4]
Yellow color code.
Definition: fermisurfer.cpp:204
cx
int cx
Starting point of drug.
Definition: fermisurfer.cpp:183
MyApp
Definition: fermisurfer.cpp:84
scl
GLfloat scl
Initial scale.
Definition: fermisurfer.cpp:185
refresh_patch_segment
void refresh_patch_segment()
Definition: menu.cpp:89
lsection
int lsection
Switch for the 2D Fermi lines.
Definition: fermisurfer.cpp:121
nthreads
int nthreads
Number of OpenMP threads.
Definition: fermisurfer.cpp:227
patch_min
GLfloat patch_min
Max value across patch.
Definition: fermisurfer.cpp:150
windowx
int windowx
Definition: fermisurfer.cpp:245
nbragg
int nbragg
Number of Bragg plane og 1st BZ.
Definition: fermisurfer.cpp:132
shiftk
int shiftk[3]
Wherether -grid is shifted or not.
Definition: fermisurfer.cpp:98
nequator
int * nequator
The number of equator.
Definition: fermisurfer.cpp:175
refresh_nodeline
int refresh_nodeline
Definition: fermisurfer.cpp:241