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
16
int
const
N_ARGS
= 6;
17
std::string
const
USAGE_sp
=
""
;
18
19
static
inline
bool
Initialize(
int
argc,
char
** argv) {
return
true
; }
20
static
inline
bool
Finalize(
int
argc,
char
** argv) {
return
true
; }
21
22
static
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
30
static
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
35
static
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
43
static
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
N_ARGS
int const N_ARGS
Definition
generateRM.hpp:16
USAGE_sp
std::string const USAGE_sp
Definition
generateRM.hpp:17
Integer_t
MKL_INT Integer_t
Definition
mytypes.hpp:359
dim_loc
constexpr Integer_t dim_loc
Definition
setVariablesForEnsemble.cpp:36
Locality
PBC_nonTI
FewBody
generateRM.hpp
Generated on Thu Jul 20 2023 03:02:34 for StatMech by
1.9.7