45 auto rc = system((
"rm -rf "+job_dir).c_str());
46 if(!
dir_exists(job_dir)) system((
"mkdir -p "+job_dir).c_str());
48 string config_dir = job_dir +
"/config";
49 rc = system((
"rm -rf "+config_dir).c_str());
50 if(!
dir_exists(config_dir)) rc = system((
"mkdir -p "+config_dir).c_str());
55 oss <<
"integralfamilies:" << endl;
56 oss <<
" - name: F" << endl;
57 oss <<
" loop_momenta: [";
58 for(
int i=0; i<
Internal.nops(); i++) {
61 else oss <<
"]" << endl;
64 vector<int> symbolic_ibp;
65 for(
auto kv :
Shift) {
66 if(kv.second.is_zero())
continue;
67 symbolic_ibp.push_back(kv.first);
69 if(symbolic_ibp.size()>0) {
70 oss <<
" symbolic_ibp: [";
71 for(
int i=0; i<symbolic_ibp.size(); i++) {
73 oss << symbolic_ibp[i];
79 oss <<
" propagators:" << endl;
81 oss <<
" - [ \"" <<
Propagator.op(i) <<
"\", 0]" << endl;
84 oss <<
" cut_propagators: [";
85 for(
auto i=0; i<
Cut.nops(); i++) {
87 if(i+1<
Cut.nops()) oss <<
", ";
88 else oss <<
"]" << endl;
91 ofstream if_out(config_dir+
"/integralfamilies.yaml");
92 if_out << oss.str() << endl;
99 oss <<
"kinematics:" << endl;
100 oss <<
" incoming_momenta: [";
101 for(
int i=0; i<
External.nops(); i++) {
103 if(i+1<
External.nops()) oss <<
", ";
104 else oss <<
"]" << endl;
113 repl.append(
w*item.op(0) ==
w*item.op(1));
120 for(
auto vi : vars) vset_all.insert(vi);
122 for(
auto vi :
Internal) vset_mom.insert(vi);
123 for(
auto vi :
External) vset_mom.insert(vi);
125 for(
auto vi : vset_all) {
126 if(vset_mom.find(vi) == vset_mom.end()) vset.insert(vi);
129 oss <<
" kinematic_invariants:" << endl;
130 for(
auto vi : vset) oss <<
" - [ " << vi <<
", 0 ]" << endl;
131 for(
auto i : symbolic_ibp) oss <<
" - [ b" << (i-1) <<
", 0 ]" << endl;
134 oss <<
" scalarproduct_rules:" << endl;
135 for(
int i=0; i<
External.nops(); i++) {
137 for(
int j=i; j<
External.nops(); j++) {
139 oss <<
" - [ [" << pi <<
"," << pj <<
"], ";
146 ofstream km_out(config_dir+
"/kinematics.yaml");
147 km_out << oss.str() << endl;
155 if(_rmax < 0 || _smax < 0) {
161 for(
auto item : integral) {
162 if(item>0) rr +=
ex2int(item);
165 if(rrmax<rr) rrmax = rr;
166 if(ssmax<ss) ssmax = ss;
168 if(rrmax > _rmax) _rmax = rrmax;
169 if(ssmax > _smax) _smax = ssmax;
175 oss <<
"jobs:" << endl;
176 oss <<
" - reduce_sectors:" << endl;
177 oss <<
" reduce: " << endl;
178 oss <<
" - {r: " << _rmax <<
", s: " << _smax <<
"}" << endl;
179 oss <<
" select_integrals: " << endl;
180 oss <<
" select_mandatory_recursively: " << endl;
181 oss <<
" - {r: " << _rmax <<
", s: " << _smax;
184 oss <<
" run_initiate: true" << endl;
185 oss <<
" run_triangular: true" << endl;
186 oss <<
" run_back_substitution: true" << endl;
190 for(
int i=0; i<nn; i++) oss2 << Fout(
PIntegral.op(i)) << endl;
191 ofstream pref_out(job_dir+
"/preferred");
192 pref_out << oss2.str() << endl;
194 oss <<
" preferred_masters: preferred" << endl;
196 oss <<
" - kira2file:" << endl;
197 oss <<
" target:" << endl;
198 oss <<
" - [F,integrals]" << endl;
199 ofstream job_out(job_dir+
"/job.yaml");
200 job_out << oss.str() << endl;
206 for(
auto integral :
Integral) oss << Fout(integral) << endl;
207 ofstream intg_out(job_dir+
"/integrals");
208 intg_out << oss.str() << endl;