34 namespace InlineStochGroupBaryonEnv
48 XMLReader paramtop(xml, path);
51 read(paramtop,
"version", version);
53 multi1d< multi1d<int> > temp;
58 QDPIO::cerr <<
"version 1 no longer supported. " << std::endl;
77 read(paramtop,
"moms" , temp);
80 param.
moms.resize(temp.size(), temp[0].size() );
82 for (
int i = 0 ;
i < temp.size() ; ++
i)
90 QDPIO::cerr <<
"Input parameter version " << version <<
" unsupported." << std::endl;
111 write(xml,
"version", version);
117 push(xml,
"QuarkDilutions");
131 XMLReader inputtop(xml, path);
134 read(inputtop,
"id", input.
id);
151 XMLReader inputtop(xml, path);
172 namespace InlineStochGroupBaryonEnv
177 AbsInlineMeasurement* createMeasurement(XMLReader& xml_in,
180 return new InlineMeas(Params(xml_in, path));
217 XMLReader paramtop(xml_in, path);
219 if (paramtop.count(
"Frequency") == 1)
231 if (paramtop.count(
"xml_file") != 0)
238 QDPIO::cerr << __func__ <<
": Caught Exception reading XML: " << e << std::endl;
276 multi1d<ThreeQuarkOp_t>
ops;
353 lga[0] =
a.displacement;
359 lgb[0] =
b.displacement;
371 multi1d<LatticeComplex>
vec;
384 const multi1d<LatticeColorMatrix> & u_smr) :
411 std::map<KeySmearedDispColorVector_t, SmearedDispColorVector_t>& disp_quark_map,
413 const LatticeFermion& smrd_q);
416 virtual const LatticeFermion&
419 virtual const LatticeFermion&
431 const multi1d<LatticeColorMatrix> &
u;
443 multi1d< std::map<KeySmearedDispColorVector_t, SmearedDispColorVector_t> >
disp_src_maps;
444 multi1d< std::map<KeySmearedDispColorVector_t, SmearedDispColorVector_t> >
disp_soln_maps;
448 const LatticeFermion&
453 std::map<KeySmearedQuark_t, SmearedQuark_t> & qmap =
smeared_src_maps[qnum];
456 if ( qmap.find(key) == qmap.end() )
463 qmap.insert(std::make_pair(key, smrd_empty));
466 if ( qmap.find(key) == qmap.end() )
468 QDPIO::cerr << __func__
469 <<
": internal error - could not insert empty key in std::map"
485 (*quarkSmearing)(smrd_q.
quark,
u);
494 QDPIO::cout <<
" Smeared Sources: Quark = "<< qnum <<
" t0 = "
495 << key.
t0 <<
" dil = "<< key.
dil <<
" Time = "<< snoop.getTimeInSeconds() <<
" sec"<<std::endl;
498 qmap.insert(std::make_pair(key, smrd_q));
504 return (qmap.find(key)->second).quark ;
509 const LatticeFermion&
518 if ( qmap.find(key) == qmap.end() )
525 qmap.insert(std::make_pair(key, smrd_empty));
528 if ( qmap.find(key) == qmap.end() )
530 QDPIO::cerr << __func__
531 <<
": internal error - could not insert empty key in std::map"
546 (*quarkSmearing)(smrd_q.
quark,
u);
552 QDPIO::cout <<
" Smeared Sinks: Quark = "<< qnum <<
" t0 = "
553 << key.
t0 <<
" dil = "<< key.
dil <<
" Time = "<< snoop.getTimeInSeconds() <<
" sec"<<std::endl;
556 qmap.insert(std::make_pair(key, smrd_q));
562 return (qmap.find(key)->second).quark ;
566 multi1d<LatticeComplex>
576 const LatticeFermion& smrd_q =
smearSource(quark_num, smr_key);
578 multi1d<LatticeComplex> vec;
584 LatticeColorVector colvec = peekSpin( smrd_q, key.
spin - 1);
586 for (
int c = 0 ;
c < Nc ; ++
c)
587 vec[
c] = peekColor( colvec,
c);
600 multi1d<LatticeComplex>
610 const LatticeFermion& smrd_q =
smearSolution(quark_num, smr_key);
612 multi1d<LatticeComplex> vec;
618 LatticeColorVector colvec = peekSpin( smrd_q, key.
spin - 1);
620 for (
int c = 0 ;
c < Nc ; ++
c)
621 vec[
c] = peekColor( colvec,
c);
634 const multi1d<LatticeComplex> &
636 std::map<KeySmearedDispColorVector_t, SmearedDispColorVector_t>& disp_quark_map,
638 const LatticeFermion& smrd_q)
644 if (disp_quark_map.find(key) == disp_quark_map.end())
665 disp_quark_map.insert(std::make_pair(key, disp_empty));
669 QDPIO::cout<<
"Inserted key in std::map: time = "<< snoop.getTimeInSeconds() <<
"secs"<<std::endl;
672 if (disp_quark_map.find(key) == disp_quark_map.end())
674 QDPIO::cerr << __func__
675 <<
": internal error - could not insert empty key in std::map"
688 LatticeColorVector vec = peekSpin(smrd_q, key.
spin - 1);
705 QDPIO::cout <<
"Displaced Quarks: Spin = "<<key.
spin<<
" Disp = "
706 << key.
displacement <<
" Time = "<<snoop.getTimeInSeconds() <<
" sec"<<std::endl;
708 disp_q.
vec.resize(Nc);
710 for(
int i = 0 ;
i < Nc ; ++
i )
712 disp_q.
vec[
i] = peekColor(vec,
i);
734 void makeDiquark( multi1d<LatticeComplex> & diquark,
const multi1d<LatticeComplex> & q0,
735 const multi1d<LatticeComplex> & q1,
const Subset & subset )
741 diquark[0][subset] = q0[0]*q1[1] - q0[1]*q1[0];
742 diquark[1][subset] = q0[1]*q1[2] - q0[2]*q1[1];
743 diquark[2][subset] = q0[2]*q1[0] - q0[0]*q1[2];
750 const multi1d<LatticeComplex> & q2,
const Subset & subset)
753 singlet[subset] = diquark[0] * q2[2];
754 singlet[subset] += diquark[1] * q2[0];
755 singlet[subset] += diquark[2] * q2[1];
775 multi1d<DComplex>
op;
821 write(xml,
"version", version);
830 push(xml,
"dilution_l");
834 push(xml,
"dilution_m");
838 push(xml,
"dilution_r");
895 TextFileReader
reader(ops_file);
899 oplist.
ops.resize(num_ops);
902 for(
int n=0;
n < oplist.
ops.size(); ++
n)
913 reader >> spin[0] >> spin[1] >> spin[2];
920 for(
int i=0;
i < qqq.
quark.size(); ++
i)
945 push(xml_out,
"stoch_baryon");
946 write(xml_out,
"update_no", update_no);
947 write(xml_out,
"xml_file", xml_file);
950 XMLFileWriter xml(xml_file);
951 func(update_no, xml);
955 func(update_no, xml_out);
975 XMLBufferWriter gauge_xml;
981 catch( std::bad_cast )
993 const multi1d<LatticeColorMatrix>&
u =
996 push(xml_out,
"StochGroupBaryon");
997 write(xml_out,
"update_no", update_no);
1007 write(xml_out,
"Config_info", gauge_xml);
1009 push(xml_out,
"Output_version");
1010 write(xml_out,
"out_version", 1);
1015 MesPlq(xml_out,
"Observables",
u);
1026 QDPIO::cerr <<
name <<
": expecting 3 quark dilutions" << std::endl;
1030 multi1d< Handle< DilutionScheme<LatticeFermion> > > diluted_quarks(
N_quarks);
1039 std::istringstream xml_d(dil_xml.
xml);
1040 XMLReader diltop(xml_d);
1041 QDPIO::cout <<
"Dilution type = " << dil_xml.
id << std::endl;
1044 dil_xml.
id, diltop, dil_xml.
path);
1049 QDPIO::cerr <<
name <<
": Caught Exception constructing dilution scheme: " << e << std::endl;
1058 multi1d<int> participating_timeslices( diluted_quarks[0]->getNumTimeSlices() );
1060 for (
int t0 = 0 ;
t0 < participating_timeslices.size() ; ++
t0)
1062 participating_timeslices[
t0] = diluted_quarks[0]->getT0(
t0);
1067 if ( diluted_quarks[
n]->getNumTimeSlices() != participating_timeslices.size() )
1069 QDPIO::cerr <<
name <<
" : Quarks do not contain the same number of dilution timeslices: Quark "
1075 for (
int t0 = 0 ;
t0 < participating_timeslices.size() ; ++
t0)
1077 if ( diluted_quarks[
n]->getT0(
t0) != participating_timeslices[
t0] )
1079 QDPIO::cerr <<
name <<
" : Quarks do not contain the same participating timeslices: Quark "<<
1080 n <<
" timeslice "<<
t0 << std::endl;
1091 if (diluted_quarks[0]->getCfgInfo() != diluted_quarks[
n]->getCfgInfo())
1094 <<
" : Quarks do not contain the same cfg info, quark "<<
n << std::endl;
1107 XMLBufferWriter top;
1108 write(top,
"Config_info", gauge_xml);
1109 XMLReader from(top);
1110 XMLReader from2(from,
"/Config_info");
1111 std::ostringstream os;
1116 if (cfgInfo != diluted_quarks[0]->getCfgInfo())
1119 <<
" : Quarks do not contain the same cfg info as the gauge field."
1120 <<
"gauge: XX"<<cfgInfo<<
"XX quarks: XX"<<diluted_quarks[0]->getCfgInfo()<<
"XX"<< std::endl;
1130 int decay_dir = diluted_quarks[0]->getDecayDir();
1144 if (phases.
numSubsets() != QDP::Layout::lattSize()[decay_dir])
1146 QDPIO::cerr <<
name <<
": number of time slices not equal to that in the decay direction: "
1147 << QDP::Layout::lattSize()[decay_dir]
1155 for(
int n = 1 ;
n < diluted_quarks.size(); ++
n)
1157 if ( toBool( diluted_quarks[
n]->getSeed() == diluted_quarks[0]->getSeed() ) )
1159 QDPIO::cerr <<
name <<
": error, quark seeds are the same" << std::endl;
1163 if ( toBool( diluted_quarks[
n]->getDecayDir() != diluted_quarks[0]->getDecayDir() ) )
1165 QDPIO::cerr <<
name <<
": error, quark decay dirs do not match" <<std::endl;
1174 multi1d<LatticeColorMatrix> u_smr =
u;
1179 XMLReader linktop(xml_l);
1187 (*linkSmearing)(u_smr);
1191 QDPIO::cerr <<
name <<
": Caught Exception link smearing: " << e << std::endl;
1195 MesPlq(xml_out,
"Smeared_Observables", u_smr);
1198 multi1d<int> orig(4);
1199 for (
int ind = 0 ; ind < 4 ; ++ind)
1207 QDPIO::cout <<
"Reading 3-quark operators" << std::endl;
1219 QDPIO::cout <<
"Create quark smearing object" << std::endl;
1223 XMLReader smeartop(xml_s);
1232 QDPIO::cerr <<
": Caught Exception creating quark smearing object: " << e << std::endl;
1237 QDPIO::cerr <<
": Caught generic exception creating smearing object" << std::endl;
1249 int num_orderings = 1;
1254 QDPIO::cerr <<
"Invalid size for 'quark_ids'. Must be 3 but is " << pstr.size() << std::endl;
1259 if ( ( (pstr[0] == pstr[2]) && (pstr[1] != pstr[2]) ) ||
1260 ( (pstr[0] == pstr[1]) && (pstr[1] != pstr[2]) ) )
1262 QDPIO::cerr <<
"Invalid format for 'quark_ids'. Identical q's must be last 2 entries.: "
1263 << pstr << std::endl;
1268 if ( (pstr[0] != pstr[1]) && (pstr[1] == pstr[2]) )
1272 if ( toBool(diluted_quarks[0]->getKappa() == diluted_quarks[1]->getKappa()) ||
1273 toBool(diluted_quarks[1]->getKappa() != diluted_quarks[2]->getKappa()) )
1275 QDPIO::cerr <<
"quark_id's do not correspond to the correct identical quarks"
1281 if (pstr[0] == pstr[2])
1285 if ( toBool(diluted_quarks[0]->getKappa() != diluted_quarks[1]->getKappa()) ||
1286 toBool(diluted_quarks[0]->getKappa() != diluted_quarks[2]->getKappa()) )
1289 QDPIO::cerr <<
"quark_id's do not correspond to the correct identical quarks"
1295 QDPIO::cout <<
"Num Ordering = " << num_orderings << std::endl;
1297 multi1d< multi1d<int> > perms(num_orderings);
1301 if (num_orderings >= 1)
1303 p[0] = 0;
p[1] = 1;
p[2] = 2;
1307 if (num_orderings >= 2)
1309 p[0] = 0;
p[1] = 2;
p[2] = 1;
1313 if (num_orderings >= 3)
1315 p[0] = 1;
p[1] = 0;
p[2] = 2;
1319 if (num_orderings >= 4)
1321 p[0] = 1;
p[1] = 2;
p[2] = 0;
1325 if (num_orderings >= 5)
1327 p[0] = 2;
p[1] = 1;
p[2] = 0;
1331 if (num_orderings >= 6)
1333 p[0] = 2;
p[1] = 0;
p[2] = 1;
1341 for(
int t0 = 0;
t0 < participating_timeslices.size() ; ++
t0)
1349 diluted_quarks, quarkSmearing, u_smr );
1355 creat_oper.
seed_l = diluted_quarks[0]->getSeed();
1356 creat_oper.
seed_m = diluted_quarks[1]->getSeed();
1357 creat_oper.
seed_r = diluted_quarks[2]->getSeed();
1362 creat_oper.
perms = perms;
1367 for(
int l=0;
l < qqq_oplist.
ops.size(); ++
l)
1369 QDPIO::cout <<
"Elemental operator: op = " <<
l << std::endl;
1371 push(xml_out,
"BaryonOperator");
1373 creat_oper.
id = qqq_oplist.
ops[
l].name;
1375 write(xml_out,
"Name", creat_oper.
id);
1382 multi1d<KeySmearedDispColorVector_t> keySmearedDispColorVector(
N_quarks);
1386 keySmearedDispColorVector[
n].displacement = qqq_oplist.
ops[
l].quark[
n].displacement;
1387 keySmearedDispColorVector[
n].spin = qqq_oplist.
ops[
l].quark[
n].spin;
1391 creat_oper.
time_slices[0].t0 = participating_timeslices[
t0];
1392 creat_oper.
time_slices[0].orderings.resize(num_orderings);
1394 for(
int ord = 0; ord < num_orderings ; ++ord)
1396 QDPIO::cout <<
"Ordering = " << ord << std::endl;
1398 creat_oper.
time_slices[0].orderings[ord].perm = perms[ord];
1400 const int n0 = perms[ord][0];
1401 const int n1 = perms[ord][1];
1402 const int n2 = perms[ord][2];
1409 cop.
dilutions.resize(diluted_quarks[n0]->getDilSize(
t0), diluted_quarks[n1]->getDilSize(
t0),
1410 diluted_quarks[n2]->getDilSize(
t0) );
1414 keySmearedDispColorVector[
n].t0 =
t0;
1417 for(
int i = 0 ;
i < diluted_quarks[n0]->getDilSize(
t0) ; ++
i)
1419 for(
int j = 0 ;
j < diluted_quarks[n1]->getDilSize(
t0) ; ++
j)
1422 keySmearedDispColorVector[0].dil =
i;
1423 keySmearedDispColorVector[1].dil =
j;
1426 multi1d<LatticeComplex> diquark(Nc);
1428 const multi1d<LatticeComplex> &q0 = smrd_disp_srcs.
getDispSource(n0,
1429 keySmearedDispColorVector[0]);
1431 const multi1d<LatticeComplex> &q1 = smrd_disp_srcs.
getDispSource(n1,
1432 keySmearedDispColorVector[1]);
1452 for(
int k = 0 ;
k < diluted_quarks[n2]->getDilSize(
t0) ; ++
k)
1455 keySmearedDispColorVector[2].dil =
k;
1461 LatticeComplex c_oper;
1463 const multi1d<LatticeComplex> &q2 = smrd_disp_srcs.
getDispSource(n2,
1464 keySmearedDispColorVector[2]);
1473 participating_timeslices[
t0] ] );
1493 multi2d<DComplex> c_sum;
1496 c_sum = phases.
sft(c_oper, participating_timeslices[
t0]);
1497 num_mom = phases.
numMom();
1508 for(
int mom_num = 0 ; mom_num < num_mom ; ++mom_num)
1515 cop.
dilutions(
i,
j,
k).mom_projs[mom_num].op[ 0 ] = c_sum[mom_num][
1516 participating_timeslices[
t0] ];
1527 QDPIO::cout <<
"Source operator construction: operator= " <<
l
1529 << swiss.getTimeInSeconds()
1530 <<
" secs" << std::endl;
1532 QDPIO::cout <<
"Source operator testval(t0 = " <<
1533 participating_timeslices[
t0] <<
") = " <<
1534 creat_oper.
time_slices[0].orderings[0].dilutions(0,0,0).mom_projs[0].op[0];
1539 std::stringstream cnvrt;
1540 cnvrt << creat_oper.
id <<
"_t" << participating_timeslices[
t0] <<
"_src.lime";
1544 filename = cnvrt.str();
1550 XMLBufferWriter src_record_xml, file_xml;
1551 BinaryBufferWriter src_record_bin;
1553 push(file_xml,
"SourceBaryonOperator");
1555 write(file_xml,
"Config_info", gauge_xml);
1556 write(file_xml,
"Op_Info",qqq_oplist.
ops[
l]);
1558 push(file_xml,
"QuarkSources");
1560 push(file_xml,
"Quark_l");
1561 push(file_xml,
"TimeSlice");
1562 push(file_xml,
"Dilutions");
1563 for (
int dil = 0; dil < diluted_quarks[0]->getDilSize(
t0) ; ++dil)
1565 write( file_xml,
"elem",
1566 diluted_quarks[0]->getSourceHeader(
t0, dil) );
1575 push(file_xml,
"Quark_m");
1576 push(file_xml,
"TimeSlice");
1577 push(file_xml,
"Dilutions");
1578 for (
int dil = 0; dil < diluted_quarks[1]->getDilSize(
t0) ; ++dil)
1580 write( file_xml,
"elem",
1581 diluted_quarks[1]->getSourceHeader(
t0, dil) );
1587 push(file_xml,
"Quark_r");
1588 push(file_xml,
"TimeSlice");
1589 push(file_xml,
"Dilutions");
1590 for (
int dil = 0; dil < diluted_quarks[2]->getDilSize(
t0) ; ++dil)
1592 write( file_xml,
"elem",
1593 diluted_quarks[2]->getSourceHeader(
t0, dil) );
1600 push(file_xml,
"QuarkSinks");
1602 push(file_xml,
"Quark_l");
1603 write(file_xml,
"PropHeader", diluted_quarks[0]->getPropHeader(0,0) );
1606 push(file_xml,
"Quark_m");
1607 write(file_xml,
"PropHeader", diluted_quarks[1]->getPropHeader(0,0) );
1610 push(file_xml,
"Quark_r");
1611 write(file_xml,
"PropHeader", diluted_quarks[2]->getPropHeader(0,0) );
1617 QDPFileWriter qdp_file(file_xml, filename,
1618 QDPIO_SINGLEFILE, QDPIO_SERIAL, QDPIO_OPEN);
1621 write(src_record_xml,
"BaryonCreationOperator", creat_oper);
1622 write(src_record_bin, creat_oper);
1624 write(qdp_file, src_record_xml, src_record_bin);
1629 QDPIO::cout <<
"Source Operator writing: operator = " <<
1631 << swiss.getTimeInSeconds()
1632 <<
" secs" << std::endl;
1647 diluted_quarks, quarkSmearing, u_smr );
1654 annih_oper.
seed_l = diluted_quarks[0]->getSeed();
1655 annih_oper.
seed_m = diluted_quarks[1]->getSeed();
1656 annih_oper.
seed_r = diluted_quarks[2]->getSeed();
1661 annih_oper.
perms = perms;
1665 QDPIO::cout <<
"Building Sink operators" << std::endl;
1668 for(
int l=0;
l < qqq_oplist.
ops.size(); ++
l)
1670 QDPIO::cout <<
"Elemental operator: op = " <<
l << std::endl;
1672 annih_oper.
id = qqq_oplist.
ops[
l].name;
1679 multi1d<KeySmearedDispColorVector_t> keySmearedDispColorVector(
N_quarks);
1683 keySmearedDispColorVector[
n].displacement = qqq_oplist.
ops[
l].quark[
n].displacement;
1684 keySmearedDispColorVector[
n].spin = qqq_oplist.
ops[
l].quark[
n].spin;
1687 annih_oper.
time_slices[0].t0 = participating_timeslices[
t0];
1695 QDPIO::cout <<
"Ordering = " << ord << std::endl;
1697 annih_oper.
time_slices[0].orderings[ord].perm = perms[ord];
1699 const int n0 = perms[ord][0];
1700 const int n1 = perms[ord][1];
1701 const int n2 = perms[ord][2];
1710 aop.
dilutions.resize(diluted_quarks[n0]->getDilSize(
t0), diluted_quarks[n1]->getDilSize(
t0),
1711 diluted_quarks[n2]->getDilSize(
t0) );
1715 keySmearedDispColorVector[
n].t0 =
t0;
1718 for(
int i = 0 ;
i < diluted_quarks[n0]->getDilSize(
t0) ; ++
i)
1720 for(
int j = 0 ;
j < diluted_quarks[n1]->getDilSize(
t0) ; ++
j)
1723 keySmearedDispColorVector[0].dil =
i;
1724 keySmearedDispColorVector[1].dil =
j;
1727 multi1d<LatticeComplex> diquark(Nc);
1729 const multi1d<LatticeComplex> &q0 = smrd_disp_snks.
getDispSolution(n0,
1730 keySmearedDispColorVector[0]);
1732 const multi1d<LatticeComplex> &q1 = smrd_disp_snks.
getDispSolution(n1,
1733 keySmearedDispColorVector[1]);
1753 for(
int k = 0 ;
k < diluted_quarks[n2]->getDilSize(
t0) ; ++
k)
1756 keySmearedDispColorVector[2].dil =
k;
1765 LatticeComplex a_oper;
1767 const multi1d<LatticeComplex> &q2 = smrd_disp_snks.
getDispSolution(n2,
1768 keySmearedDispColorVector[2]);
1792 multi2d<DComplex> a_sum;
1797 num_mom = phases.
numMom();
1807 for(
int mom_num = 0 ; mom_num < num_mom ; ++mom_num)
1811 aop.
dilutions(
i,
j,
k).mom_projs[mom_num].op = a_sum[mom_num];
1822 QDPIO::cout <<
"Sink operator construction: operator= " <<
l
1824 << swiss.getTimeInSeconds()
1825 <<
" secs" << std::endl;
1827 QDPIO::cout <<
"Sink op testval( t0 = " <<
1828 participating_timeslices[
t0] <<
") = " <<
1829 annih_oper.
time_slices[0].orderings[0].dilutions(0,0,0).mom_projs[0].op[0]
1833 std::stringstream cnvrt;
1834 cnvrt << annih_oper.
id <<
"_t" << participating_timeslices[
t0] <<
"_snk.lime";
1838 filename = cnvrt.str();
1844 XMLBufferWriter src_record_xml, file_xml;
1845 BinaryBufferWriter src_record_bin;
1847 push(file_xml,
"SinkBaryonOperator");
1849 write(file_xml,
"Config_info", gauge_xml);
1850 write(file_xml,
"Op_Info",qqq_oplist.
ops[
l]);
1851 push(file_xml,
"QuarkSources");
1853 push(file_xml,
"Quark_l");
1854 push(file_xml,
"TimeSlice");
1855 push(file_xml,
"Dilutions");
1856 for (
int dil = 0; dil < diluted_quarks[0]->getDilSize(
t0) ; ++dil)
1858 write( file_xml,
"elem",
1859 diluted_quarks[0]->getSourceHeader(
t0, dil) );
1865 push(file_xml,
"Quark_m");
1866 push(file_xml,
"TimeSlice");
1867 push(file_xml,
"Dilutions");
1868 for (
int dil = 0; dil < diluted_quarks[1]->getDilSize(
t0) ; ++dil)
1870 write( file_xml,
"elem",
1871 diluted_quarks[1]->getSourceHeader(
t0, dil) );
1877 push(file_xml,
"Quark_r");
1878 push(file_xml,
"TimeSlice");
1879 push(file_xml,
"Dilutions");
1880 for (
int dil = 0; dil < diluted_quarks[2]->getDilSize(
t0) ; ++dil)
1882 write( file_xml,
"elem",
1883 diluted_quarks[2]->getSourceHeader(
t0, dil) );
1890 push(file_xml,
"QuarkSinks");
1892 push(file_xml,
"Quark_l");
1893 write(file_xml,
"PropHeader", diluted_quarks[0]->getPropHeader(0,0) );
1896 push(file_xml,
"Quark_m");
1897 write(file_xml,
"PropHeader", diluted_quarks[1]->getPropHeader(0,0) );
1900 push(file_xml,
"Quark_r");
1901 write(file_xml,
"PropHeader", diluted_quarks[2]->getPropHeader(0,0) );
1907 QDPFileWriter qdp_file(file_xml, filename,
1908 QDPIO_SINGLEFILE, QDPIO_SERIAL, QDPIO_OPEN);
1911 write(src_record_xml,
"BaryonAnnihilationOperator", annih_oper);
1912 write(src_record_bin, annih_oper);
1914 write(qdp_file, src_record_xml, src_record_bin);
1919 QDPIO::cout <<
"Sink Operator writing: operator = " <<
l
1920 <<
" time= " << swiss.getTimeInSeconds() <<
" secs" << std::endl;
1932 << snoop.getTimeInSeconds()
1933 <<
" secs" << std::endl;
Inline measurement factory.
Class for counted reference semantics.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
void func(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
The smeared and displaced objects.
multi1d< std::map< KeySmearedDispColorVector_t, SmearedDispColorVector_t > > disp_soln_maps
virtual const LatticeFermion & smearSource(int qnum, const KeySmearedQuark_t &key)
Smear sources and solutions.
virtual const LatticeFermion & smearSolution(int qnum, const KeySmearedQuark_t &key)
int displacement_length
Displacement length.
virtual multi1d< LatticeComplex > getDispSolution(int quark_num, const KeySmearedDispColorVector_t &key)
Accessor.
SmearedDispObjects(int disp_length, multi1d< Handle< DilutionScheme< LatticeFermion > > > dil_quarks, Handle< QuarkSmearing< LatticeFermion > > qsmr, const multi1d< LatticeColorMatrix > &u_smr)
Constructor from smeared std::map.
multi1d< std::map< KeySmearedQuark_t, SmearedQuark_t > > smeared_soln_maps
virtual const multi1d< LatticeComplex > & displaceObject(std::map< KeySmearedDispColorVector_t, SmearedDispColorVector_t > &disp_quark_map, const KeySmearedDispColorVector_t &key, const LatticeFermion &smrd_q)
Displace an object.
const multi1d< LatticeColorMatrix > & u
Gauge field.
virtual multi1d< LatticeComplex > getDispSource(int quark_num, const KeySmearedDispColorVector_t &key)
Accessor.
multi1d< std::map< KeySmearedDispColorVector_t, SmearedDispColorVector_t > > disp_src_maps
Maps of smeared displaced color vectors.
multi1d< Handle< DilutionScheme< LatticeFermion > > > diluted_quarks
multi1d< std::map< KeySmearedQuark_t, SmearedQuark_t > > smeared_src_maps
Maps of smeared color vectors.
~SmearedDispObjects()
Destructor.
Handle< QuarkSmearing< LatticeFermion > > quarkSmearing
Base class for quark smearing.
Fourier transform phase factor support.
int numSubsets() const
Number of subsets - length in decay direction.
multi2d< DComplex > sft(const LatticeComplex &cf) const
Do a sumMulti(cf*phases,getSet())
int numMom() const
Number of momenta.
const Set & getSet() const
The set to be used in sumMulti.
All dilution scheme factories.
Factory for dilution schemes.
Basis rotation matrix from Dirac to Degrand-Rossi (and reverse)
Parallel transport a lattice field.
SpinMatrixD DiracToDRMat()
The Dirac to Degrand-Rossi spin transformation matrix (and reverse)
void proginfo(XMLWriter &xml)
Print out basic information about this program.
std::string makeXMLFileName(std::string xml_file, unsigned long update_no)
Return a xml file name for inline measurements.
multi1d< GroupXML_t > readXMLArrayGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
GroupXML_t readXMLGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
LatticePropagator displacement(const multi1d< LatticeColorMatrix > &u, const LatticePropagator &chi, int length, int dir)
Apply a displacement operator to a lattice field.
Class for counted reference semantics.
Inline measurement of stochastic group baryon operator.
void savern(int iseed[4])
Named object function std::map.
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
SpinMatrix rotate_mat(adj(DiracToDRMat()))
bool registerAll()
Register all the factories.
void makeDiquark(multi1d< LatticeComplex > &diquark, const multi1d< LatticeComplex > &q0, const multi1d< LatticeComplex > &q1, const Subset &subset)
void read(XMLReader &xml, const std::string &path, InlineStochGroupBaryonEnv::Params::Param_t ¶m)
const int N_quarks
Number of quarks to be used in this construction.
void write(XMLWriter &xml, const std::string &path, const InlineStochGroupBaryonEnv::Params::Param_t ¶m)
bool operator<(const KeySmearedQuark_t &a, const KeySmearedQuark_t &b)
Support for the keys of smeared quarks.
void makeColorSinglet(LatticeComplex &singlet, const multi1d< LatticeComplex > &diquark, const multi1d< LatticeComplex > &q2, const Subset &subset)
void readOps(ThreeQuarkOps_t &oplist, const std::string &ops_file)
Read 3-quark operators file, assign correct displacement length.
bool registerAll()
Register all the factories.
bool registerAll()
Register all the factories.
Handle< FermBC< LatticeStaggeredFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > reader(XMLReader &xml_in, const std::string &path)
Helper function for the FermionAction readers.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
Print out basic info about this program.
All quark smearing constructors.
Factory for producing quark smearing objects.
Fourier transform phase factor support.
All make sink constructors.
Factory for producing quark prop sinks.
Factory for producing quark smearing objects.
Hold group xml and type id.
Momentum projected correlator.
Baryon operator dilutions.
multi1d< Mom_t > mom_projs
Quark orderings within a baryon operator.
multi3d< Dilutions_t > dilutions
Baryon operator time slices corresponding to location of operator source.
multi1d< Orderings_t > orderings
multi1d< TimeSlices_t > time_slices
multi1d< multi1d< int > > perms
The key for smeared and displaced color vectors.
The key for smeared quarks.
ThreeQuarkOpsFile_t operators_file
multi1d< GroupXML_t > quark_dils
GroupXML_t quark_smearing
void writeXML(XMLWriter &xml_out, const std::string &path)
The value of the std::map.
multi1d< LatticeComplex > vec
multi1d< QuarkInfo_t > quark
3-quark operator structure
multi1d< ThreeQuarkOp_t > ops