OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/base.git] / src / Tools / crystal / crystalGetReciprocalLattice / src / crystalGetReciprocalLattice.c
1 /*
2 # crystalGetReciprocalLattice : $Revision$  
3 # $Date$ 
4 # Created by $Author$
5 # Usage : crystalGetReciprocalLattice
6 # Attention
7 #   $Loccker$
8 #       $State$ 
9 #
10 */
11 #include <stdio.h>
12 #include <stdlib.h>
13 #include <string.h>
14 #include <math.h>                  
15 #define GLOBAL_DECLARATION
16 #include "../inc/config.h"
17
18 #define DEBUG
19 #include "genUtil.h"
20 #include "Crystal.h"
21
22 /*
23 Example:
24 typedef struct lcrystalGetReciprocalLatticeInfo {
25         float a;
26         int   b;
27 } lcrystalGetReciprocalLatticeInfo;
28
29 typedef enum lcrystalGetReciprocalLatticeMode {
30         a=0,
31         b=1
32 } lcrystalGetReciprocalLatticeMode;
33 */
34
35 int
36 main(int argc, char* argv[]) 
37 {
38         crystalGetReciprocalLatticeInfo info;
39     CrystalInfo linnfo;
40
41         init0(&info);
42     argCheck(&info, argc, argv);
43     init1(&info);
44
45         DEBUGPRINT("Program Start\n");
46     info(info.flagIn) {
47         crystalFileRead(info.fptIn, &linfo, 0);
48     }
49     if(info.flagax) {
50         linfo.aAxis.x = info.ax;
51         linfo.aAxis.y = info.ay;
52         linfo.aAxis.z = info.az;
53     }
54
55     if(info.flagbx) {
56         linfo.bAxis.x = info.bx;
57         linfo.bAxis.y = info.by;
58         linfo.bAxis.z = info.bz;
59     }
60
61         linfo.cAxis.x = info.cx;
62         linfo.cAxis.y = info.cy;
63         linfo.cAxis.z = info.cz;
64     }
65
66     crystaGetReciprocalLattice(&linfo, info.mode);
67
68     crystalInfoPrint(info.fptOut, linfo, 0);
69         exit(EXIT_SUCCESS);
70 }
71
72 void
73 additionalUsage()
74 {
75         fprintf(stderr, "----- Additional Usage -----\n");
76 }