7#ifndef FIELD_CLASS_INCLUDED
8#define FIELD_CLASS_INCLUDED
21const std::complex<double>
IM(0, 1.0);
67 const double mean = 0.0,
const double dev = 1.0);
75 const double mean = 0.0);
83 const double mean = 0.0,
const double dev = 1.0);
91 const double mean = 0.0);
98 const double mean = 0.0,
const double dev = 1.0);
103 void setconf(
const VectorXcd &v,
const int num_field = 1);
108 void setconf(
const VectorXd &v,
const int num_field);
113 void setconf(
const MatrixXcd &m);
119 void setconf(
const MatrixXcd &m,
const int num_field);
162 const double mean = 0.0,
const double dev = 1.0) {
179 const double mean = 0.0,
const double dev = 1.0) {
187 Field(
const VectorXcd &v,
const int num_field = 1) {
setconf(v, num_field);};
194 Field(
const VectorXd &v,
const int num_field) {
setconf(v, num_field);};
208 Field(
const MatrixXcd &m,
const int num_field) {
setconf(m, num_field);};
219 static Field Zero(
const int n1,
const int n2,
const int n3) {
224 const double mean = 0.0,
const double dev = 1.0) {
229 const double mean = 0.0,
const double dev = 1.0) {
234 const double mean = 0.0) {
239 const double mean = 0.0) {
244 const double mean = 0.0,
const double dev = 1.0) {
249 const double mean = 0.0,
const double dev = 1.0) {
254 const double mean = 0.0) {
259 const double mean = 0.0) {
263 static Field Vector(
const VectorXcd &v,
const int num_field = 1) {
264 return Field {v, num_field}; };
271 return Field {m, num_field}; };
282 VectorXcd
conf(
const int n)
const {
return field.col(n);};
322 Field conv(
const int n1,
const int n2)
const;
349 virtual void show()
const;
Generate normal distributions; Compute convolutions.
Field conjconv(const int n) const
Convolution field(:,n)*conf(field(:,n))
static Field GaussMT(const int n1, const int n2, const int n3, const double mean=0.0, const double dev=1.0)
MatrixXcd field
Superfields.
Field(const MatrixXcd &m, const int num_field)
Set Li and field from MatrixXcd, but num_f=num_field
VectorXd conf_real(const int n) const
void setgaussl(const int num_col, const double mean=0.0)
static Field GaussMTL(const int n1, const int n2, const double mean=0.0)
static Field Vector(const VectorXcd &v, const int num_field=1)
static Field GaussL(const int n1, const int n2, const int n3, const double mean=0.0)
Field(const VectorXcd &v, const int num_field=1)
Set Li, num_f, and field from VectorXcd.
VectorXcd conf(const int n) const
MatrixXcd field2matrix(const int n) const
Field()
Constructor of Field.
virtual ~Field()
Destructor of Field.
virtual bool operator==(const Field &f)
Is identical (Li, num_f) ?
static Field GaussL(const int n1, const int n2, const double mean=0.0)
static Field Matrix(const MatrixXcd &m, const int num_field)
void setgauss(const int num_col, const double mean=0.0, const double dev=1.0)
void setgaussmtl(const int num_col, const double mean=0.0)
static Field GaussMT(const int n1, const int n2, const double mean=0.0, const double dev=1.0)
Field combine_with(const Field &f)
Combine with another Field object; Mutate field (Li and num_f are unchaged) except for the case that ...
void setconf(const int num_col, const Distribution n, const double mean=0.0, const double dev=1.0)
int Li
Physical box size, N_0=N_1.
VectorXd conf_imag(const int n) const
MatrixXcd dfield2matrix(const int n) const
Field conv(const int n1, const int n2) const
Convolution field(:,n1)*field(:,n2)
Field(const MatrixXcd &m)
Set Li, num_f, and field from MatrixXcd.
Field conv_pw(const int pw, const int n=0) const
Convolution field(:,n)*field(:,n)*...*field(:,n)
int num_f
Number of superfields.
Field(const int n1, const int n2, const int n3, const Distribution n4, const double mean=0.0, const double dev=1.0)
Set Li, num_f, and field; n3 is.
virtual Field & operator/=(const double n)
Devide by a real number n.
static Field Zero(const int n1, const int n2, const int n3)
Field(const int n1, const int n2)
Set Li=n1 and num_f=n2.
virtual void show() const
Output Li, field.
void setgaussmt(const int num_col, const double mean=0.0, const double dev=1.0)
Field(const int n1, const int n2, const Distribution n3, const double mean=0.0, const double dev=1.0)
Set Li, num_f, and field.
virtual bool operator!=(const Field &f)
Not identical (Li, num_f) ?
virtual Field & operator*=(const double n)
Multiply by a real number n.
static Field Gauss(const int n1, const int n2, const double mean=0.0, const double dev=1.0)
static Field GaussMTL(const int n1, const int n2, const int n3, const double mean=0.0)
static Field Matrix(const MatrixXcd &m)
static Field Gauss(const int n1, const int n2, const int n3, const double mean=0.0, const double dev=1.0)
static Field Zero(const int n1, const int n2)
MatrixXcd vector2matrix(const int n) const
Field(const VectorXd &v, const int num_field)
Set Li and field from VectorXd; num_f!=field.cols()
const std::complex< double > IM(0, 1.0)
Imaginary unit.
Distribution
Types of normal distributions.