Difference between revisions of "Reading a Gauge Configuration"
From Gw-qcd-wiki
(Created page with 'First we need to include the qcd headers for the functions we will need. #include "layout_minsurface.h" #include "qcd_fields.h" #include "boundary_flip.h" Then f…') |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
First we need to include the qcd headers for the functions we will need. | First we need to include the qcd headers for the functions we will need. | ||
− | + | #include "layout_minsurface.h" | |
− | + | #include "qcd_fields.h" | |
− | + | #include "boundary_flip.h" | |
− | |||
− | |||
− | |||
− | |||
The qcd library has its own namespace so to avoid excessive typing of '''qcd::''' | The qcd library has its own namespace so to avoid excessive typing of '''qcd::''' | ||
− | + | using namespace qcd; | |
Then we can get started with the code | Then we can get started with the code | ||
− | + | int main(int argc, char **argv) | |
− | + | { | |
− | + | init_machine(argc, argv); | |
+ | |||
+ | int nx,ny,nz,nt; | ||
+ | nx=ny=nz=nt=4; | ||
+ | std::string latname="auto"; | ||
+ | |||
+ | latname="c44_b5.3_k0.158_100"; | ||
+ | int bc[4]={1,1,1,-1}; | ||
+ | |||
+ | layout_minsurface_eo desc(nx, ny, nz, nt); | ||
+ | su3_field links(&desc); | ||
+ | |||
+ | read_kentucky_lattice(latname, links); | ||
+ | |||
+ | apply_boundary(links, bc); | ||
+ | |||
+ | return 0; | ||
+ | } | ||
+ | |||
− | + | And now the gauge configuration is stored in the variable '''links''' |
Latest revision as of 15:05, 6 May 2019
First we need to include the qcd headers for the functions we will need.
#include "layout_minsurface.h" #include "qcd_fields.h" #include "boundary_flip.h"
The qcd library has its own namespace so to avoid excessive typing of qcd::
using namespace qcd;
Then we can get started with the code
int main(int argc, char **argv) { init_machine(argc, argv); int nx,ny,nz,nt; nx=ny=nz=nt=4; std::string latname="auto"; latname="c44_b5.3_k0.158_100"; int bc[4]={1,1,1,-1}; layout_minsurface_eo desc(nx, ny, nz, nt); su3_field links(&desc); read_kentucky_lattice(latname, links); apply_boundary(links, bc); return 0; }
And now the gauge configuration is stored in the variable links