17 #include "qdp_map_obj_memory.h"
24 namespace InlineGaussianInitNamedObjEnv
28 namespace GaussianInitObjCallMapEnv
33 struct DumbDisambiguator {};
44 TheGaussianInitObjFuncMap;
55 XMLBufferWriter file_xml, record_xml;
57 push(file_xml,
"FileXML");
60 push(record_xml,
"RecordXML");
69 void gaussianInitMulti1dLatColMat(
const std::string& buffer_id)
71 multi1d<LatticeColorMatrix>
u(
Nd);
72 for(
int mu=0;
mu <
u.size(); ++
mu)
75 XMLBufferWriter file_xml, record_xml;
77 push(file_xml,
"FileXML");
80 push(record_xml,
"RecordXML");
91 void gaussianInitMapObjKeyPropColorVecLatFerm(
const std::string& buffer_id)
106 QDP::MapObject<KeyPropColorVec_t,LatticeFermion>&
obj =
111 multi1d<int> t_sources(2);
113 t_sources[1] = QDP::Layout::lattSize()[
Nd-1] / 2;
116 for(
int tt=0; tt < t_sources.size(); ++tt)
118 int t0 = t_sources[tt];
120 for(
int colorvec_src=0; colorvec_src < N; ++colorvec_src)
122 for(
int spin_src=0; spin_src < Ns; ++spin_src)
135 obj.insert(key, val);
144 XMLBufferWriter file_xml;
146 push(file_xml,
"PropColorVectors");
147 write(file_xml,
"num_records",
obj.size());
148 push(file_xml,
"Params");
150 push(file_xml,
"Config_info");
154 XMLBufferWriter record_xml;
155 push(record_xml,
"PropColorVector");
156 write(record_xml,
"num_records",
obj.size());
177 success &= TheGaussianInitObjFuncMap::Instance().registerFunction(
std::string(
"LatticePropagator"),
178 gaussianInitObj<LatticePropagator>);
179 success &= TheGaussianInitObjFuncMap::Instance().registerFunction(
std::string(
"LatticeFermion"),
180 gaussianInitObj<LatticeFermion>);
181 success &= TheGaussianInitObjFuncMap::Instance().registerFunction(
std::string(
"LatticeStaggeredPropagator"),
182 gaussianInitObj<LatticeStaggeredPropagator>);
183 success &= TheGaussianInitObjFuncMap::Instance().registerFunction(
std::string(
"LatticeStaggeredFermion"),
184 gaussianInitObj<LatticeStaggeredFermion>);
185 success &= TheGaussianInitObjFuncMap::Instance().registerFunction(
std::string(
"MapObjectKeyPropColorVecLatticeFermion"),
186 gaussianInitMapObjKeyPropColorVecLatFerm);
200 return new InlineMeas(Params(xml_in, path));
240 XMLReader inputtop(xml, path);
254 XMLReader paramtop(xml_in, path);
256 if (paramtop.count(
"Frequency") == 1)
266 QDPIO::cerr << __func__ <<
": caught Exception reading XML: " << e << std::endl;
290 push(xml_out,
"gaussian_init_named_obj");
291 write(xml_out,
"update_no", update_no);
293 QDPIO::cout <<
name <<
": gaussian init an object of type "
297 QDPIO::cout <<
"Attempt to list all object names" << std::endl;
304 catch (std::bad_cast)
306 QDPIO::cerr <<
name <<
": cast error"
312 QDPIO::cerr <<
name <<
": error message: " << e
317 QDPIO::cout <<
name <<
": ran successfully" << std::endl;
Inline measurement factory.
Primary include file for CHROMA library code.
Class for counted reference semantics.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the writing.
Gramm-Schmidt orthogonolization.
Class for counted reference semantics.
Inline task to gaussian init a named object.
Handle< MapObject< int, EVPair< LatticeColorVector > > > obj
Key for propagator colorstd::vector sources.
Named object function std::map.
static bool registered
Local registration flag.
const std::string name
Name to be used.
bool registerAll()
Register all the factories.
void write(XMLWriter &xml, const std::string &path, const Params::NamedObject_t &input)
Object buffer.
bool registerAll()
Register all the factories.
void read(XMLReader &xml, const std::string &path, Params::NamedObject_t &input)
Object buffer.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
LinOpSysSolverMGProtoClover::T T
Fourier transform phase factor support.
struct Chroma::InlineGaussianInitNamedObjEnv::Params::NamedObject_t named_obj
void writeXML(XMLWriter &xml_out, const std::string &path)