StatMech
Loading...
Searching...
No Matches
generateRM.hpp
Go to the documentation of this file.
1// Generate a random matrix used by all programs in this directory
2#ifndef GENERATE_RM
3#define GENERATE_RM
4
5#include "Headers/LocalRandomMatrix.hpp"
6#include "partWithMax.hpp"
7#include "Headers/mersenne_twister.hpp"
8#include <iostream>
9#include <sysexits.h>
10#define _USE_MATH_DEFINES
11#include <cmath>
12#ifndef M_PI
13 #define M_PI 3.14159265358979323846
14#endif
15
16int const N_ARGS = 6;
17std::string const USAGE_sp = "";
18
19static inline bool Initialize(int argc, char** argv) { return true; }
20static inline bool Finalize(int argc, char** argv) { return true; }
21
22static inline void generateLocal_h(matrix<Complex_t>& mat, Integer_t const d_lmat, Integer_t const seed){
23 if(seed >= 0) {
24 init_genrand(seed);
25 std::cout << "# init_genrand(" << seed << ")\n";
26 }
27 // RandomMatrix_GUE(mat, d_lmat);
28};
29
30static inline void generateLocal_op(matrix<Complex_t>& mat, Integer_t const d_lmat, Integer_t const seed){
31 if(seed >= 0) init_genrand(seed);
32 // RandomMatrix_GUE(mat, d_lmat);
33};
34
35static inline void constructGlobal_h(matrix<Complex_t>& global, matrix<Complex_t> const& local, Integer_t const m, Integer_t const n, Integer_t const dim_loc){
36 if(dim_loc != 2) {
37 std::cerr << "Error: constructGlobal_h (dim_loc=" << dim_loc << ")" << std::endl;
38 std::exit(EX_USAGE);
39 }
40 RandomMatrix_mBody_lLocal(global, m, n, dim_loc);
41};
42
43static inline void constructGlobal_op(matrix<Complex_t>& global, matrix<Complex_t> const& local, Integer_t const m, Integer_t const n, Integer_t const dim_loc){
44 constructGlobal_h(global, local, m, n, dim_loc);
45};
46
47#endif
int const N_ARGS
Definition generateRM.hpp:16
std::string const USAGE_sp
Definition generateRM.hpp:17
MKL_INT Integer_t
Definition mytypes.hpp:359
constexpr Integer_t dim_loc
Definition setVariablesForEnsemble.cpp:36