Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <math.h>
- #include <iomanip>
- # define M_PI 3.14159265358979323846
- using namespace std;
- int main()
- {
- ofstream kpoints;
- kpoints.open("kpoints01.txt");
- double a = 4.235;
- double b = 6.098;
- double c = 15;
- // double Gx = 0.0, Gy = 0.0;
- // double Xx = M_PI/a, Xy = 0.0;
- // double Mx = M_PI/a, My = M_PI/b;
- // double Yx = 0.0, Yy = M_PI/b;
- double Gx = 0.0, Gy = 0.0;
- double Xx = 0.5, Xy = 0.0;
- double Mx = 0.5, My = 0.5;
- double Yx = 0.0, Yy = 0.5;
- // double Gx = 0.0, Gy = 0.0;
- // double Xx = a/M_PI/2, Xy = 0.0;
- // double Mx = a/M_PI/2, My = b/M_PI/2;
- // double Yx = 0.0, Yy = b/M_PI/2;
- int n=512;
- double dGX = (Xx-Gx)/n;
- double dXM = (My-Xy)/n;
- double dMY = (Yx-Mx)/n;
- double dYG = (Gy-Yy)/n;
- kpoints << setprecision(15)<<fixed;
- //cout << endl << "G " <<Gx<<", "<<Gy<< endl << endl;
- for(int i=0;i<n;i++)
- {
- kpoints << Gx + dGX * i<< ", " << Gy <<", "<<0.0<< endl;
- }
- //cout << endl << "X " <<Xx<<", "<<Xy<< endl << endl;
- for(int i=0;i<n;i++)
- {
- kpoints << Xx<< ", " << Xy + dXM * i <<", "<<0.0<< endl;
- }
- //cout << endl << "M " <<Mx<<", "<<My<< endl << endl;
- for(int i=0;i<n;i++)
- {
- kpoints << Yx - dMY * (n-1-i)<< ", " << My <<", "<<0.0<< endl;
- }
- //cout << endl << "Y " <<Yx<<", "<<Yy<< endl << endl;
- for(int i=0;i<n;i++)
- {
- kpoints << Yx << ", " << Gy - dYG * (n-1-i) <<", "<<0.0<< endl;
- }
- //cout << endl << "G " <<Gx<<", "<<Gy<< endl << endl;
- kpoints.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement