void ToolsPlus::OnSetTarget(wxCommandEvent& event) { wxString wild(m_wildcard); if (wild==_T("")) #ifdef __WXMSW__ wild=_T("*.*"); #else wild=_T("*"); #endif wxFileDialog *fd=new wxFileDialog(NULL,_("Choose the Command Target"),_T(""),_T(""),wild,wxFD_OPEN|wxFD_FILE_MUST_EXIST); if (fd->ShowModal()==wxID_OK) m_RunTarget=fd->GetPath(); else m_RunTarget=_T(""); delete fd; }
void ShellExtensions::OnSetMultiTarget(wxCommandEvent& event) { wxString wild(m_wildcard); if(wild==_T("")) #ifdef __WXMSW__ wild=_T("*.*"); #else wild=_T("*"); #endif wxFileDialog *fd=new wxFileDialog(NULL,_T("Choose the Command Targets"),_T(""),_T(""),wild,wxOPEN|wxFILE_MUST_EXIST|wxMULTIPLE); if(fd->ShowModal()==wxID_OK) { wxArrayString paths; fd->GetPaths(paths); m_RunTarget=paths[0]; for(size_t i=1;i<paths.GetCount();i++) m_RunTarget+=_T(" ")+paths[i]; } else m_RunTarget=_T(""); delete fd; }
char *getfilename(char *path,char *buf,int ti) { char thepath[80]; char wildcard[14]; if (searchfinished) { searchfinished=wildinit(path,buf,ti); if (searchfinished) fprintf(stderr,"No files match %s, continuing\n",path); } else searchfinished=wild(buf); if (searchfinished) return NULL; else return buf; }
/** * * loop momentums,propagator expressions, * invariants substitutions,propagator powers,number of loops * \param k_lst loop momentums list \param p_lst propagator expressions list \param subs_lst invariants substitutions list \param nu propagator powers list \param l number of loops \return * */ RoMB_loop_by_loop:: RoMB_loop_by_loop( lst k_lst, lst p_lst, lst subs_lst, lst nu, bool subs_U ) { try { /* empty integral */ MBintegral MBlbl_int(lst(),lst(),1); /* Full set of unused propagators, will change */ exlist input_prop_set;//( p_lst.begin(),p_lst.end()); /* map for propagator powers */ exmap prop_pow_map; for(lst::const_iterator Pit = p_lst.begin(); Pit != p_lst.end(); ++Pit) { input_prop_set.push_back(Pit->expand()); prop_pow_map[Pit->expand()] = nu.op(std::distance(p_lst.begin(),Pit)); } cout<<"INPSET: "<<input_prop_set<<endl; /* Iterate over momentums k1,k2,k3,etc. */ unsigned int displacement_x = 0; unsigned int displacement_w = 0; for(lst::const_iterator kit = k_lst.begin(); kit != k_lst.end(); ++kit) { // Integral Normalization coefficient // MBlbl_int *= pow(I,k_lst.nops()); MBlbl_int *= 1/tgamma(1+get_symbol("eps")); //MBlbl_int *= pow(Pi,2-get_symbol("eps")); //MBlbl_int *= exp(Euler*get_symbol("eps")); cout<<"PROP_POW_MAP "<<prop_pow_map<<endl; /* temporary set of propagators, with all momentum,except deleted */ exlist tmp_p_lst(input_prop_set.begin(), input_prop_set.end()); /* temporary set of propagators, with KIT momentum */ lst P_with_k_lst; BOOST_FOREACH(ex prop_tmp, tmp_p_lst) { if(prop_tmp.has(*kit)) { P_with_k_lst.append(prop_tmp); input_prop_set.remove(prop_tmp); } } cout<< "Set wo k_i "<<input_prop_set<<endl; cout<<" PWKlst "<<P_with_k_lst<<endl; bool direct_formula_applied = false; // if only one term in PWKLST use well known formulas // [Smirnov A.1] if(!direct_formula_applied && (P_with_k_lst.nops() == 1)) { ex pr_t = P_with_k_lst.op(0); ex nu_t = prop_pow_map[pr_t]; exmap repls; BOOST_ASSERT_MSG(pr_t.match(-pow(*kit,2) + wild(2)),"ONE PROP"); if(pr_t.match(-pow(*kit,2) + wild(2),repls))cout<<"repls: "<<repls<<endl; ex mass_tadpole = (tgamma(nu_t+get_symbol("eps")-2)/tgamma(nu_t)*pow(wild(2).subs(repls),-nu_t-get_symbol("eps")+2)); cout<<mass_tadpole<<endl; MBlbl_int *= mass_tadpole; MBlbl_int.add_pole(nu_t+get_symbol("eps")-2); direct_formula_applied = true; } if(!direct_formula_applied && (P_with_k_lst.nops() == 2)) { //TWO terms in PWK_LST, [Smirnov A.4] exmap repls_tad; if((P_with_k_lst.nops()==2) && (( (P_with_k_lst.op(0).match(-pow(*kit,2))) && (P_with_k_lst.op(1).match(-pow(*kit,2)+wild())))|| ( (P_with_k_lst.op(1).match(-pow(*kit,2))) && (P_with_k_lst.op(0).match(-pow(*kit,2)+wild())))) && !wild().has(*kit) ) { cout<<"Two prop tadpole "<<wild()<<endl; exmap r1,r2; ex mm,lmb1,lmb2; if( (P_with_k_lst.op(0).match(-pow(*kit,2))) && (P_with_k_lst.op(1).match(-pow(*kit,2)+wild(),r1))) { lmb1 = prop_pow_map[P_with_k_lst.op(1)]; lmb2 = prop_pow_map[P_with_k_lst.op(0)]; mm=wild().subs(r1); } else if( (P_with_k_lst.op(1).match(-pow(*kit,2))) && (P_with_k_lst.op(0).match(-pow(*kit,2)+wild(),r2))) { lmb1 = prop_pow_map[P_with_k_lst.op(0)]; lmb2 = prop_pow_map[P_with_k_lst.op(1)]; mm=wild().subs(r2); } else throw std::logic_error(std::string("Wrong two prop topology to use eq [Smir:A.4]")); ex mass_tadpole = tgamma(lmb1+lmb2+get_symbol("eps")-2)*tgamma(-lmb2-get_symbol("eps")+2)/tgamma(lmb1)/tgamma(2-get_symbol("eps"))*pow(mm,-lmb1-lmb2-get_symbol("eps")+2); cout<<mass_tadpole<<endl; } } if(!direct_formula_applied) { // cout<< " coe: "<<coe_prop_lst<<endl; /* lexi sort of input prop list, and it's modification */ // uf and then MB represenatation construction // subs only in F for last momentum UFXmap inUFmap; if(boost::next(kit) == k_lst.end()) inUFmap = UF(lst(*kit),P_with_k_lst,subs_lst,displacement_x); else inUFmap = UF(lst(*kit),P_with_k_lst,subs_lst,displacement_x); // no substitution!!! displacement_x +=fusion::at_key<UFX::xlst>(inUFmap).nops(); lst nu_into; for(lst::const_iterator nuit = P_with_k_lst.begin(); nuit != P_with_k_lst.end(); ++nuit ) nu_into.append(prop_pow_map[*nuit]); cout<<" Powers list before input: "<<nu_into<<endl; /* MBintegral Uint( fusion::make_map<UFX::F,UFX::xlst>(fusion::at_key<UFX::F>(inUFmap), fusion::at_key<UFX::xlst>(inUFmap) ),nu_into,1,displacement_w); */ MBintegral Uint(inUFmap,nu_into,1,subs_U,displacement_w); displacement_w+=Uint.w_size(); cout<<"ui9nt eps (no gamma) : "<<Uint.get_expr().subs(tgamma(wild()) == 1)<<endl; cout<<"ui9nt eps : "<<Uint.get_expr()<<endl; /* expression to mul root integral where to subs prop(k_prev)==1 */ ex expr_k_to_subs_1= Uint.get_expr(); ex mom_find = Uint.get_expr(); cout<< "where find props: "<<mom_find<<endl; if(is_a<mul>(mom_find)) { // set of a^b?, need to have momentums from *kit to *k_lst.end() exset found_prop_raw,found_prop; mom_find.find(pow(wild(1),wild(2)),found_prop_raw); cout<<" is a mul raw "<<found_prop_raw<<endl; // really props BOOST_FOREACH(ex px_c,found_prop_raw) { bool is_a_p = false; for(lst::const_iterator kpi = kit; kpi != k_lst.end(); ++kpi) if(px_c.has(*kpi)) { is_a_p = true; break; } if(is_a_p) found_prop.insert(px_c); } cout<<" is a mul "<<found_prop<<endl; BOOST_FOREACH(ex propex_c,found_prop) { // next momentum in loop momentum list ex next_k ; for(lst::const_iterator nkit = kit; nkit != k_lst.end(); ++nkit) if(propex_c.has(*nkit)) { next_k = *nkit; break; } cout<<"before subs kex : "<<expr_k_to_subs_1.subs(tgamma(wild()) == 1)<<endl; expr_k_to_subs_1 = expr_k_to_subs_1.subs(propex_c == 1); cout<<"after subs kex : "<<expr_k_to_subs_1.subs(tgamma(wild()) == 1)<<endl; /* converting prop to form -p^2+m^2 */ ex p_power; ex p_expr; ex p_not_corr = ex_to<power>(propex_c).op(0); ex coeff_ksq = p_not_corr.expand().coeff(next_k,2); // coeff infront of K^2 if( coeff_ksq != -1 ) { p_not_corr /=coeff_ksq; cout<<"koeff_ksq "<<coeff_ksq<<endl; MBlbl_int*= pow(coeff_ksq,ex_to<power>(propex_c).op(1)); // propex = pow(p_not_corr,ex_to<power>(propex_c).op(1)); p_power = ex_to<power>(propex_c).op(1); p_expr = p_not_corr.expand(); } else { p_power = ex_to<power>(propex_c).op(1); p_expr = ex_to<power>(propex_c).op(0).expand(); } /* Search for duplications in prop set */ cout<<"where to find props: "<<input_prop_set<<endl; cout<< input_prop_set.size()<<endl; cout<<"PWK_MAP to modiff"<<prop_pow_map<<endl; if(prop_pow_map.count(p_expr) > 0) { BOOST_ASSERT_MSG(count(input_prop_set.begin(),input_prop_set.end(),p_expr) > 0,"Propagator not found in prop set"); cout<<"PPM bef: "<< prop_pow_map[p_expr]<<endl; prop_pow_map[p_expr] -=p_power; cout<<"PPM aft: "<< prop_pow_map[p_expr]<<endl; } else { prop_pow_map[p_expr] = (-1)*p_power; input_prop_set.push_back(p_expr); } cout<<"PWK_MAP after modiff"<<prop_pow_map<<endl; } } //cout<<"needed props "<<prop_pow_lst<<endl; cout<<"ya tut"<<endl; MBlbl_int*=expr_k_to_subs_1; cout<<"ya tut"<<endl; // cout<<"HAS INT : "<<MBlbl_int.get_expr().subs(tgamma(wild(4)) == 0)<<endl; MBlbl_int+=Uint; cout<<"bad"<<endl; // MBlbl_int.insert_w_lst(Uint.get_w_lst()); // MBlbl_int.insert_pole_lst(Uint.get_pole_lst()); //}// else more then one prop }// two prop formula