Difference between revisions of "Reading a Gauge Configuration"

From Gw-qcd-wiki
Jump to: navigation, search
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 "layout_minsurface.h"
    #include "qcd_fields.h"
+
  #include "qcd_fields.h"
    #include "boundary_flip.h"
+
  #include "boundary_flip.h"
 
 
Then for output
 
 
 
    #include <iostream>
 
  
 
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;
+
  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)
+
  int main(int argc, char **argv)
    {
+
  {
      init_machine(argc, argv);
+
    init_machine(argc, argv);
  
 
This function initializes communications.  There is more but I don't want to type all this up just to replace it.  For now just testing to see if indentation keeps spacing
 
This function initializes communications.  There is more but I don't want to type all this up just to replace it.  For now just testing to see if indentation keeps spacing
 
+
```
      int nx,ny,nz,nt;
+
    int nx,ny,nz,nt;
      std::string latname="auto";
+
    nx=ny=nz=nt=4;
 
+
    std::string latname="auto";
       nx=ny=nz=nt=4;
+
        
      latname="c44_b5.3_k0.158_100";
+
    latname="c44_b5.3_k0.158_100";
      int bc[4]={1,1,1,-1};
+
    int bc[4]={1,1,1,-1};
 
+
    int this_node = get_node_rank();
      int this_node = get_node_rank();
+
```
 
 
Yea.. that will be ugly.
 
 
 
 
 
Testing md to wiki converter.
 
 
 
#Hello
 
 
 
This is me testing markdown. Here is some c++ code
 
 
 
<source lang="cpp">int main()
 
{
 
    cout << "Hi\n";
 
 
 
    return 0;
 
}</source>
 

Revision as of 15:02, 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);

This function initializes communications. There is more but I don't want to type all this up just to replace it. For now just testing to see if indentation keeps spacing ```

   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};
   int this_node = get_node_rank();

```