HepLib
Loading...
Searching...
No Matches
SD.h
Go to the documentation of this file.
1
6#pragma once
7
8extern "C" {
9 #include <quadmath.h>
10}
11
12#include <dlfcn.h>
13#include <string>
14#include <signal.h>
15#include <sys/syscall.h>
16#include <sys/wait.h>
17#include <sstream>
18#include <ios>
19#include <regex>
20#include <complex>
21#include "mpreal.h"
22#include "BASIC.h"
23
27namespace HepLib::SD {
28
29 using namespace HepLib;
30
31 /*-----------------------------------------------------*/
32 // Global Functions
33 /*-----------------------------------------------------*/
34 exvector get_xy_from(ex pol);
35 exvector get_x_from(ex pol);
36 exvector get_y_from(ex pol);
37 exvector get_z_from(ex pol);
38 exvector get_pl_from(ex pol);
39 int epsRank(ex,ex);
40 int vsRank(ex);
41 int x_free_index(ex expr);
42 int y_free_index(ex expr);
43 ex Factor(const ex expr);
44 ex FactorOutX(const ex expr);
45 ex FactorFT(const ex & expr);
46 ex exp_simplify(const ex);
47 ex pow_simplify(const ex);
48 ex xyz_pow_simplify(const ex expr);
49
50 /*-----------------------------------------------------*/
51 // Customized GiNaC Function
52 /*-----------------------------------------------------*/
53 DECLARE_FUNCTION_1P(fabs)
54 DECLARE_FUNCTION_1P(PL)
55 DECLARE_FUNCTION_1P(CT)
56 DECLARE_FUNCTION_2P(FTX)
57 DECLARE_FUNCTION_2P(VE)
58 DECLARE_FUNCTION_2P(VEO)
59 DECLARE_FUNCTION_2P(VEO2)
60 DECLARE_FUNCTION_2P(CV) // not used internally, for user use only
61 DECLARE_FUNCTION_1P(WRA) // for wick rotation
62 extern int VEO_Digits;
63
75 ex Prefactor = 1;
76 bool isQuasi = false;
77 bool isAsy = false;
78 };
79
83 struct XIntegrand {
87 lst Deltas;
88 bool isAsy = false;
89 };
90
94 class SecDecBase {
95 public:
96 virtual ~SecDecBase() { }
97 virtual vector<exmap> x2y(const ex &xpol) =0;
98 vector<exmap> x2y(const lst &xpols);
100 static bool VerifySD(vector<exmap> vmap, bool quick = true);
101 static ex XMonomials(const ex & expr);
102 };
103
107 class SecDecG : public SecDecBase {
108 public:
109 vector<exmap> x2y(const ex &xpol) override;
110 static vector<vector<int>> RunQHull(const matrix &pts);
111 private:
112 vector<matrix> ZeroFaces(const matrix &pts);
113 matrix NormalVectors(const vector<matrix> &zfs);
114 matrix DualCone(const matrix &pts);
115 vector<matrix> SimplexCones(matrix pts);
116 };
117
118 /*-----------------------------------------------------*/
119 // Integrator Classes
120 /*-----------------------------------------------------*/
121
122 typedef long double dREAL;
123 typedef complex<dREAL> dCOMPLEX;
124 typedef __float128 qREAL;
125 typedef __complex128 qCOMPLEX;
126 typedef mpfr::mpreal mpREAL;
127 typedef complex<mpREAL> mpCOMPLEX;
128
133 public:
134 virtual ~IntegratorBase() { }
135
136 typedef int (*SDD_Type) (const unsigned int xn, const dREAL x[], const unsigned int yn, dREAL y[], const dREAL pl[], const dREAL las[]);
137 typedef int (*SDQ_Type) (const unsigned int xn, const qREAL x[], const unsigned int yn, qREAL y[], const qREAL pl[], const qREAL las[]);
138 typedef int (*SDMP_Type) (const unsigned int xn, const mpREAL x[], const unsigned int yn, mpREAL y[], const mpREAL pl[], const mpREAL las[]);
139 typedef qREAL (*FT_Type) (const qREAL xx[], const qREAL pl[]);
140 virtual ex Integrate(size_t n=0) =0;
141
142 FT_Type FT = NULL;
152 int XDim;
153
154 qREAL EpsAbs = 1E-5;
156 int ReIm = 3; // 1-Re, 2-Im, 3-ReIm
157 int MPDigits = 64;
158 size_t NEval = 0;
159 protected:
160 time_t StartTimer; // used internally
161 size_t RunTime = 0;
162 };
163
167 class HCubature : public IntegratorBase {
168 public:
169 static int Wrapper(unsigned int xdim, size_t npts, const qREAL *x, void *fdata, unsigned int ydim, qREAL *y);
170
171 typedef void (*PrintHookerType) (qREAL*, qREAL*, size_t *, void *);
172
173 virtual ex Integrate(size_t n=0) override;
174 static void DefaultPrintHooker(qREAL*, qREAL*, size_t *, void*);
176 bool use_last = false;
177
178 int DQMP = 0;
179 int QXDim = 0;
180 int MPXDim = 0;
181 qREAL QXLimit = 1E-6Q;
185 size_t RunMAX = 100;
186 size_t RunPTS = 100000;
187 size_t MinPTS = 0;
188 size_t MaxPTS; // used internally
189 unsigned int Threads = 0;
190 private:
191 int NANMax = 250;
192 int nNAN = 0;
193 size_t lastNRUN = 0;
194 qREAL LastResult[2];
195 qREAL LastAbsErr[2];
196 int lastnNAN = 0;
197 int LastState = 0;
198
199 int XDQMP(qREAL const *x);
200 };
201
206 public:
207 static int Wrapper(unsigned int xdim, size_t npts, const mpREAL *x, void *fdata, unsigned int ydim, mpREAL *y);
208 typedef void (*PrintHookerType) (mpREAL*, mpREAL*, size_t *, void *);
209 virtual ex Integrate(size_t n=0) override;
210 static void DefaultPrintHooker(mpREAL*, mpREAL*, size_t *, void*);
212 size_t RunMAX = 100;
213 size_t RunPTS = 100000;
214 size_t MinPTS = 0;
215 size_t MaxPTS; // used internally
216 unsigned int Threads = 0;
217 private:
218 ex mp2ex(const mpREAL & num);
219 int NANMax = 250;
220 int nNAN = 0;
221 bool use_last = false;
222 size_t lastNRUN = 0;
223 mpREAL LastResult[2];
224 mpREAL LastAbsErr[2];
225 int lastnNAN = 0;
226 int LastState = 0;
227 };
228
232 class TanhSinhMP : public IntegratorBase {
233 public:
234 static int Wrapper(unsigned ydim, mpREAL *y, mpREAL *e, unsigned xdim, const mpREAL *x, void *fdata);
235 typedef void (*PrintHookerType) (mpREAL *, mpREAL *, size_t *, void *);
236 virtual ex Integrate(size_t n=0) override;
237 static void DefaultPrintHooker(mpREAL *, mpREAL *, size_t *, void *);
239 TanhSinhMP(size_t k=10);
240 private:
241 ex mp2ex(const mpREAL & num);
242 size_t K = 10;
243 };
244
248 class QuadMP : public IntegratorBase {
249 public:
250 static int Wrapper(unsigned yn, mpREAL *y, mpREAL *e, unsigned xdim, const mpREAL *x, void *fdata);
251 typedef void (*PrintHookerType) (mpREAL*, mpREAL*, size_t *, void *);
252 virtual ex Integrate(size_t n=0) override;
253 static void DefaultPrintHooker(mpREAL *, mpREAL *, size_t *, void *);
255 QuadMP() { }
256 QuadMP(size_t m) : mGK(m) { }
257 size_t nGK = 100;
258 size_t mGK = 10;
259 private:
260 ex mp2ex(const mpREAL & num);
261 };
262
263 typedef long double dREAL;
268 public:
269 typedef dREAL (*FunctionType)(int nvars, dREAL* x, dREAL* pl, dREAL *las);
270 virtual dREAL FindMinimum(int nvars, FunctionType func, dREAL *PL = NULL, dREAL *las = NULL, dREAL *UB = NULL, dREAL *LB = NULL, dREAL *IP = NULL, bool compare0 = false, int TryPTS=0, int SavePTS=0) =0;
271 dREAL ZeroValue = -1E-20;
272 virtual void Minimize(int nvars, FunctionType func, dREAL *ip)=0;
273 virtual void ForceStop()=0;
274 };
275
279 class HookeJeeves : public MinimizeBase {
280 public:
281 virtual dREAL FindMinimum(int nvars, FunctionType func, dREAL *PL = NULL, dREAL *las = NULL, dREAL *UB = NULL, dREAL *LB = NULL, dREAL *IP = NULL, bool compare0 = false, int TryPTS=0, int SavePTS=0) override;
282 bool Exit = false;
283 virtual void Minimize(int nvars, FunctionType func, dREAL *ip) override;
284 virtual void ForceStop() override;
285
286 private:
287 dREAL best_nearby(dREAL* delta, dREAL* point, dREAL prevbest, int nvars);
288 int hooke(int nvars, dREAL* startpt, dREAL* endpt, dREAL rho, dREAL epsilon, int itermax);
289 dREAL ObjectWrapper(int nvars, dREAL* x);
290 FunctionType ObjectFunction;
291 dREAL UpperBound[50];
292 dREAL LowerBound[50];
293 dREAL *PL;
294 dREAL *LAS;
295 };
296
300 class CppFormat : public print_csrc_cl_N {
301 GINAC_DECLARE_PRINT_CONTEXT(CppFormat, print_csrc_cl_N)
302 public:
303 CppFormat(ostream &os, const string & s = "L", unsigned opt = 0);
304 string suffix;
305 string MQuote = "\"";
306
307 template<class T> const CppFormat & operator << (const T & v) const {
308 s << v;
309 return *this;
310 };
311 const CppFormat & operator << (const basic & v) const;
312 const CppFormat & operator << (const ex & v) const;
313 const CppFormat & operator << (const lst & v) const;
314 const CppFormat & operator<<(std::ostream& (*v)(std::ostream&)) const;
315
316 #ifndef DOXYGEN_SKIP
317 class _init {
318 public: _init();
319 };
320 #endif
321 private:
322 #ifndef DOXYGEN_SKIP
323 static _init CppFormat_init;
324 #endif
325 static void print_integer(const CppFormat & c, const cln::cl_I & x);
326 static void print_real(const CppFormat & c, const cln::cl_R & x);
327 static void print_numeric(const numeric & p, const CppFormat & c, unsigned level);
328 };
329
330 class ExFormat : public print_dflt {
331 GINAC_DECLARE_PRINT_CONTEXT(ExFormat, print_dflt)
332 public:
333 ExFormat(ostream &os, const string & s = "L", unsigned opt = 0);
334 string suffix;
335 string type = "ex";
336 string MQuote = "\"";
337
338 template<class T> const ExFormat & operator << (const T & v) const {
339 s << v;
340 return *this;
341 };
342 const ExFormat & operator << (const basic & v) const;
343 const ExFormat & operator << (const ex & v) const;
344 const ExFormat & operator << (const lst & v) const;
345 const ExFormat & operator<<(std::ostream& (*v)(std::ostream&)) const;
346
347 class _init {
348 public: _init();
349 };
350 private:
351 static _init ExFormat_init;
352 static void print_integer(const ExFormat & c, const cln::cl_I & x);
353 static void print_real(const ExFormat & c, const cln::cl_R & x);
354 static void print_numeric(const numeric & p, const ExFormat & c, unsigned level);
355 };
356
357 /*-----------------------------------------------------*/
358 // VE
359 /*-----------------------------------------------------*/
360 ex VESimplify(ex expr);
361 ex VEResult(ex expr);
362 ex VEResult2(ex expr); // keep two digits in error
363 ex VEMaxErr(ex expr);
364
368 class ErrMin {
369 public:
371 static qREAL *paras;
374 static size_t MaxRND;
375 static size_t RunRND;
377 static dREAL *lambda;
378 static dREAL hjRHO;
379 static ex lastResErr;
380 static dREAL IntError(int nvars, dREAL *las, dREAL *n1, dREAL *n2);
381 };
382
386 class ChengWu {
387 public:
388 static bool isProjective(const ex fe, const ex delta);
389 static void Projectivize(ex &fe, const ex delta, const ex xsum=0);
390 static void Scalelize(ex &fe, const lst xs, const ex cy);
391 static void Scalelize(ex &fe, const ex xi, const ex cy);
392 static exvector Binarize(ex const fe, ex const eqn);
393 static void Binarize(ex const fe, ex const eqn, exvector & ovec);
394 static bool isLinearizable(const ex ft, const ex delta, lst & xcs);
395 static void Linearize(const lst xcs, ex & fe, ex & ft);
396 static bool isPartilizable(const ex ft, const ex delta, lst &xcs, int mode=0);
397 static void Partilize(const lst xcs, const lst delta, const ex fe, exvector & ret_lst);
398
399 static exvector Evaluate(const ex & fe);
400 static exvector WickRotation(const exvector & fe_vec);
401 static exvector Apply(const exvector & fe_vec, const ex & ft=0);
402 inline static exvector Apply(const ex & fe, const ex & ft=0) {
403 exvector fe_vec;
404 fe_vec.push_back(fe);
405 return Apply(fe_vec, ft);
406 }
407 };
408
412 class SecDec {
413
414 public:
415 static bool use_dlclose;
416 static string cpp;
417
418 lst eps_lst = { lst{eps,0}, lst{ep,0} }; // { {epi, epiN}, ... }
419 int vsN = 0;
421 bool vs_before_ep = false;
422 bool use_XMonomials = true;
423 bool disable_Contour = false;
425 exvector FunExp; // each item : { {f1,f2,...}, {n1,n2,...}, { delta_list1, delta_list2 } }
426 exvector Integrands;
427 exvector expResult;
432 bool IsZero = false;
433 bool CheckEnd = false;
434 bool use_ErrMin = false;
435 bool use_las = false;
436 bool save_las = false;
437 int IBF = 0; // 0 - not use IBF
438 bool use_Normalizes = true;
439 bool use_XReOrders = false;
440 int MPDigits = 0; // digits in mpREAL for MP
441 lst BisectionPoints = lst { ex(1)/13, ex(1)/19, ex(1)/29, ex(1)/59, ex(1)/41, ex(1)/37, ex(1)/43, ex(1)/53 };
442
443 map<int, numeric> Parameter; // used Contours and Integrates, use PL in Prepares part
444
445 // used in Contours
446 bool CTMaxF = true;
447 dREAL CTLaMax = 10; // CTLaMax<0 for explict REAL mode
448 int CTTryPTS = 3;
449 int CTSavePTS = 3;
450
451 size_t LambdaSplit = 5;
453 int CTryM = 1; // try lambda in Middle
454 int CTryL = 1; // try lambda in Left
455 int CTryR = 1; // try lambda in Right
456 size_t CTryI = 10000; // integrator limit in CTry
458 int soLimit = 10000;
459
460 qREAL EpsAbs = 1E-4;
461 int ReIm = 3; // 1-Re, 2-Im, 3-ReIm
462
464 void Initialize(XIntegrand xint);
465 void BiSection(ex xi, ex x0);
466 void Normalizes();
467 void Scalelesses();
468 void SDPrepares();
469 void EpsExpands();
470 void RemoveDeltas();
471 void XReOrders();
472 void XTogethers();
473 void XExpands();
474 void KillPowers(int bits=1+2);
475 bool IsBad(ex f, vector<exmap> vmap);
476 exvector AutoEnd(ex po_ex);
477 void CIPrepares(const string & key = "");
478 void Contours(const string & key = "", const string & pkey = "");
479 void Integrates(const string & key="", const string & pkey="", int kid=0);
480 void ReIntegrates(const string & key, const string & pkey, qREAL err);
481 void Evaluate(FeynmanParameter fpi, const string & key = "");
482 void Evaluate(XIntegrand xint, const string & key = "");
483 void Evaluate(const exvector & FunExp, const string & key = "");
484 void MB();
485 void XEnd();
486 void ChengWu(const ex & ft=0);
487
488 static bool VerifySD(vector<exmap> vmap, bool quick = true);
489 static ex XRefined(ex const & ft);
490 static lst XRefined_lst(ex const & ft);
491 static ex PrefactorFIESTA(int nLoop);
492 ex VEResult();
493 void VEPrint(bool endlQ=true);
494 static ex PExpand(ex xpol, bool delta=true);
495 static int PRank(matrix m);
496 static ex ContinuousWRA(ex expr_in, int nc=15);
497
498 ~SecDec();
499
500 private:
501 exvector DS(const ex po_ex);
502 lst Normalize(const ex &input);
503 void DoAsy();
504 bool KillPowerD(ex fe, int kpi);
505 bool KillPower(ex fe, int kpi, int bits);
506
507 void CompileMatDet();
508 vector<lst> ciResult;
509 lst FT_N_XN; // list of { ft, n, xn }
510 exmap LambdaMap;
511
512 };
513
517 class cseParser {
518 public:
519 ex Parse(ex expr, bool reset=true);
520 string oc = "o";
521 int on();
522 vector<pair<int, ex>> os();
523 private:
524 map<ex, ex, ex_is_less> ex_var_map;
525 int no = 0;
526 vector<pair<int, ex>> o_ex_vec;
527 map<int, int> used;
528 };
529
530 class cse_Parser { // just a bit try
531 public:
532 ex Parse(ex expr) { return Parse(expr, true); }
533 string v = "v";
534 int vn();
535 const vector<pair<int,ex>> & vs();
536 private:
537 ex Parse(ex expr, bool reset);
538 map<ex, int, ex_is_less> exn;
539 int no = 0;
540 exvector exv;
541 map<int, int> used;
542 vector<pair<int,ex>> on_ex_vec;
543 };
544
545 vector<matrix> Triangularize(const lst & fs_in, const ex & xs_in, const lst & nsubs={});
546 void Triangularize(exvector & FunExp, const lst & fs_in, const ex & xs_in, const lst & nsubs={});
547
548}
549
550
Basic header file.
class to manipulate with Cheng-Wu theorem
Definition SD.h:386
static bool isPartilizable(const ex ft, const ex delta, lst &xcs, int mode=0)
isPartilize w.r.t. F-term, generized to isLinearizable
Definition ChengWu.cpp:409
static bool isLinearizable(const ex ft, const ex delta, lst &xcs)
Linearize w.r.t. F-term.
Definition ChengWu.cpp:313
static exvector Apply(const exvector &fe_vec, const ex &ft=0)
ChengWu-rized on the vector of fe, note that 1st element of the output, which needs to be droped,...
Definition ChengWu.cpp:61
static exvector Binarize(ex const fe, ex const eqn)
Binarize the input fe, w.r.t. the linear eqn.
Definition ChengWu.cpp:232
static exvector Apply(const ex &fe, const ex &ft=0)
Definition SD.h:402
static void Projectivize(ex &fe, const ex delta, const ex xsum=0)
to Projectivize the input fe, the fe will be updated
Definition ChengWu.cpp:119
static void Partilize(const lst xcs, const lst delta, const ex fe, exvector &ret_lst)
Partilize function, generized to Linearize.
Definition ChengWu.cpp:501
static void Scalelize(ex &fe, const lst xs, const ex cy)
to Scalelize the input fe, the fe will be updated
Definition ChengWu.cpp:182
static bool isProjective(const ex fe, const ex delta)
to check the input fe is Projective or NOT w.r.t. delta
Definition ChengWu.cpp:95
static exvector Evaluate(const ex &fe)
ChengWu Internal, make sure ft in the first term, ONLY appear in ChengWu.cpp.
Definition ChengWu.cpp:665
static void Linearize(const lst xcs, ex &fe, ex &ft)
Linearize w.r.t. xcs_in.
Definition ChengWu.cpp:340
static exvector WickRotation(const exvector &fe_vec)
WickRotation, just check WRA exist or NOT to see successful or NOT. Still Experimental.
Definition ChengWu.cpp:760
class to export GiNaC expression to cpp format
Definition SD.h:300
const CppFormat & operator<<(const T &v) const
Definition SD.h:307
ErrMin with HookeJeeves.
Definition SD.h:368
static ex lastResErr
Definition SD.h:379
static IntegratorBase * Integrator
Definition SD.h:370
static size_t RunRND
Definition SD.h:375
static dREAL err_max
Definition SD.h:372
static MinimizeBase * miner
Definition SD.h:376
static qREAL * paras
Definition SD.h:371
static dREAL IntError(int nvars, dREAL *las, dREAL *n1, dREAL *n2)
Definition ErrMin.cpp:22
static dREAL * lambda
Definition SD.h:377
static size_t MaxRND
Definition SD.h:374
static dREAL hjRHO
Definition SD.h:378
static dREAL err_min
Definition SD.h:373
string suffix
Definition SD.h:334
const ExFormat & operator<<(const T &v) const
Definition SD.h:338
string MQuote
Definition SD.h:336
numerical integrator using HCubatureMP
Definition SD.h:205
static int Wrapper(unsigned int xdim, size_t npts, const mpREAL *x, void *fdata, unsigned int ydim, mpREAL *y)
static void DefaultPrintHooker(mpREAL *, mpREAL *, size_t *, void *)
virtual ex Integrate(size_t n=0) override
void(* PrintHookerType)(mpREAL *, mpREAL *, size_t *, void *)
Definition SD.h:208
unsigned int Threads
Definition SD.h:216
PrintHookerType PrintHooker
Definition SD.h:211
numerical integrator using HCubature
Definition SD.h:167
virtual ex Integrate(size_t n=0) override
static void DefaultPrintHooker(qREAL *, qREAL *, size_t *, void *)
PrintHookerType PrintHooker
Definition SD.h:175
unsigned int Threads
Definition SD.h:189
static int Wrapper(unsigned int xdim, size_t npts, const qREAL *x, void *fdata, unsigned int ydim, qREAL *y)
Definition HCubature.cpp:34
void(* PrintHookerType)(qREAL *, qREAL *, size_t *, void *)
Definition SD.h:171
class to minimize a function using HookeJeeves
Definition SD.h:279
virtual void Minimize(int nvars, FunctionType func, dREAL *ip) override
virtual dREAL FindMinimum(int nvars, FunctionType func, dREAL *PL=NULL, dREAL *las=NULL, dREAL *UB=NULL, dREAL *LB=NULL, dREAL *IP=NULL, bool compare0=false, int TryPTS=0, int SavePTS=0) override
virtual void ForceStop() override
base for numerical integrator
Definition SD.h:132
SDMP_Type IntegrandMP
Definition SD.h:145
const dREAL * dParameter
Definition SD.h:147
qREAL(* FT_Type)(const qREAL xx[], const qREAL pl[])
Definition SD.h:139
int(* SDD_Type)(const unsigned int xn, const dREAL x[], const unsigned int yn, dREAL y[], const dREAL pl[], const dREAL las[])
Definition SD.h:136
const dREAL * dLambda
Definition SD.h:146
const mpREAL * mpLambda
Definition SD.h:150
int(* SDQ_Type)(const unsigned int xn, const qREAL x[], const unsigned int yn, qREAL y[], const qREAL pl[], const qREAL las[])
Definition SD.h:137
const qREAL * qParameter
Definition SD.h:149
virtual ~IntegratorBase()
Definition SD.h:134
virtual ex Integrate(size_t n=0)=0
int(* SDMP_Type)(const unsigned int xn, const mpREAL x[], const unsigned int yn, mpREAL y[], const mpREAL pl[], const mpREAL las[])
Definition SD.h:138
const mpREAL * mpParameter
Definition SD.h:151
const qREAL * qLambda
Definition SD.h:148
base for class to minimize a function
Definition SD.h:267
virtual void Minimize(int nvars, FunctionType func, dREAL *ip)=0
virtual dREAL FindMinimum(int nvars, FunctionType func, dREAL *PL=NULL, dREAL *las=NULL, dREAL *UB=NULL, dREAL *LB=NULL, dREAL *IP=NULL, bool compare0=false, int TryPTS=0, int SavePTS=0)=0
dREAL(* FunctionType)(int nvars, dREAL *x, dREAL *pl, dREAL *las)
Definition SD.h:269
virtual void ForceStop()=0
numerical integrator using TanhSinhMP
Definition SD.h:248
size_t nGK
Definition SD.h:257
static void DefaultPrintHooker(mpREAL *, mpREAL *, size_t *, void *)
Definition QuadMP.cpp:112
size_t mGK
Definition SD.h:258
static int Wrapper(unsigned yn, mpREAL *y, mpREAL *e, unsigned xdim, const mpREAL *x, void *fdata)
Definition QuadMP.cpp:95
QuadMP(size_t m)
Definition SD.h:256
virtual ex Integrate(size_t n=0) override
Definition QuadMP.cpp:157
void(* PrintHookerType)(mpREAL *, mpREAL *, size_t *, void *)
Definition SD.h:251
PrintHookerType PrintHooker
Definition SD.h:254
base class of SecDec
Definition SD.h:94
virtual ~SecDecBase()
Definition SD.h:96
bool use_XMonomials
Definition SD.h:99
static bool VerifySD(vector< exmap > vmap, bool quick=true)
Verify the Sector Decompostion is valid.
Definition SecDec.cpp:88
virtual vector< exmap > x2y(const ex &xpol)=0
static ex XMonomials(const ex &expr)
XMonomials.
Definition SecDec.cpp:18
SecDec by geometric method.
Definition SD.h:107
vector< exmap > x2y(const ex &xpol) override
Definition SecDecG.cpp:393
static vector< vector< int > > RunQHull(const matrix &pts)
Definition SecDecG.cpp:176
SecDec the main class to use Sector Decompostion method.
Definition SD.h:412
size_t LambdaSplit
Definition SD.h:451
exvector expResult
Definition SD.h:427
void KillPowers(int bits=1+2)
Kill Powers will call KillPowerD or KillPower.
exmap nReplacement
Definition SD.h:424
void VEPrint(bool endlQ=true)
Definition Helpers.cpp:229
bool IsBad(ex f, vector< exmap > vmap)
Check the x-END.
Definition SecDec.cpp:174
bool use_ErrMin
Definition SD.h:434
dREAL CTryRRatio
Definition SD.h:457
qREAL IntLaMax
Definition SD.h:452
map< int, numeric > Parameter
Definition SD.h:443
static bool VerifySD(vector< exmap > vmap, bool quick=true)
Definition SecDec.cpp:123
dREAL CTLaMax
Definition SD.h:447
static ex PExpand(ex xpol, bool delta=true)
PExpand from asy2.1.1.m.
Definition AsyMB.cpp:39
qREAL EpsAbs
Definition SD.h:460
MinimizeBase * Minimizer
Definition SD.h:430
void Contours(const string &key="", const string &pkey="")
Contours, note that here we need to provide the specific Parameter.
Definition Contours.cpp:17
bool save_las
Definition SD.h:436
IntegratorBase * Integrator
Definition SD.h:429
exvector AutoEnd(ex po_ex)
Auto BiSection.
Definition SecDec.cpp:223
bool use_XReOrders
Definition SD.h:439
static bool use_dlclose
Definition SD.h:415
void Initialize(FeynmanParameter fpi)
Definition InitEval.cpp:28
static lst XRefined_lst(ex const &ft)
Definition Helpers.cpp:405
bool use_Normalizes
Definition SD.h:438
static int PRank(matrix m)
PRank from FIESTA.
Definition AsyMB.cpp:17
static ex XRefined(ex const &ft)
Definition Helpers.cpp:382
static ex PrefactorFIESTA(int nLoop)
Definition Helpers.cpp:374
static string cpp
Definition SD.h:416
bool vs_before_ep
Definition SD.h:421
exvector FunExp
Definition SD.h:425
void Integrates(const string &key="", const string &pkey="", int kid=0)
Contours, note that here we need to provide the specific Parameter.
bool disable_Contour
Definition SD.h:423
static ex ContinuousWRA(ex expr_in, int nc=15)
ContinuousWRA, note that here we need to provide the specific Parameter.
void ReIntegrates(const string &key, const string &pkey, qREAL err)
Contours, note that here we need to provide the specific Parameter.
bool CheckEnd
Definition SD.h:433
void Evaluate(FeynmanParameter fpi, const string &key="")
Definition InitEval.cpp:525
int PoleRequested
Definition SD.h:420
size_t CTryI
Definition SD.h:456
bool use_XMonomials
Definition SD.h:422
void BiSection(ex xi, ex x0)
Definition SecDec.cpp:1046
exvector Integrands
Definition SD.h:426
void CIPrepares(const string &key="")
Prepare for the Contours and Integrates calls .so will be generated, for more detailed exported funct...
lst BisectionPoints
Definition SD.h:441
numerical integrator using TanhSinhMP
Definition SD.h:232
static void DefaultPrintHooker(mpREAL *, mpREAL *, size_t *, void *)
PrintHookerType PrintHooker
Definition SD.h:238
void(* PrintHookerType)(mpREAL *, mpREAL *, size_t *, void *)
Definition SD.h:235
virtual ex Integrate(size_t n=0) override
static int Wrapper(unsigned ydim, mpREAL *y, mpREAL *e, unsigned xdim, const mpREAL *x, void *fdata)
class for Common SubExpression Parser
Definition SD.h:517
ex Parse(ex expr, bool reset=true)
Definition cseParser.cpp:13
vector< pair< int, ex > > os()
Definition cseParser.cpp:11
ex Parse(ex expr)
Definition SD.h:532
const vector< pair< int, ex > > & vs()
Definition cseParser.cpp:55
namespace for Numerical integration with Sector Decomposition method
Definition AsyMB.cpp:10
vector< matrix > Triangularize(const lst &fs_in, const ex &xs_in, const lst &nsubs={})
to Triangularize the domain with each xi from 0 to +infinity
ex FactorOutX(const ex expr)
Definition Helpers.cpp:278
exvector get_z_from(ex pol)
Definition Helpers.cpp:59
exvector get_xy_from(ex pol)
Definition Helpers.cpp:14
ex xyz_pow_simplify(const ex expr_in)
Definition Helpers.cpp:349
ex exp_simplify(const ex expr_in)
Definition Helpers.cpp:315
int x_free_index(ex expr)
Definition Helpers.cpp:165
complex< dREAL > dCOMPLEX
Definition SD.h:123
int vsRank(ex expr_in)
Definition Helpers.cpp:211
__float128 qREAL
Definition SD.h:124
ex VEResult(ex expr)
Definition Helpers.cpp:123
ex FactorFT(const ex &expr)
Definition Helpers.cpp:302
long double dREAL
Definition SD.h:122
int VEO_Digits
Definition Init.cpp:182
ex VESimplify(ex expr)
Definition Helpers.cpp:92
ex VEMaxErr(ex expr)
Definition Helpers.cpp:131
complex< mpREAL > mpCOMPLEX
Definition SD.h:127
exvector get_pl_from(ex pol)
Definition Helpers.cpp:74
exvector get_y_from(ex pol)
Definition Helpers.cpp:44
exvector get_x_from(ex pol)
Definition Helpers.cpp:29
int y_free_index(ex expr)
Definition Helpers.cpp:180
__complex128 qCOMPLEX
Definition SD.h:125
mpfr::mpreal mpREAL
Definition SD.h:126
int epsRank(ex expr_in, ex epi)
Definition Helpers.cpp:195
ex Factor(const ex expr_in)
Definition Helpers.cpp:244
ex VEResult2(ex expr)
Definition Helpers.cpp:127
ex pow_simplify(const ex expr_in)
Definition Helpers.cpp:330
HepLib namespace.
Definition BASIC.cpp:17
const Symbol ep
const Symbol eps
wrap parameters for loop integrals
Definition SD.h:67
wrap parameters for generic parameter integrals
Definition SD.h:83
exmap nReplacement
Definition SD.h:86