• R/O
  • HTTP
  • SSH
  • HTTPS

fermisurfer: Commit

fermisurfer Git


Commit MetaInfo

Revisionf5a4f9e8ad6b03f8666328cf26e6fe0b661e19f2 (tree)
Zeit2015-05-12 21:55:36
Autormitsuaki1987 <kawamitsuaki@gmai...>
Commitermitsuaki1987

Log Message

.gitignore : マニュアル用pdf, doxygen, opensdf(VisualStudio)を無視
manual_en.tex : スペルミス・バージョン番号など
manual_ja.tex :バージョン番号
fermisurfer.c : doxygen用コメント

Ändern Zusammenfassung

Diff

--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,7 @@ src/fermisurfer.sln
1111 src/fermisurfer.v12.suo
1212 src/fermisurfer.vcxproj
1313 src/fermisurfer.vcxproj.filters
14+doc/doxygen/
15+doc/manual_en.pdf
16+doc/manual_ja.pdf
17+*.opensdf
--- a/doc/manual_en.tex
+++ b/doc/manual_en.tex
@@ -20,7 +20,7 @@
2020 % Cover
2121 %
2222 \title{Manual for FermiSurfer\\
23-version 1.3}
23+version 1.4}
2424 \author{Mitsuaki KAWAMURA\footnote{mkawamura@issp.u-tokyo.ac.jp}}
2525 %\date{}
2626 \maketitle
@@ -397,7 +397,7 @@ It makes each band enable/disable (Fig. \ref{fig_band}).
397397 It turns the event of the mouse-left-drag.
398398
399399 \begin{description}
400-\item[Rotate(default)] Rotate the figure along the mause drag.
400+\item[Rotate(default)] Rotate the figure along the mouse drag.
401401 \item[Scale] Expand/shrink the figure in upward/downward drag.
402402 \item[Translate] Translate the figure along the mouse drag.
403403 \end{description}
@@ -524,7 +524,7 @@ It is experimental.
524524
525525 This finishes \verb|fermisurfer|.
526526
527-\section{Garally}
527+\section{Gallery}
528528
529529 Contributions of each Fermi surfaces to the Hall effect
530530 in IrO$_2$
@@ -536,7 +536,7 @@ in IrO$_2$
536536 \label{fig_iro2}
537537 \end{figure}
538538
539-\section{Acknoulagement}
539+\section{Acknowledgment}
540540
541541 I thank Dr. Yusuke Konishi in ISSP;
542542 he performed a test in Mac OSX,
--- a/doc/manual_ja.tex
+++ b/doc/manual_ja.tex
@@ -20,7 +20,7 @@
2020 % Cover
2121 %
2222 \title{FermiSurfer マニュアル \\
23-version 1.3 改訂版}
23+version 1.4}
2424 \author{河村 光晶\footnote{mkawamura@issp.u-tokyo.ac.jp}}
2525 %\date{}
2626 \maketitle
--- a/src/fermisurfer.c
+++ b/src/fermisurfer.c
@@ -70,8 +70,10 @@ GLfloat ****kvnl; //!<K-vector of nodeline [nb][nnl][2][3]
7070 /*
7171 Variables for mouse & cursorkey
7272 */
73-GLfloat sx, sy; //!<Scale of mouse movement
74-int cx, cy; //!<Starting point of drug
73+GLfloat sx; //!<Scale of mouse movement
74+GLfloat sy; //!<Scale of mouse movement
75+int cx; //!<Starting point of drug
76+int cy; //!<Starting point of drug
7577 GLfloat scl = 1.0; //!<Initial scale
7678 GLfloat trans[3] = {0.0, 0.0, 0.0}; //!<Translation
7779 GLfloat rot[3][3] = {{1.0, 0.0, 0.0}, //!<Rotation matrix
@@ -80,14 +82,14 @@ GLfloat rot[3][3] = {{1.0, 0.0, 0.0}, //!<Rotation matrix
8082 /*
8183 Colors
8284 */
83-GLfloat black[] = {0.0, 0.0, 0.0, 1.0};
84-GLfloat white[] = {1.0, 1.0, 1.0, 1.0};
85-GLfloat cyan[] = {0.0, 1.0, 1.0, 1.0};
86-GLfloat magenta[] = {1.0, 0.0, 1.0, 1.0};
87-GLfloat yellow[] = {1.0, 1.0, 0.0, 1.0};
88-GLfloat red[] = {1.0, 0.0, 0.0, 1.0};
89-GLfloat green[] = {0.0, 1.0, 0.0, 1.0};
90-GLfloat blue[] = {0.0, 0.0, 1.0, 1.0};
85+GLfloat black[] = {0.0, 0.0, 0.0, 1.0}; //!< Black color code
86+GLfloat white[] = {1.0, 1.0, 1.0, 1.0}; //!< White color code
87+GLfloat cyan[] = {0.0, 1.0, 1.0, 1.0}; //!< Cyan color code
88+GLfloat magenta[] = {1.0, 0.0, 1.0, 1.0}; //!< Magenta color code
89+GLfloat yellow[] = {1.0, 1.0, 0.0, 1.0}; //!< Yellow color code
90+GLfloat red[] = {1.0, 0.0, 0.0, 1.0}; //!< Red color code
91+GLfloat green[] = {0.0, 1.0, 0.0, 1.0}; //!< Green color code
92+GLfloat blue[] = {0.0, 0.0, 1.0, 1.0}; //!< Blue color code
9193 /*
9294 Others
9395 */
@@ -96,19 +98,14 @@ int corner[6][4]; //!<Corners of tetrahedron
9698 GLfloat def = 0.0; //!<Shift of Fermi energy
9799 enum
98100 {
99- MOUSE_LEFT_BUTTON = 0,
100- MOUSE_MIDDLE_BUTTON = 1,
101- MOUSE_RIGHT_BUTTON = 2,
102- MOUSE_SCROLL_UP = 3,
103- MOUSE_SCROLL_DOWN = 4
101+ MOUSE_SCROLL_UP = 3, //!<Mouse wheel up
102+ MOUSE_SCROLL_DOWN = 4 //!<Mouse wheel down
104103 };
105-/*
104+/*!
106105 Input from Fermi surface file
106+ @param[in] fname Input file name
107107 */
108-void read_file //! Read input file
109-(char *fname //!<Input file name
110- )
111-{
108+void read_file(char *fname){
112109 int ib, i, i1, i2, i3, ierr;
113110 FILE *fp;
114111 /*
@@ -201,7 +198,7 @@ void read_file //! Read input file
201198 fclose(fp);
202199 /**/
203200 } /* read_file */
204-/*
201+/*!
205202 Initialize corners of tetrahedron
206203 */
207204 void init_corner(){
@@ -359,7 +356,7 @@ void init_corner(){
359356 }
360357 }
361358 }
362-/*
359+/*!
363360 Compute Bragg vetor
364361 */
365362 void bragg_vector(){
@@ -388,8 +385,10 @@ void bragg_vector(){
388385 }
389386 }
390387 } /* bragg_vector */
391-/*
388+/*!
392389 Solve linear system
390+ @param[in] a Matix
391+ @param[inout] b Right hand side vector
393392 */
394393 GLfloat solve3(GLfloat a[3][3], GLfloat b[3]){
395394 int i;
@@ -415,8 +414,13 @@ GLfloat solve3(GLfloat a[3][3], GLfloat b[3]){
415414 return det;
416415 /**/
417416 }
418-/*
419- Corner of Bragg plane
417+/*!
418+ Judge wheser this line is the edge of 1st BZ
419+ @param[in] ibr Index of a Bragg plane
420+ @param[in] jbr Index of a Bragg plane
421+ @param[in] nbr
422+ @param[in] vert start point of line
423+ @param[in] vert2 end point of line
420424 */
421425 int bragg_vert(int ibr, int jbr, int nbr, GLfloat vert[3], GLfloat vert2[3]){
422426 int kbr, i, lbr, nbr0;
@@ -472,7 +476,7 @@ int bragg_vert(int ibr, int jbr, int nbr, GLfloat vert[3], GLfloat vert2[3]){
472476 return 0;
473477 /**/
474478 }/* bragg_vert */
475-/*
479+/*!
476480 Compute Brillouin zone boundariy lines
477481 */
478482 void bz_lines(){
@@ -519,7 +523,7 @@ void bz_lines(){
519523 }
520524 /**/
521525 } /* bz_lines */
522-/*
526+/*!
523527 Max and Minimum in Brillouine zone
524528 */
525529 void max_and_min_bz(){
@@ -547,8 +551,12 @@ void max_and_min_bz(){
547551 }
548552 /**/
549553 }/* max_and_min_bz */
550-/*
554+/*!
551555 Sort eigenvalues
556+ @param[in] n the number of components
557+ @param[inout] eig2 the orbital energy
558+ @param[inout] mat2 the matrix element
559+ @param[inout] kvec2 of corners
552560 */
553561 void eigsort(int n, GLfloat* eig2, GLfloat* mat2, GLfloat kvec2[][3]){
554562 int i, j, k;
@@ -574,8 +582,12 @@ void eigsort(int n, GLfloat* eig2, GLfloat* mat2, GLfloat kvec2[][3]){
574582 }
575583 }
576584 } /* eigsort */
577-/*
585+/*!
578586 Calculate normal vector
587+ @param[in] in1 Corner 1
588+ @param[in] in2 Corner 2
589+ @param[in] in3 Corner 3
590+ @param[out] out The normal vector
579591 */
580592 void normal_vec(GLfloat in1[3], GLfloat in2[3], GLfloat in3[3], GLfloat out[3]){
581593 int i;
@@ -592,8 +604,12 @@ void normal_vec(GLfloat in1[3], GLfloat in2[3], GLfloat in3[3], GLfloat out[3]){
592604 norm = sqrtf(out[0]*out[0] + out[1]*out[1] + out[2]*out[2]);
593605 for(i=0;i<3;i++) out[i] = out[i] / norm;
594606 } /* normal_vec */
595-/*
607+/*!
596608 Store triangle patch
609+ @param[in] ib The band index
610+ @param[in] nbr Bragg plane
611+ @param[in] mat1 The matrix element
612+ @param[in] kvec1 k vector of corners
597613 */
598614 void triangle(int ib, int nbr, GLfloat mat1[3], GLfloat kvec1[3][3]){
599615 /**/
@@ -672,8 +688,12 @@ void triangle(int ib, int nbr, GLfloat mat1[3], GLfloat kvec1[3][3]){
672688 }
673689 /**/
674690 }/* triangle */
675-/*
691+/*!
676692 Tetrahedrron method
693+ @param[in] ib The band index
694+ @param[in] eig1 orbital energies
695+ @param[in] mat1 Matrix elements
696+ @param[in] kvec1 k vectors
677697 */
678698 void tetrahedron(int ib, GLfloat eig1[8], GLfloat mat1[8], GLfloat kvec1[8][3]){
679699 /**/
@@ -743,7 +763,7 @@ void tetrahedron(int ib, GLfloat eig1[8], GLfloat mat1[8], GLfloat kvec1[8][3]){
743763 }
744764 }
745765 }/* tetrahedron */
746-/*
766+/*!
747767 Patches for FSs
748768 */
749769 void fermi_patch()
@@ -841,7 +861,7 @@ void fermi_patch()
841861 }
842862 }
843863 }
844- } /** End of parallel region **/
864+ } /* End of parallel region */
845865 /**/
846866 if(query == 1){
847867 printf("band # of patchs \n");
@@ -876,7 +896,7 @@ void fermi_patch()
876896 }
877897 /**/
878898 } /* fermi_patch */
879-/*
899+/*!
880900 Max. & Min. of matrix elements.
881901 */
882902 void max_and_min(){
@@ -1011,7 +1031,7 @@ void max_and_min(){
10111031 }
10121032 /**/
10131033 } /* max_and_min */
1014-/*
1034+/*!
10151035 Node line
10161036 */
10171037 void calc_nodeline(){
@@ -1054,7 +1074,7 @@ void calc_nodeline(){
10541074 }
10551075 }
10561076 }
1057- } /** End of parallel region **/
1077+ } /* End of parallel region */
10581078 /**/
10591079 printf("band # of nodeline \n");
10601080 for(ib =0; ib < nb; ib++){
@@ -1133,9 +1153,9 @@ void calc_nodeline(){
11331153 }
11341154 }
11351155 }
1136- } /** End of parallel region **/
1156+ } /* End of parallel region */
11371157 }
1138-/*
1158+/*!
11391159 Draw Fermi surfaces
11401160 */
11411161 void draw_fermi(){
@@ -1173,7 +1193,7 @@ void draw_fermi(){
11731193 }
11741194 }
11751195 glEnd();
1176- } /** End of parallel region **/
1196+ } /* End of parallel region */
11771197 }
11781198 /**/
11791199 }
@@ -1206,7 +1226,7 @@ void draw_fermi(){
12061226 }
12071227 /**/
12081228 } /* draw_ferm */
1209-/*
1229+/*!
12101230 Draw lines of BZ boundaries
12111231 */
12121232 void draw_bz_lines(){
@@ -1275,7 +1295,7 @@ void draw_bz_lines(){
12751295 glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, black);
12761296 /**/
12771297 } /* draw bz_lines */
1278-/*
1298+/*!
12791299 Draw color scale
12801300 */
12811301 void draw_colorbar()
@@ -1378,7 +1398,7 @@ void draw_colorbar()
13781398 else{
13791399 }
13801400 } /* draw_colorbar */
1381-/*
1401+/*!
13821402 Draw points for the stereogram
13831403 */
13841404 void draw_circles(){
@@ -1414,7 +1434,7 @@ void draw_circles(){
14141434 }
14151435 glEnd();
14161436 }
1417-/*
1437+/*!
14181438 Glut Display function
14191439 */
14201440 void display()
@@ -1519,8 +1539,10 @@ void display()
15191539 /**/
15201540 glutSwapBuffers();
15211541 } /* display */
1522-/*
1523- Window resization
1542+/*!
1543+ Window resize
1544+ @param[in] w Window width
1545+ @param[in] h Window height
15241546 */
15251547 void resize(int w, int h)
15261548 {
@@ -1539,20 +1561,19 @@ void resize(int w, int h)
15391561 /**/
15401562 glMatrixMode(GL_MODELVIEW);
15411563 } /* end resize */
1542-/*
1564+/*!
15431565 Idling
15441566 */
15451567 void idle(void)
15461568 {
15471569 glutPostRedisplay();
15481570 } /* idle */
1549-
15501571 /*!
15511572 Glut mouse function
1552- @param[in] button xxxxx
1553- @param[in] state yyyyy
1554- @param[in] x zzzzz
1555- @param[in] y zzzzz
1573+ @param[in] button pushed button
1574+ @param[in] state down or upor ?
1575+ @param[in] x position of mouse cursor
1576+ @param[in] y position of mouse cursor
15561577 */
15571578 void mouse(int button, int state, int x, int y)
15581579 {
@@ -1614,8 +1635,10 @@ void mouse(int button, int state, int x, int y)
16141635 break;
16151636 }
16161637 } /* end mouse */
1617-/*
1638+/*!
16181639 Glut motion function
1640+ @param[in] x position of cursor
1641+ @param[in] y position of cursor
16191642 */
16201643 void motion(int x, int y)
16211644 {
@@ -1675,17 +1698,23 @@ void motion(int x, int y)
16751698 cy = y;
16761699 /**/
16771700 } /* motion */
1678-/*
1701+/*!
16791702 Glut keyboard function
1703+ @param[in] key key Typed key
1704+ @param[in] x
1705+ @param[in] y
16801706 */
16811707 void keyboard(unsigned char key, int x, int y)
16821708 {
16831709 switch (key) {
16841710 }
16851711 } /* keyboard */
1686-/*
1712+/*!
16871713 Glut special key function
1688- */
1714+ @param[in] key typed special key
1715+ @param[in] x
1716+ @param[in] y
1717+*/
16891718 void special_key(int key, int x, int y)
16901719 {
16911720 switch (key) {
@@ -1711,8 +1740,9 @@ void special_key(int key, int x, int y)
17111740 /**/
17121741 }
17131742 } /* special_key */
1714-/*
1743+/*!
17151744 Main menu
1745+ @param[in] value Selected menu
17161746 */
17171747 void main_menu(int value){
17181748 /**/
@@ -1779,8 +1809,9 @@ void main_menu(int value){
17791809 exit(0);
17801810 }
17811811 }
1782-/*
1783-On / Change mouse function
1812+/*!
1813+ Change mouse function
1814+ @param[in] value Selected menu
17841815 */
17851816 void menu_mouse(int value){
17861817 /**/
@@ -1801,8 +1832,9 @@ void menu_mouse(int value){
18011832 }
18021833 /**/
18031834 } /* menu_band */
1804-/*
1835+/*!
18051836 On / Off band
1837+ @param[in] value Selected menu
18061838 */
18071839 void menu_band(int value){
18081840 /**/
@@ -1817,8 +1849,9 @@ void menu_band(int value){
18171849 glutPostRedisplay();
18181850 /**/
18191851 } /* menu_band */
1820-/*
1852+/*!
18211853 Change background color
1854+ @param[in] value Selected menu
18221855 */
18231856 void menu_bgcolor(int value){
18241857 if(value == 1 && blackback != 1){
@@ -1834,8 +1867,9 @@ void menu_bgcolor(int value){
18341867 }
18351868 /**/
18361869 }/* bgcolor change*/
1837-/*
1838- Change color scale mode
1870+/*!
1871+ Change color scale mode
1872+ @param[in] value Selected menu
18391873 */
18401874 void menu_colorscale(int value){
18411875 /**/
@@ -1865,8 +1899,9 @@ void menu_colorscale(int value){
18651899 }
18661900 /**/
18671901 } /* menu_colorscale */
1868-/*
1869- Change Brillouin zone
1902+/*!
1903+ Change Brillouin zone
1904+ @param[in] value Selected menu
18701905 */
18711906 void menu_bzmode(int value){
18721907 if(value == 1 && fbz != 1){
@@ -1908,8 +1943,9 @@ void menu_bzmode(int value){
19081943 glutPostRedisplay();
19091944 }
19101945 } /* menu_bzmode */
1911-/*
1912- On/Off Node line
1946+/*!
1947+ On/Off Node line
1948+ @param[in] value Selected menu
19131949 */
19141950 void menu_nodeline(int value){
19151951 if(value == 1 && nodeline != 1){
@@ -1924,8 +1960,9 @@ void menu_nodeline(int value){
19241960 }
19251961 /**/
19261962 } /* menu_nodeline */
1927-/*
1928- Tern stereogram
1963+/*!
1964+ Tern stereogram
1965+ @param[in] value Selected menu
19291966 */
19301967 void menu_stereo(int value){
19311968 if(value == 1 && lstereo != 1){
@@ -1944,8 +1981,9 @@ void menu_stereo(int value){
19441981 glutPostRedisplay();
19451982 }
19461983 } /* menu_stereo */
1947-/*
1948- On/Off Colorbar
1984+/*!
1985+ On/Off Colorbar
1986+ @param[in] value Selected menu
19491987 */
19501988 void menu_colorbar(int value){
19511989 if(value == 1 && lcolorbar != 1){
@@ -1959,8 +1997,9 @@ void menu_colorbar(int value){
19591997 glutPostRedisplay();
19601998 }
19611999 } /* menu_colorbar */
1962-/*
2000+/*!
19632001 Change tetrahedron
2002+ @param[in] value Selected menu
19642003 */
19652004 void menu_tetra(int value){
19662005 /**/
@@ -1982,7 +2021,7 @@ void menu_tetra(int value){
19822021 glutPostRedisplay();
19832022 }
19842023 } /* menu_tetra */
1985-/*
2024+/*!
19862025 Glut init function
19872026 */
19882027 void init(void)
@@ -2060,7 +2099,7 @@ void init(void)
20602099 glutAddMenuEntry("Exit",9);
20612100 glutAttachMenu(GLUT_RIGHT_BUTTON);
20622101 } /* init */
2063-/*
2102+/*!
20642103 Main routine
20652104 */
20662105 int main(int argc, char *argv[])
Show on old repository browser