2 * Determination of lateral interaction parameters on a c(2x2) square lattice
3 * using linear combinations to express each interaction and then counting them in terms of cluster-expansion
6 * Michael Rieger, FHI, 2008
12 #include <blitz/array.h> // http://www.oonumerics.org/blitz/
13 #include <random/uniform.h> // blitz Random Number Generator - Mersenne Twister type
14 #include "SimpleIni.h" // Ini File Parser
17 using namespace blitz
;
18 using namespace ranlib
;
20 int read_ini(const char* input_file_name
)
24 SI_Error rc
= ini
.LoadFile(input_file_name
);
25 if (rc
< 0) return false;
27 // output all of the items of the input file
28 CSimpleIniA::TNamesDepend sections
;
29 CSimpleIniA::TNamesDepend::const_iterator i
;
30 ini
.GetAllSections(sections
);
33 CSimpleIniA::TNamesDepend::size_type sections_size
;
34 sections_size
= sections
.size();
36 for (i
= sections
.begin(); i
!= sections
.end(); ++i
)
38 printf("%s\n", i
->pItem
);
41 printf("nr of sections given by sections.size() %i\n", sections
.size());
44 // next step.. printing all keys of a section
46 printf("first section name: - %s - contains the keys: \n", i
->pItem
);
48 CSimpleIniA::TNamesDepend keys
;
49 ini
.GetAllKeys(i
->pItem
, keys
);
50 CSimpleIniA::TNamesDepend::const_iterator k
;
51 for (k
= keys
.begin(); k
!= keys
.end(); ++k
)
53 printf("%s\n", k
->pItem
);
56 printf("hello world\n");
65 int main(int argc
, char* argv
[])
68 // subroutine to read all necessary input files
69 if (read_ini(argv
[1]))
71 std::cout
<< "\n\n all fine\n" << std::endl
;
75 std::cout
<< "sth wrong with input file reading" << std::endl
;