fermisurfer  2.0.0
fermisurfer
free_patch.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 Refresh patch
26 */
27 #if defined(HAVE_CONFIG_H)
28 #include <config.h>
29 #endif
30 #if defined(HAVE_GL_GL_H)
31 #include <GL/gl.h>
32 #elif defined(HAVE_OPENGL_GL_H)
33 #include <OpenGL/gl.h>
34 #endif
35 #include <cstdlib>
36 #include <cstdio>
37 #include <cstring>
38 #if defined(_OPENMP)
39 #include <omp.h>
40 #endif
41 #include <wx/wx.h>
42 #include <cstdlib>
43 #include <cmath>
44 #include <cstdio>
45 #include "basic_math.hpp"
46 #include "menu.hpp"
47 #include "variable.hpp"
48 /**
49  @brief Free variables for patch before new patch is computed
50 
51  Free : ::nmlp, ::matp, ::clr, ::kvp, ::nmlp_rot, ::kvp_rot,
52  ::kvnl, ::kvnl_rot, ::kv2d, ::clr2d
53 */
54 void free_patch()
55 {
56  int ib, i0, i1, i2;
57  /*
58  Fermi patch
59  */
60  if (refresh_patch == 1) {
61  for (ib = 0; ib < nb; ++ib) {
62  for (i0 = 0; i0 < ntri[ib]; ++i0) {
63  for (i1 = 0; i1 < 3; ++i1) {
64  for (i2 = 0; i2 < 2; ++i2)
65  delete[] arw[ib][i0][i1][i2];
66  delete[] nmlp[ib][i0][i1];
67  delete[] matp[ib][i0][i1];
68  delete[] kvp[ib][i0][i1];
69  delete[] arw[ib][i0][i1];
70  }
71  delete[] nmlp[ib][i0];
72  delete[] matp[ib][i0];
73  delete[] kvp[ib][i0];
74  delete[] arw[ib][i0];
75  }
76  delete[] nmlp[ib];
77  delete[] matp[ib];
78  delete[] clr[ib];
79  delete[] kvp[ib];
80  delete[] arw[ib];
81  delete[] nmlp_rot[ib];
82  delete[] kvp_rot[ib];
83  delete[] arw_rot[ib];
84  }
85  }/*if (refresh_patch == 1)*/
86  /*
87  Nodal line
88  */
89  if (refresh_nodeline == 1) {
90  for (ib = 0; ib < nb; ++ib) {
91  for (i0 = 0; i0 < nnl[ib]; ++i0) {
92  for (i1 = 0; i1 < 2; ++i1) {
93  delete[] kvnl[ib][i0][i1];
94  }/*for (i1 = 0; i1 < 2; ++i1)*/
95  delete[] kvnl[ib][i0];
96  }/*for (i0 = 0; i0 < nnl[ib]; ++i0)*/
97  delete[] kvnl[ib];
98  delete[] kvnl_rot[ib];
99  }/*for (ib = 0; ib < nb; ++ib)*/
100  }/*if (refresh_nodeline == 1)*/
101  /*
102  2D Fermi line
103  */
104  if (refresh_section == 1) {
105  for (ib = 0; ib < nb; ++ib) {
106  delete[] kv2d[ib];
107  delete[] clr2d[ib];
108  }/*for (ib = 0; ib < nb; ++ib)*/
109  }/*if (refresh_section == 1)*/
110  /*
111  equator
112  */
113  if (refresh_equator == 1) {
114  for (ib = 0; ib < nb; ++ib) {
115  for (i0 = 0; i0 < nequator[ib]; ++i0) {
116  for (i1 = 0; i1 < 2; ++i1) {
117  delete[] kveq[ib][i0][i1];
118  }/*for (i1 = 0; i1 < 2; ++i1)*/
119  delete[] kveq[ib][i0];
120  }/*for (i0 = 0; i0 < nequator[ib]; ++i0)*/
121  delete[] kveq[ib];
122  delete[] kveq_rot[ib];
123  }/*for (ib = 0; ib < nb; ++ib)*/
124  }/*if (refresh_equator == 1)*/
125 }/*void free_patch()*/
126 /**
127  @brief Compute Max. & Min. of matrix elements.
128  Compute color of each patch
129 
130  Modify : ::clr
131 */
132 void max_and_min()
133 {
134  int itri, ithread;
135  GLfloat *max_th, *min_th;
136 
137  max_th = new GLfloat[nthreads];
138  min_th = new GLfloat[nthreads];
139 
140  *terminal << wxT("\n");
141  if (color_scale == 1) *terminal << wxT(" ## Color Scale as Input Quantity (Real) #############\n");
142  else if (color_scale == 2) *terminal << wxT(" ## Color Scale as Input Quantity (Complex) #############\n");
143  else if (color_scale == 3) *terminal << wxT(" ## Color Scale as Fermi Velocity #############\n");
144  else if (color_scale == 4) *terminal << wxT(" ## Color Scale as Band Index #############\n");
145  else if (color_scale == 5) *terminal << wxT(" ## Gray Scale as Input Quantity (Real) #############\n");
146  else if (color_scale == 6) *terminal << wxT(" ## Gray Scale as Fermi Velocity #############\n");
147  *terminal << wxT("\n");
148  /*
149  Search max and min.
150  */
151  if (color_scale == 1 || color_scale == 6) {
152 #pragma omp parallel default(none) \
153 shared(nb,ntri,matp,max_th,min_th) private(itri,ithread)
154  {
155  int i, ib;
156 
157  ithread = get_thread();
158  max_th[ithread] = -1.0e10f;
159  min_th[ithread] = 1.0e10f;
160 
161  for (ib = 0; ib < nb; ib++) {
162 #pragma omp for
163  for (itri = 0; itri < ntri[ib]; ++itri) {
164  for (i = 0; i < 3; ++i) {
165  if (matp[ib][itri][i][0] > max_th[ithread]) max_th[ithread] = matp[ib][itri][i][0];
166  if (matp[ib][itri][i][0] < min_th[ithread]) min_th[ithread] = matp[ib][itri][i][0];
167  }
168  }/*for (itri = 0; itri < ntri[ib]; ++itri)*/
169  }/*for (ib = 0; ib < nb; ib++)*/
170  }/*End of parallel region*/
171  /**/
172  patch_max = max_th[0];
173  patch_min = min_th[0];
174  for (ithread = 1; ithread < nthreads; ithread++) {
175  if (max_th[ithread] > patch_max) patch_max = max_th[ithread];
176  if (min_th[ithread] < patch_min) patch_min = min_th[ithread];
177  }
178  }/*if (color_scale == 0 || color_scale == 4)*/
179  else if (color_scale == 2) {
180 #pragma omp parallel default(none) \
181 shared(nb,ntri,matp,max_th,min_th) private(itri,ithread)
182  {
183  int i, ib;
184  GLfloat abs;
185 
186  ithread = get_thread();
187  max_th[ithread] = -1.0e10f;
188  min_th[ithread] = 1.0e10f;
189 
190  for (ib = 0; ib < nb; ib++) {
191 #pragma omp for
192  for (itri = 0; itri < ntri[ib]; ++itri) {
193  for (i = 0; i < 3; ++i) {
194  abs = sqrtf(matp[ib][itri][i][0] * matp[ib][itri][i][0]
195  + matp[ib][itri][i][1] * matp[ib][itri][i][1]);
196  if (abs > max_th[ithread]) max_th[ithread] = abs;
197  if (abs < min_th[ithread]) min_th[ithread] = abs;
198  }
199  }/*for (itri = 0; itri < ntri[ib]; ++itri)*/
200  }/*for (ib = 0; ib < nb; ib++)*/
201  }/*End of parallel region*/
202  /**/
203  patch_min = min_th[0];
204  patch_max = max_th[0];
205  for (ithread = 1; ithread < nthreads; ithread++) {
206  if (max_th[ithread] < patch_min) patch_min = max_th[ithread];
207  if (max_th[ithread] > patch_max) patch_max = max_th[ithread];
208  }
209  }/*if (color_scale == 2)*/
210  else if (color_scale == 3) {
211 #pragma omp parallel default(none) \
212 shared(nb,ntri,matp,min_th,max_th) private(itri,ithread)
213  {
214  int i, ib;
215  GLfloat abs;
216 
217  ithread = get_thread();
218  min_th[ithread] = 1.0e10f;
219  max_th[ithread] = -1.0e10f;
220 
221  for (ib = 0; ib < nb; ib++) {
222 #pragma omp for
223  for (itri = 0; itri < ntri[ib]; ++itri) {
224  for (i = 0; i < 3; ++i) {
225  abs = sqrtf(matp[ib][itri][i][0] * matp[ib][itri][i][0]
226  + matp[ib][itri][i][1] * matp[ib][itri][i][1]
227  + matp[ib][itri][i][2] * matp[ib][itri][i][2]);
228  if (abs > max_th[ithread]) max_th[ithread] = abs;
229  if (abs < min_th[ithread]) min_th[ithread] = abs;
230  }
231  }/*for (itri = 0; itri < ntri[ib]; ++itri)*/
232  }/*for (ib = 0; ib < nb; ib++)*/
233  }/*End of parallel region*/
234  /**/
235  patch_max = max_th[0];
236  patch_min = min_th[0];
237  for (ithread = 1; ithread < nthreads; ithread++) {
238  if (max_th[ithread] > patch_max) patch_max = max_th[ithread];
239  if (min_th[ithread] < patch_min) patch_min = min_th[ithread];
240  }
241  }/*if (color_scale == 3)*/
242  else if (color_scale == 4 || color_scale == 7) {
243 #pragma omp parallel default(none) \
244 shared(nb,ntri,nmlp,max_th,min_th) private(itri,ithread)
245  {
246  int i, j, ib;
247  GLfloat norm;
248 
249  ithread = get_thread();
250  max_th[ithread] = -1.0e10f;
251  min_th[ithread] = 1.0e10f;
252 
253  for (ib = 0; ib < nb; ib++) {
254 #pragma omp for
255  for (itri = 0; itri < ntri[ib]; ++itri) {
256  for (i = 0; i < 3; ++i) {
257  norm = 0.0f;
258  for (j = 0; j < 3; ++j) norm += nmlp[ib][itri][i][j]*nmlp[ib][itri][i][j];
259  norm = sqrtf(norm);
260 
261  if (norm > max_th[ithread]) max_th[ithread] = norm;
262  if (norm < min_th[ithread]) min_th[ithread] = norm;
263  }
264  }/*for (itri = 0; itri < ntri[ib]; ++itri)*/
265  }/*for (ib = 0; ib < nb; ib++)*/
266  }/*End of parallel region*/
267  /**/
268  patch_max = max_th[0];
269  patch_min = min_th[0];
270  for (ithread = 1; ithread < nthreads; ithread++) {
271  if (max_th[ithread] > patch_max) patch_max = max_th[ithread];
272  if (min_th[ithread] < patch_min) patch_min = min_th[ithread];
273  }
274  }/*if (color_scale == 5 || color_scale == 6)*/
275 
276  delete[] max_th;
277  delete[] min_th;
278 
279  myf->textbox_min->ChangeValue(wxString::Format(wxT("%f"), patch_min));
280  myf->textbox_max->ChangeValue(wxString::Format(wxT("%f"), patch_max));
281 }/* max_and_min */
282  /**
283  @brief Compute Max. & Min. of matrix elements.
284  Compute color of each patch
285 
286  Modify : ::clr
287  */
288 void paint()
289 {
290  int itri, j;
291  GLfloat origin[4];
292 
293  if (color_scale == 1) {
294 #pragma omp parallel default(none) \
295 shared(nb,ntri,matp,clr,BarColor,patch_max,patch_min) \
296 private(itri, j)
297  {
298  int i, ib;
299  GLfloat mat2;
300 
301  for (ib = 0; ib < nb; ib++) {
302 #pragma omp for nowait
303  for (itri = 0; itri < ntri[ib]; ++itri) {
304  for (i = 0; i < 3; ++i) {
305  /**/
306  mat2 = (matp[ib][itri][i][0] - patch_min) / (patch_max - patch_min);
307  mat2 = mat2 * 4.0f;
308  /**/
309  if (mat2 <= 1.0) {
310  for (j = 0; j < 4; ++j) clr[ib][j + 4 * i + 12 * itri]
311  = BarColor[1][j] * mat2 + BarColor[0][j] * (1.0f - mat2);
312  }
313  else if (mat2 <= 2.0) {
314  mat2 = mat2 - 1.0f;
315  for (j = 0; j < 4; ++j) clr[ib][j + 4 * i + 12 * itri]
316  = BarColor[2][j] * mat2 + BarColor[1][j] * (1.0f - mat2);
317  }
318  else if (mat2 <= 3.0) {
319  mat2 = mat2 - 2.0f;
320  for (j = 0; j < 4; ++j) clr[ib][j + 4 * i + 12 * itri]
321  = BarColor[3][j] * mat2 + BarColor[2][j] * (1.0f - mat2);
322  }
323  else {
324  mat2 = mat2 - 3.0f;
325  for (j = 0; j < 4; ++j) clr[ib][j + 4 * i + 12 * itri]
326  = BarColor[4][j] * mat2 + BarColor[3][j] * (1.0f - mat2);
327  }
328  }/*for (i = 0; i < 3; ++i)*/
329  }/*for (itri = 0; itri < ntri[ib]; ++itri)*/
330  }/*for (ib = 0; ib < nb; ib++)*/
331  }/*End of parallel region*/
332  }/*if (color_scale == 1 || color_scale == 2)*/
333  else if (color_scale == 2) {
334 
335  for (j = 0; j < 4; ++j) origin[j] = 1.0f - BackGroundColor[j];
336 
337 #pragma omp parallel default(none) \
338 shared(nb,ntri,matp,clr,cyan,blue,green,yellow,red,magenta,bgray,wgray,patch_max,origin) \
339 private(itri, j)
340  {
341  int i, ib;
342  GLfloat theta, abs, theta2;
343 
344  for (ib = 0; ib < nb; ib++) {
345  for (itri = 0; itri < ntri[ib]; ++itri) {
346  for (i = 0; i < 3; ++i) {
347  /**/
348  abs = sqrtf(matp[ib][itri][i][0] * matp[ib][itri][i][0]
349  + matp[ib][itri][i][1] * matp[ib][itri][i][1]);
350  if (abs / patch_max < 0.00001) theta = 0.0f;
351  else if (matp[ib][itri][i][1] > 0.0) theta = acosf(matp[ib][itri][i][0] / abs);
352  else theta = -acosf(matp[ib][itri][i][0] / abs);
353  abs /= patch_max;
354  theta = 3.0f * theta / acosf(-1.0f);
355  /**/
356  if (-3.0f <= theta && theta < -2.0f) {
357  theta2 = theta + 3.0f;
358  for (j = 0; j < 4; ++j)
359  clr[ib][j + 4 * i + 12 * itri] = blue[j] * theta2 + cyan[j] * (1.0f - theta2);
360  }
361  else if (-2.0f <= theta && theta < -1.0f) {
362  theta2 = theta + 2.0f;
363  for (j = 0; j < 4; ++j)
364  clr[ib][j + 4 * i + 12 * itri] = magenta[j] * theta2 + blue[j] * (1.0f - theta2);
365  }
366  else if (-1.0f <= theta && theta < 0.0f) {
367  theta2 = theta + 1.0f;
368  for (j = 0; j < 4; ++j)
369  clr[ib][j + 4 * i + 12 * itri] = red[j] * theta2 + magenta[j] * (1.0f - theta2);
370  }
371  else if (0.0f <= theta && theta < 1.0f) {
372  theta2 = theta;
373  for (j = 0; j < 4; ++j)
374  clr[ib][j + 4 * i + 12 * itri] = yellow[j] * theta2 + red[j] * (1.0f - theta2);
375  }
376  else if (1.0f <= theta && theta < 2.0f) {
377  theta2 = theta - 1.0f;
378  for (j = 0; j < 4; ++j)
379  clr[ib][j + 4 * i + 12 * itri] = green[j] * theta2 + yellow[j] * (1.0f - theta2);
380  }
381  else {
382  theta2 = theta - 2.0f;
383  for (j = 0; j < 4; ++j)
384  clr[ib][j + 4 * i + 12 * itri] = cyan[j] * theta2 + green[j] * (1.0f - theta2);
385  }
386  clr[ib][j + 4 * i + 12 * itri] = clr[ib][j + 4 * i + 12 * itri] * abs + origin[j] * (1.0f - abs);
387 
388  }/*for (i = 0; i < 3; ++i)*/
389  }/*for (itri = 0; itri < ntri[ib]; ++itri)*/
390  }/*for (ib = 0; ib < nb; ib++)*/
391  }/*End of parallel region*/
392  }/*if (color_scale == 2)*/
393  else if (color_scale == 4) {
394 #pragma omp parallel default(none) \
395 shared(nb,ntri,nmlp,clr,BarColor,patch_max,patch_min) \
396 private(itri, j)
397  {
398  int i, ib;
399  GLfloat mat2;
400 
401  for (ib = 0; ib < nb; ib++) {
402  #pragma omp for nowait
403  for (itri = 0; itri < ntri[ib]; ++itri) {
404  for (i = 0; i < 3; ++i) {
405  /**/
406  mat2 = 0.0f;
407  for (j = 0; j < 3; ++j) mat2 += nmlp[ib][itri][i][j] * nmlp[ib][itri][i][j];
408  mat2 = sqrtf(mat2);
409  mat2 = (mat2 - patch_min) / (patch_max - patch_min);
410  mat2 = mat2 * 4.0f;
411  /**/
412  if (mat2 <= 1.0) {
413  for (j = 0; j < 4; ++j) clr[ib][j + 4 * i + 12 * itri]
414  = BarColor[1][j] * mat2 + BarColor[0][j] * (1.0f - mat2);
415  }
416  else if (mat2 <= 2.0) {
417  mat2 = mat2 - 1.0f;
418  for (j = 0; j < 4; ++j) clr[ib][j + 4 * i + 12 * itri]
419  = BarColor[2][j] * mat2 + BarColor[1][j] * (1.0f - mat2);
420  }
421  else if (mat2 <= 3.0) {
422  mat2 = mat2 - 2.0f;
423  for (j = 0; j < 4; ++j) clr[ib][j + 4 * i + 12 * itri]
424  = BarColor[3][j] * mat2 + BarColor[2][j] * (1.0f - mat2);
425  }
426  else {
427  mat2 = mat2 - 3.0f;
428  for (j = 0; j < 4; ++j) clr[ib][j + 4 * i + 12 * itri]
429  = BarColor[4][j] * mat2 + BarColor[3][j] * (1.0f - mat2);
430  }
431  }/*for (i = 0; i < 3; ++i)*/
432  }/*for (itri = 0; itri < ntri[ib]; ++itri)*/
433  }/*for (ib = 0; ib < nb; ib++)*/
434  }/*End of parallel region*/
435  }/*if (color_scale == 4)*/
436  else if (color_scale == 3 || color_scale == 5) {
437 #pragma omp parallel default(none) \
438 shared(nb,ntri,matp,clr,BarColor,color_scale,kvp,arw,patch_max,rgb_band) \
439 private(itri, j)
440  {
441  int i, ib;
442 
443  for (ib = 0; ib < nb; ib++) {
444  /**/
445 #pragma omp for nowait
446  for (itri = 0; itri < ntri[ib]; ++itri) {
447  for (i = 0; i < 3; ++i) {
448  for (j = 0; j < 4; ++j) clr[ib][j + 4 * i + 12 * itri] = rgb_band[ib][j];
449  }
450  }
451  }/*for (ib = 0; ib < nb; ib++*/
452 
453  if (color_scale == 3) {
454  for (ib = 0; ib < nb; ib++) {
455 #pragma omp for nowait
456  for (itri = 0; itri < ntri[ib]; ++itri) {
457  for (i = 0; i < 3; ++i) {
458  for (j = 0; j < 3; ++j) {
459  arw[ib][itri][i][0][j] = kvp[ib][itri][i][j]
460  - 0.5f * matp[ib][itri][i][j] / patch_max;
461  arw[ib][itri][i][1][j] = kvp[ib][itri][i][j]
462  + 0.5f * matp[ib][itri][i][j] / patch_max;
463  }/*for (j = 0; j < 3; ++j)*/
464  }/*for (i = 0; i < 3; ++i)*/
465  }/*for (itri = 0; itri < ntri[ib]; ++itri)*/
466  }/*for (ib = 0; ib < nb; ib++)*/
467  }/*if (color_scale == 3)*/
468  }/*End of parallel region*/
469  }/*if (color_scale == 5)*/
470  else if (color_scale == 6) {
471 #pragma omp parallel default(none) \
472 shared(nb,ntri,matp,clr,bgray,wgray,patch_max,patch_min) \
473 private(itri, j)
474  {
475  int i, ib;
476  GLfloat mat2;
477 
478  for (ib = 0; ib < nb; ib++) {
479 #pragma omp for nowait
480  for (itri = 0; itri < ntri[ib]; ++itri) {
481  for (i = 0; i < 3; ++i) {
482  /**/
483  mat2 = (matp[ib][itri][i][0] - patch_min) / (patch_max - patch_min);
484  /**/
485  for (j = 0; j < 4; ++j) clr[ib][j + 4 * i + 12 * itri] = wgray[j] * mat2 + bgray[j] * (1.0f - mat2);
486  }/*for (i = 0; i < 3; ++i)*/
487  }/*for (itri = 0; itri < ntri[ib]; ++itri)*/
488  }/*for (ib = 0; ib < nb; ib++)*/
489  }/*End of parallel region*/
490  }/*if (color_scale == 6)*/
491  else if (color_scale == 7) {
492 #pragma omp parallel default(none) \
493 shared(nb,ntri,nmlp,clr,bgray,wgray,patch_max,patch_min) \
494 private(itri, j)
495  {
496  int i, ib;
497  GLfloat mat2;
498 
499  for (ib = 0; ib < nb; ib++) {
500 #pragma omp for nowait
501  for (itri = 0; itri < ntri[ib]; ++itri) {
502  for (i = 0; i < 3; ++i) {
503  /**/
504  mat2 = 0.0f;
505  for (j = 0; j < 3; ++j) mat2 += nmlp[ib][itri][i][j] * nmlp[ib][itri][i][j];
506  mat2 = sqrtf(mat2);
507  mat2 = (mat2 - patch_min) / (patch_max - patch_min);
508  /**/
509  for (j = 0; j < 4; ++j) clr[ib][j + 4 * i + 12 * itri] = wgray[j] * mat2 + bgray[j] * (1.0f - mat2);
510  }/*for (i = 0; i < 3; ++i)*/
511  }/*for (itri = 0; itri < ntri[ib]; ++itri)*/
512  }/*for (ib = 0; ib < nb; ib++)*/
513  }/*End of parallel region*/
514  }/*if (color_scale == 7)*/
515 
516 }/* paint */
magenta
GLfloat magenta[4]
Magenta color code.
Definition: fermisurfer.cpp:203
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
get_thread
int get_thread()
OpenMP wrapper, get the number of threads.
Definition: basic_math.cpp:139
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
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
MyFrame::textbox_min
wxTextCtrl * textbox_min
Definition: menu.hpp:63
patch_max
GLfloat patch_max
Max value across patch.
Definition: fermisurfer.cpp:149
refresh_patch
int refresh_patch
Definition: fermisurfer.cpp:239
basic_math.hpp
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
variable.hpp
Global variables.
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
clr
GLfloat ** clr
Colors of points [nb][ntri*3*4].
Definition: fermisurfer.cpp:146
arw
GLfloat ***** arw
Definition: fermisurfer.cpp:141
BackGroundColor
GLfloat BackGroundColor[4]
BackGround color code.
Definition: fermisurfer.cpp:208
free_patch
void free_patch()
Free variables for patch before new patch is computed.
Definition: free_patch.cpp:54
rgb_band
GLfloat ** rgb_band
Switch for drawn bands [nb].
Definition: fermisurfer.cpp:138
kvnl
GLfloat **** kvnl
-vector of nodeline [nb][nnl][2][3]
Definition: fermisurfer.cpp:155
nmlp_rot
GLfloat ** nmlp_rot
Normal vector of patchs [nb][ntri*3*3].
Definition: fermisurfer.cpp:142
red
GLfloat red[4]
Red color code.
Definition: fermisurfer.cpp:205
MyFrame::textbox_max
wxTextCtrl * textbox_max
Definition: menu.hpp:64
nb
int nb
The number of Bands.
Definition: fermisurfer.cpp:99
matp
GLfloat **** matp
Matrix elements of points [nb][ntri][3][3].
Definition: fermisurfer.cpp:145
blue
GLfloat blue[4]
Blue color code.
Definition: fermisurfer.cpp:207
myf
MyFrame * myf
Definition: fermisurfer.cpp:235
kvnl_rot
GLfloat ** kvnl_rot
-vector of nodeline [nb][nnl*2*3]
Definition: fermisurfer.cpp:156
cyan
GLfloat cyan[4]
Cyan color code.
Definition: fermisurfer.cpp:202
nnl
int * nnl
The number of nodeline.
Definition: fermisurfer.cpp:154
clr2d
GLfloat ** clr2d
Matrix element for 2D plot [nb][n2d*2*4].
Definition: fermisurfer.cpp:166
max_and_min
void max_and_min()
Compute Max. & Min. of matrix elements. Compute color of each patch.
Definition: free_patch.cpp:132
BarColor
GLfloat BarColor[5][4]
Definition: fermisurfer.cpp:211
terminal
wxTextCtrl * terminal
Definition: fermisurfer.cpp:237
yellow
GLfloat yellow[4]
Yellow color code.
Definition: fermisurfer.cpp:204
nthreads
int nthreads
Number of OpenMP threads.
Definition: fermisurfer.cpp:227
patch_min
GLfloat patch_min
Max value across patch.
Definition: fermisurfer.cpp:150
paint
void paint()
Compute Max. & Min. of matrix elements. Compute color of each patch.
Definition: free_patch.cpp:288
nequator
int * nequator
The number of equator.
Definition: fermisurfer.cpp:175
refresh_nodeline
int refresh_nodeline
Definition: fermisurfer.cpp:241