LandauGinzburg
Loading...
Searching...
No Matches
field_nicolai.cpp
Go to the documentation of this file.
1
7#include "field_nicolai.hpp"
8
9VectorXd Nicolai::nr_nvec () const {
10 int N = (Li+1) * (Li+1);
11 VectorXd NR = VectorXd::Zero(2*N * num_f);
12 for (int j = 0; j < num_f; ++j) {
13 int tmp = 2*N * j;
14 for (int i = 0; i < N; ++i) {
15 NR(tmp + i) = field(i, j).real();
16 NR(tmp + i + N) = field(i, j).imag();
17 }
18 }
19 return NR;
20}
21
22VectorXcd Nicolai::nrerr_nvec () const {
23 int N = (Li+1) * (Li+1);
24 int num_col = field.cols();
25 VectorXcd NR = VectorXcd::Zero(N * num_col);
26 for (int j = 0; j < num_col; ++j) {
27 int tmp = N * j;
28 for (int i = 0; i < N; ++i) {NR(tmp + i) = field(i, j);}
29 }
30 return NR;
31}
32
33void Nicolai::nic_output (const VectorXi k, const VectorXd lambda,
34 const int num_nrsol,
35 const VectorXi signs,
36 const int dmp,
37 const double max_err,
38 const SuperPotentialType spt) const {
39 std::string fnm;
40 if (lambda.size() == 1) {
41 fnm = "lm"; fnm += std::to_string(lambda(0));
42 } else {
43 for(int i = 0; i < lambda.size(); ++i) {
44 fnm += "lm"; fnm += std::to_string(i);
45 fnm += "-"; fnm += std::to_string(lambda(i));
46 }
47 }
48 if (k.size() == 1) {
49 fnm += "k"; fnm += std::to_string(k(0));
50 } else {
51 for (int i = 0; i < k.size(); ++i) {
52 fnm += "k"; fnm += std::to_string(i);
53 fnm += "-"; fnm += std::to_string(k(i));
54 }
55 }
56 fnm += "L"; fnm += std::to_string(Li);
57 fnm += "n"; fnm += std::to_string(in);
58
59 std::ofstream fo_n; std::string fnm_n;
60 fnm_n = "confs/nicolai_";
62 fnm_n += "spt-a_";
63 else if (spt==SuperPotentialType::AlgebraD)
64 fnm_n += "spt-d_";
65 else if (spt==SuperPotentialType::AlgebraE)
66 fnm_n += "spt-e_";
67 else if (spt==SuperPotentialType::Custom)
68 fnm_n += "spt-c_";
69 fnm_n += fnm; fnm_n += ".dat";
70 fo_n.open(fnm_n);
71
72 fo_n << "# Superpotential Type" << endl;
74 fo_n << "AlgebraA" << endl;
75 else if (spt==SuperPotentialType::AlgebraD)
76 fo_n << "AlgebraD" << endl;
77 else if (spt==SuperPotentialType::AlgebraE)
78 fo_n << "AlgebraE" << endl;
79 else if (spt==SuperPotentialType::Custom)
80 fo_n << "Custom" << endl;
81
82 fo_n << "# Physical Box Size, Power, Coupling" << endl
83 << Li << ", " << k.transpose() << ", " << lambda.transpose() << endl
84 << "# Nicolai Configuration Number" << endl
85 << in << endl
86 << "# Number of Solutions and Dumped-Solutions" << endl
87 << signs.size() << ", "
88 << dmp << " / " << (num_nrsol + dmp) << endl
89 << "# Signs of Determinants" << endl
90 << signs.transpose() << endl
91 << "# Max norm of residue" << endl
92 << max_err << endl
93 << "# Configuration of Gaussian random numbers" << endl
94 << std::setprecision(20) << field;
95 fo_n.close();
96 return;
97}
98
99void Nicolai::show () const {
100 cout << "# class Nicolai" << endl
101 << "Li = " << Li << endl
102 << "in = " << in << endl
103 << "field = " << endl
104 << field << endl;
105 return;
106}
107
108
109bool Scalar::is_identical (const Scalar &f) const {
110 double err = (field - f.field).norm() / field.norm();
111 if (err < sol_id_maxval) {return true;}
112 else {return false;}
113}
114
115VectorXcd Scalar::nrerr_svec () const {
116 int L = Li + 1;
117 int N = L * L;
118 int num_col = field.cols();
119 VectorXcd p = VectorXcd::Zero(N);
120 for (int i = 0; i < N; ++i) {
121 p(i) = 2 * M_PI / double(Li)
122 * (IM * double(L/2 - i/L) + double(L/2 - i%L));
123 }
124 VectorXcd NR = VectorXcd::Zero(N * num_col);
125 for (int j = 0; j < num_col; ++j) {
126 int tmp = N * j;
127 for (int i = 0; i < N; ++i) {NR(tmp + i) = p(i) * field(i, j);}
128 }
129 return NR;
130}
131
132
133Potential Scalar::superpotential_typealgebraA () const {
134 try {
135 if (num_f != 1)
136 throw "ERROR<Scalar::superpotential> Case SuperPotentialType::AlgebraA: number of field should be 1.";
137 if (k.size() != 1)
138 throw "ERROR<Scalar::superpotential> Case SuperPotentialType::AlgebraA: size of VectorXi for powers should be 1.";
139 if (lambda.size() != 1)
140 throw "ERROR<Scalar::superpotential> Case SuperPotentialType::AlgebraA: size of VectorXd for couplings should be 1.";
141 //
142 Field f = conv_pw(k(0)-2); f *= double(k(0)-1) * lambda(0);
143 return Potential {f.conf(), num_f};
144 //
145 } catch (const char *str) {
146 cerr << str << endl; return Potential {Li, num_f};}
147}
148Potential Scalar::superpotential_typealgebraD () const {
149 try {
150 if (num_f != 2)
151 throw "ERROR<Scalar::superpotential> Case SuperPotentialType::AlgebraD: number of fields should be 2.";
152 if (k.size() != 1)
153 throw "ERROR<Scalar::superpotential> Case SuperPotentialType::AlgebraD: size of VectorXi for powers should be 1.";
154 if (lambda.size() != 2)
155 throw "ERROR<Scalar::superpotential> Case SuperPotentialType::AlgebraD: size of VectorXd for couplings should be 2.";
156 //
157 Field Xk2 = conv_pw(k(0)-2,0); Xk2 *= double(k(0)-1) * lambda(0);
158 Field X1 = conv_pw(1, 0); X1 *= lambda(1);
159 Field Y1 = conv_pw(1, 1); Y1 *= lambda(1);
160 Field res = Xk2;
161 res.combine_with(Y1); res.combine_with(X1);
162 return Potential {res.conf(), num_f};
163 //
164 } catch (const char *str) {
165 cerr << str << endl; return Potential {Li, num_f};}
166}
167Potential Scalar::superpotential_typealgebraE () const {
168 try {
169 if (num_f != 2)
170 throw "ERROR<Scalar::superpotential> Case SuperPotentialType::AlgebraE (E_7): number of fields should be 2.";
171 if (lambda.size() != 2)
172 throw "ERROR<Scalar::superpotential> Case SuperPotentialType::AlgebraE (E_7): size of VectorXd for couplings should be 2.";
173 //
174 Field X1 = conv_pw(1, 0); Field Y1 = conv_pw(1, 1);
175 //Field XY;
176 //{Field tmp = X1; tmp.combine_with(Y1); XY = tmp.conv(0,1);}
177 Field XY = conv(0,1);
178 Field Y2 = conv_pw(2, 1);
179 X1 *= 2.0 * lambda(0); Y2 *= lambda(1); XY *= 2.0 * lambda(1);
180 Field res = X1;
181 res.combine_with(Y2); res.combine_with(XY);
182 return Potential {res.conf(), num_f};
183 //
184 } catch (const char *str) {
185 cerr << str << endl; return Potential {Li, num_f};}
186}
187
189 switch (spt_type){
190 default:
192 return superpotential_typealgebraA();
193 break;
195 return superpotential_typealgebraD();
196 break;
198 return superpotential_typealgebraE();
199 break;
201 return superpotential_typecustom();
202 break;
203 }
204}
205
206PotentialNR Scalar::superpotential_nr_typealgebraA () const {
207 try {
208 if (num_f != 1)
209 throw "ERROR<Scalar::superpotential_nr> Case SuperPotentialType::AlgebraA: number of field should be 1.";
210 if (k.size() != 1)
211 throw "ERROR<Scalar::superpotentia_nrl> Case SuperPotentialType::AlgebraA: size of VectorXi for powers should be 1.";
212 if (lambda.size() != 1)
213 throw "ERROR<Scalar::superpotential_nr> Case SuperPotentialType::AlgebraA: size of VectorXd for couplings should be 1.";
214 //
215 Field f1 = conv_pw(k(0)-2); f1 *= lambda(0);
216 Field f2;
217 {Field ff2 = f1; ff2.combine_with(*this); f2 = ff2.conv(0,1);}
218 f1 *= double(k(0)-1);
219 MatrixXcd m2 = f2.conf();
220 return PotentialNR {num_f, f1.conf(), m2, double(k(0)-1) * m2};
221 //
222 } catch (const char *str) {
223 cerr << str << endl; return PotentialNR {Li, num_f};}
224}
225PotentialNR Scalar::superpotential_nr_typealgebraD () const {
226 try {
227 if (num_f != 2)
228 throw "ERROR<Scalar::superpotential_nr> Case SuperPotentialType::AlgebraD: number of fields should be 2.";
229 if (k.size() != 1)
230 throw "ERROR<Scalar::superpotential_nr> Case SuperPotentialType::AlgebraD: size of VectorXi for powers should be 1.";
231 if (lambda.size() != 2)
232 throw "ERROR<Scalar::superpotential_nr> Case SuperPotentialType::AlgebraD: size of VectorXd for couplings should be 2.";
233 //
234 Field X1 = conv_pw(1, 0);
235 Field Y1 = conv_pw(1, 1);
236 Field Y2 = conv_pw(2, 1);
237 Field Xk2 = conv_pw(k(0)-2,0);
238 Field Xk1;
239 {Field tmp = X1; tmp.combine_with(Xk2); Xk1 = tmp.conv(0,1);}
240 //Field XY;
241 //{Field tmp = X1; tmp.combine_with(Y1); XY = tmp.conv(0,1);}
242 Field XY = conv(0,1);
243 // res1: (k0 - 1) lambda0 X^(k0-2)
244 // lambda1 Y
245 // lambda1 X
246 X1 *= lambda(1); Y1 *= lambda(1);
247 Xk2 *= double(k(0)-1) * lambda(0);
248 Field res1 = Xk2;
249 res1.combine_with(Y1); res1.combine_with(X1);
250 // res2: lambda0 X^(k0-1) + lambda1 Y^2 / 2
251 // lambda1 XY
252 Y2 *= lambda(1) / 2.0; XY *= lambda(1); Xk1 *= lambda(0);
253 Field res2;
254 {MatrixXcd m2 = Xk1.conf() + Y2.conf(); res2 = Field {m2};}
255 res2.combine_with(XY);
256 // res3: (k0-1) lambda0 X^(k0-1) + lambda1 Y^2
257 // 2 lambda1 XY
258 Y2 *= 2.0; XY *= 2.0; Xk1 *= double(k(0)-1);
259 Field res3;
260 {MatrixXcd m3 = Xk1.conf() + Y2.conf(); res3 = Field {m3};}
261 res3.combine_with(XY);
262 return PotentialNR {num_f, res1.conf(), res2.conf(), res3.conf()};
263 //
264 } catch (const char *str) {
265 cerr << str << endl; return PotentialNR {Li, num_f};}
266}
267PotentialNR Scalar::superpotential_nr_typealgebraE () const {
268 try {
269 if (num_f != 2)
270 throw "ERROR<Scalar::superpotential_nr> Case SuperPotentialType::AlgebraE (E_7): number of fields should be 2.";
271 if (lambda.size() != 2)
272 throw "ERROR<Scalar::superpotential_nr> Case SuperPotentialType::AlgebraE (E_7): size of VectorXd for couplings should be 2.";
273 //
274 Field X1 = conv_pw(1,0);
275 Field X2 = conv_pw(2,0);
276 Field Y1 = conv_pw(1,1);
277 Field Y2 = conv_pw(2,1);
278 Field Y3;
279 {Field tmp = Y1; tmp.combine_with(Y2); Y3 = tmp.conv(0,1);}
280 //Field XY;
281 //{Field tmp = X1; tmp.combine_with(Y1); XY = tmp.conv(0,1);}
282 Field XY = conv(0,1);
283 Field XYY;
284 {Field tmp = X1; tmp.combine_with(Y2); XYY = tmp.conv(0,1);}
285 Field YXY;
286 {Field tmp = Y1; tmp.combine_with(XY); YXY = tmp.conv(0,1);}
287 Field XY2;
288 {
289 MatrixXcd tmp = ( XYY.conf() + 2.0 * YXY.conf() ) / 3.0;
290 XY2 = Field {tmp};
291 }
292 // res1: 2 lambda0 X
293 // lambda1 Y^2
294 // 2 lambda1 XY
295 X1 *= 2.0 * lambda(0); Y2 *= lambda(1); XY *= 2.0 * lambda(1);
296 Field res1 = X1;
297 res1.combine_with(Y2); res1.combine_with(XY);
298 // res2: lambda0 X^2 + lambda1 Y^3 / 3
299 // lambda1 X Y^2
300 X2 *= lambda(0); Y3 *= lambda(1) / 3.0; XY2 *= lambda(1);
301 Field res2;
302 {MatrixXcd m2 = X2.conf() + Y3.conf(); res2 = Field {m2};}
303 res2.combine_with(XY2);
304 // res3: 2 lambda0 X^2 + lambda1 Y^3
305 // 3 lambda1 X Y^2
306 X2 *= 2.0; Y3 *= 3.0; XY2 *= 3.0;
307 Field res3;
308 {MatrixXcd m3 = X2.conf() + Y3.conf(); res3 = Field {m3};}
309 res3.combine_with(XY2);
310 return PotentialNR {num_f, res1.conf(), res2.conf(), res3.conf()};
311 //
312 } catch (const char *str) {
313 cerr << str << endl; return PotentialNR {Li, num_f};}
314}
315
317 switch (spt_type){
318 default:
320 return superpotential_nr_typealgebraA();
321 break;
323 return superpotential_nr_typealgebraD();
324 break;
326 return superpotential_nr_typealgebraE();
327 break;
329 return superpotential_nr_typecustom();
330 break;
331 }
332}
333
334
337 VectorXd v;
338 v = p_nr.nr_pvec() + nic.nr_nvec();
339 MatrixXd m = p_nr.nr_mat();
340 VectorXd v_res = m.partialPivLu().solve(v);
341 *this = Scalar {*this, v_res}; return *this;
342}
343
344VectorXcd Scalar::nr_error_vec (const Nicolai &nic) const {
346 VectorXcd v = nrerr_svec(); // v = (p * v) //
347 VectorXcd w = ptn.nrerr_pvec();
348 VectorXcd n = nic.nrerr_nvec();
349 return (v + w.conjugate() - n) / n.norm();
350};
351
352void Scalar::scl_output (const int in, const int num_sol, const int i,
353 const int sign, const double err) const {
354 std::string fnm;
355 if (lambda.size() == 1) {
356 fnm = "lm"; fnm += std::to_string(lambda(0));
357 } else {
358 for(int i = 0; i < lambda.size(); ++i) {
359 fnm += "lm"; fnm += std::to_string(i);
360 fnm += "-"; fnm += std::to_string(lambda(i));
361 }
362 }
363 if (k.size() == 1) {
364 fnm += "k"; fnm += std::to_string(k(0));
365 } else {
366 for (int i = 0; i < k.size(); ++i) {
367 fnm += "k"; fnm += std::to_string(i);
368 fnm += "-"; fnm += std::to_string(k(i));
369 }
370 }
371 fnm += "L"; fnm += std::to_string(Li);
372 fnm += "n"; fnm += std::to_string(in);
373
374 std::ofstream fo_p; std::string fnm_p;
375 fnm_p = "confs/phi_";
376 if (spt_type==SuperPotentialType::AlgebraA)
377 fnm_p += "spt-a_";
378 else if (spt_type==SuperPotentialType::AlgebraD)
379 fnm_p += "spt-d_";
380 else if (spt_type==SuperPotentialType::AlgebraE)
381 fnm_p += "spt-e_";
382 else if (spt_type==SuperPotentialType::Custom)
383 fnm_p += "spt-c_";
384 fnm_p += fnm;
385 fnm_p += "_"; fnm_p += std::to_string(i); fnm_p += ".dat";
386 fo_p.open(fnm_p);
387
388 fo_p << "# Superpotential Type" << endl;
389 if (spt_type==SuperPotentialType::AlgebraA)
390 fo_p << "AlgebraA" << endl;
391 else if (spt_type==SuperPotentialType::AlgebraD)
392 fo_p << "AlgebraD" << endl;
393 else if (spt_type==SuperPotentialType::AlgebraE)
394 fo_p << "AlgebraE" << endl;
395 else if (spt_type==SuperPotentialType::Custom)
396 fo_p << "Custom" << endl;
397
398 fo_p << "# Physical Box Size, Power, Coupling" << endl
399 << Li << ", " << k.transpose() << ", " << lambda.transpose() << endl
400 << "# Nicolai Configuration Number" << endl
401 << in << endl
402 << "# Solution Configuration Number" << endl
403 << i << " / " << num_sol << endl
404 << "# Sign of Determinant" << endl << sign << endl
405 << "# Norm of residue" << endl << err << endl
406 << "# Configuration of a scalar field solution" << endl
407 << std::setprecision(20) << field;
408 fo_p.close();
409}
410
411void Scalar::show () const{
412 cout << "# class Scalar" << endl
413 << "Li = " << Li << endl
414 << "k = " << k.transpose() << endl
415 << "lambda = " << lambda.transpose() << endl
416 << "field = " << endl
417 << field << endl;
418 return;
419}
420
421
422NicolaiSol &NicolaiSol::add_sol(const Scalar &f, const double &err) {
423 try {
424 if (fs.size() == 0) {
425 fs.push_back(f); errs.push_back(err); return *this;
426 }
427 if (fs[0] != f)
428 throw "ERROR<NicolaiSol::add_sol> Sizes of Scalars are not same.";
429 bool id = true;
430 for(int i = 0; i < fs.size(); ++i) {
431 if ( fs[i].is_identical(f) ) {id = false; break;}
432 }
433 if (id) {fs.push_back(f); errs.push_back(err);} return *this;
434 } catch (const char *str) {cerr << str << endl; return *this;}
435};
437 for (int i = 0; i < sol.fs.size(); ++i) {
438 add_sol(sol.fs[i], sol.errs[i]);
439 }
440 return *this;
441};
442
443double NicolaiSol::nr_method (const VectorXi k, const VectorXd lambda,
444 const int num_nrsol, const int LOOP,
445 const SuperPotentialType t) {
446 try {
447 if (Li % 2 != 0)
448 throw "ERROR<NicolaiSol::nr_method> Box size is not EVEN.";
449 int dmp = 0;
450 for (int i = 0; i < num_nrsol; ++i) {
451 Scalar scl(Li, num_f, k, lambda, t);
452 double err; double min_err;
453 for (int j = 0; j < LOOP; ++j) {
454 scl.nr_loop(*this); err = scl.nr_error(*this);
455 if (err < MAX_NRERR) break;
456 if (j == 0 || err < min_err) min_err = err;
457 else if (err >= min_err * nr_interruption) break;
458 }
459 if (err < MAX_NRERR) add_sol(scl, err);
460 else {++dmp; --i;}
461 }
462 return dmp;
463 } catch (const char *str) {cerr << str << endl; return -1;}
464}
465
466void NicolaiSol::test_nr_method (const VectorXi k, const VectorXd lambda,
467 const int LOOP, const int TRIAL,
468 const SuperPotentialType t) {
469 try {
470 if (Li % 2 != 0)
471 throw "ERROR<NicolaiSol::test_nr_method> Box size is not EVEN.";
472 double err;
473 for (int j = 0; j < TRIAL; ++j) {
474 cout << endl
475 << "##########################################" << endl
476 << j+1 << "-th trial" << endl
477 << "##########################################" << endl
478 << "Physical Box Size : " << Li << endl
479 << "Power in SuperPotential: " << k.transpose() << endl
480 << "Coupling : " << lambda.transpose()
481 << endl << endl;
482
483 Scalar scl(Li, num_f, k, lambda, t);
484 err = scl.nr_error(*this);
485 cout << "Initial Error of NR " << endl
486 << err << endl << endl;
487
488 clock_t start_nr = clock();
489
490 double min_err;
491 for (int i = 0; i < LOOP; ++i) {
492 cout << "NR iteration " << std::setw(3) << i+1 << ": ";
493 Scalar tmp = scl;
494 scl.nr_loop(*this); err = scl.nr_error(*this);
495 int tmp_id = (scl.is_identical(tmp))?(1):(0);
496 cout << "Error of NR "
497 << std::setprecision(15) << err
498 << " (" << tmp_id << ")" << endl;
499 if (err < MAX_NRERR) break;
500 if (i == 0 || err < min_err) min_err = err;
501 else if (err >= min_err * nr_interruption) break;
502 }
503 if (err < MAX_NRERR) add_sol(scl, err);
504
505 clock_t end_nr = clock();
506 cout << (double)(end_nr-start_nr) / CLOCKS_PER_SEC << "sec"
507 << endl << endl;
508
509 if (err < MAX_NRERR) break;
510 }
511 return;
512 } catch (const char *str) {cerr << str << endl; return;}
513}
514
515void NicolaiSol::phi_output (const int in, const VectorXi signs) const {
516 int num_sol = fs.size();
517 for (int i = 0; i < num_sol; ++i) {
518 fs[i].scl_output(in, num_sol, i, signs(i), errs[i]);
519 }
520}
521
522void NicolaiSol::show() const {
523 try {
524 int fssize = fs.size();
525 if (fssize == 0)
526 throw "ERROR<NicolaiSol::show> No entries in this object.";
527 cout << "# class NicolaiSol with " << fssize << " Scalars" << endl;
528 for (int i = 0; i < fssize; ++i) {
529 cout << "# entry: " << i << endl << "#"; fs[i].show();
530 }
531 return;
532 } catch (const char *str) {cerr << str << endl; return;}
533}
534
535int SuperPotentialType_StdNumSol (const VectorXi k, const SuperPotentialType t) {
537 return k(0)-1;
539 return k(0)+1;
541 return 7;
542 else if (t==SuperPotentialType::Custom)
544}
Generate normal distributions; Compute convolutions.
MatrixXcd field
Superfields.
MatrixXcd conf() const
Field combine_with(const Field &f)
Combine with another Field object; Mutate field (Li and num_f are unchaged) except for the case that ...
int Li
Physical box size, N_0=N_1.
Field conv(const int n1, const int n2) const
Convolution field(:,n1)*field(:,n2)
Field conv_pw(const int pw, const int n=0) const
Convolution field(:,n)*field(:,n)*...*field(:,n)
int num_f
Number of superfields.
Nicolai map; Compute Vector for NR method.
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.
void show() const
Output Li, in, field.
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 & 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.
double nr_method(const VectorXi k, const VectorXd lambda, const int num_nrsol, const int LOOP, const SuperPotentialType t=SuperPotentialType::AlgebraA)
Newton–Raphson method.
void show() const
Output Scalars.
Compute Jacobian and its sign determinant.
Compute Matrix and Vector for NR method.
VectorXd nr_pvec() const
Compute Vector for NR method (Real type)
MatrixXd nr_mat() const
Compute Matrix for NR method (Real type)
VectorXcd nrerr_pvec() const
Compute Vector for NR error estimate (complex type)
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.
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.
double nr_error(const Nicolai &nic) const
Compute error of NR method.
Potential superpotential() const
Compute superpotential (class Potential)
bool is_identical(const Scalar &f) const
Identify two solutions.
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)
const std::complex< double > IM(0, 1.0)
Imaginary unit.
int SuperPotentialType_StdNumSol(const VectorXi k, const SuperPotentialType t)
Standard number of solutions for each SuperPotentialType.
Definition of the classes associated with Nicolai map.
SuperPotentialType
Types of superpotentials.
const double MAX_NRERR
Max error of NR iteration.
const int SuperPotentialTypeCustom_StdNumSol
Standard number of solutions for SuperPotentialType::Custom.
Definition field_spt.cpp:14