8#ifndef FIELD_NICOLAI_INCLUDED
9#define FIELD_NICOLAI_INCLUDED
86 explicit Nicolai(
const int n1,
const int n2,
const int n3) :
134 void nic_output(
const VectorXi k,
const VectorXd lambda,
136 const VectorXi signs,
const int dmp,
137 const double max_err,
172 Potential superpotential_typealgebraA()
const;
178 Potential superpotential_typealgebraD()
const;
184 Potential superpotential_typealgebraE()
const;
190 Potential superpotential_typecustom()
const;
197 PotentialNR superpotential_nr_typealgebraA()
const;
203 PotentialNR superpotential_nr_typealgebraD()
const;
209 PotentialNR superpotential_nr_typealgebraE()
const;
232 explicit Scalar(
const int n1,
const int n2,
233 const VectorXi n3,
const VectorXd n4,
237 k = n3; lambda = n4; spt_type = t;
250 const VectorXi n3,
const VectorXd n4,
251 const int num_field = 1,
254 Field(v, num_field) { k = n3; lambda = n4; spt_type = t;};
262 spt_type = f.spt_type;
263 k = f.k; lambda = f.lambda; spt_type = f.spt_type;
272 spt_type = f.spt_type;
273 k = f.k; lambda = f.lambda; spt_type = f.spt_type;
287 && (k==f.k) && (lambda==f.lambda) && (spt_type==f.spt_type);
364 void scl_output(
const int in,
const int num_sol,
const int i,
365 const int sign,
const double err)
const;
399 explicit NicolaiSol(
const int n1,
const int n2,
const int n3) :
412 double err = err_vec.norm();
440 double max_err()
const {
return *max_element(errs.begin(), errs.end());};
453 double nr_method (
const VectorXi k,
const VectorXd lambda,
454 const int num_nrsol,
const int LOOP,
469 const int LOOP,
const int TRIAL,
478 return fs[n].superpotential().sign_det();
485 void phi_output(
const int in,
const VectorXi signs)
const;
Generate normal distributions; Compute convolutions.
MatrixXcd field
Superfields.
int Li
Physical box size, N_0=N_1.
int num_f
Number of superfields.
Nicolai map; Compute Vector for NR method.
Nicolai(const int n1, const int n2, const int n3)
Set Li, num_f, in; Configuration is generated by random device with deviation Li/SQRT2.
Nicolai()
Constructor of Nicolai.
int in
ID number for the Nicolai map.
VectorXcd nrerr_nvec() const
Compute Vector for NR error estimate (complex type)
VectorXd nr_nvec() const
Compute Vector for NR method (Real type)
void nic_output(const VectorXi k, const VectorXd lambda, const int num_nrsol, const VectorXi signs, const int dmp, const double max_err, const SuperPotentialType spt) const
Output to file.
virtual bool operator==(const Nicolai &f)
Is identical (Li, num_f) ?
void show() const
Output Li, in, field.
virtual ~Nicolai()
Destructor of Nicolai.
virtual bool operator!=(const Nicolai &f)
Not identical (Li, num_f) ?
Execute the Newton–Raphson method; Combine solutions; Obtain sign det for each Scalar.
int num_sol() const
Number of solutions.
void phi_output(const int in, const VectorXi signs) const
Output to file.
NicolaiSol(const int n1, const int n2, const int n3)
Set members of the class Nicolai:
bool operator!=(const NicolaiSol &f)
Not identical (Li, num_f, field) ?
NicolaiSol & add_sol(const Scalar &f, const double &err)
Add a new solution; Ignore identical one.
void test_nr_method(const VectorXi k, const VectorXd lambda, const int LOOP, const int TRIAL, const SuperPotentialType t=SuperPotentialType::AlgebraA)
Observe the numerical convergence of NR method for each system.
int sign_det(const int n) const
Sign determinant (Jacobian)
bool operator==(const NicolaiSol &f)
Is identical (Li, num_f, field) ?
double max_err() const
Maximum error of NR method.
NicolaiSol()
Constructor of NicolaiSol.
double nr_method(const VectorXi k, const VectorXd lambda, const int num_nrsol, const int LOOP, const SuperPotentialType t=SuperPotentialType::AlgebraA)
Newton–Raphson method.
~NicolaiSol()
Destructor of NicolaiSol.
void show() const
Output Scalars.
Compute Jacobian and its sign determinant.
Compute Matrix and Vector for NR method.
An solution of Nicolai map; Update to a new solution with NR method; Compute some types of superpoten...
Scalar nr_loop(const Nicolai &nic)
An iteration of NR method; Compute LU decompositon; Overwrite own members.
~Scalar()
Destructor of Scalar.
Scalar()
Constructor of Scalar.
bool operator!=(const Scalar &f)
Not identical (Li, num_f, k, lambda, spt_type) ?
void show() const
Output Li, k, lambda, field.
PotentialNR superpotential_nr() const
Compute superpotential (class PotentialNR)
VectorXcd nr_error_vec(const Nicolai &nic) const
Compute error of NR method for each momentum.
Scalar(const Scalar &f, const VectorXd &v)
Set parameters identical to Scalar f; Configuration is given by VectorXd.
Scalar(const Scalar &f, const VectorXcd &v)
Set parameters identical to Scalar f; Configuration is given by VectorXcd.
bool operator==(const Scalar &f)
Is identical (Li, num_f, k, lambda, spt_type) ?
double nr_error(const Nicolai &nic) const
Compute error of NR method.
Scalar(const int n1, const int n2, const VectorXi n3, const VectorXd n4, const SuperPotentialType t=SuperPotentialType::AlgebraA)
Set Li, num_f, k, lambda, spt_type, and field configuration generated by Mersenne twistor with unit d...
Potential superpotential() const
Compute superpotential (class Potential)
bool is_identical(const Scalar &f) const
Identify two solutions.
Scalar(const VectorXcd &v, const VectorXi n3, const VectorXd n4, const int num_field=1, const SuperPotentialType t=SuperPotentialType::AlgebraA)
Generate from VectorXcd; Set num_f, k, lambda, and spt_type.
void scl_output(const int in, const int num_sol, const int i, const int sign, const double err) const
Output to file.
VectorXcd nrerr_svec() const
Compute Vector for NR error (complex type)
Distribution
Types of normal distributions.
const double SOL_ID_MAXVAL
Identification of scalar solutions.
const double NR_INTERRUPTION
Interruption of NR iteration.
SuperPotentialType
Types of superpotentials.
const double MAX_NRERR
Max error of NR iteration.
const int SuperPotentialTypeCustom_StdNumSol
Standard number of solutions for SuperPotentialType::Custom.
int SuperPotentialType_StdNumSol(const VectorXi k, const SuperPotentialType t)
Standard number of solutions for each SuperPotentialType.
Definition of the class Potential.