CHROMA
lib
io
enum_io
enum_fermtype_io.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
/*! \file
3
* \brief FermType enum
4
*/
5
6
#include "
enum_fermtype_io.h
"
7
8
#include <string>
9
10
namespace
Chroma
{
11
12
namespace
FermTypeEnv {
13
14
bool
registerAll
(
void
)
15
{
16
bool
success;
17
success =
theFermTypeMap::Instance
().registerPair(
std::string
(
"WILSON"
),
FERM_TYPE_WILSON
);
18
success &=
theFermTypeMap::Instance
().registerPair(
std::string
(
"STAGGERED"
),
FERM_TYPE_STAGGERED
);
19
20
return
success;
21
}
22
const
std::string
typeIDString
=
"FermType"
;
23
24
bool
registered
=
registerAll
();
25
}
26
27
using namespace
FermTypeEnv;
28
29
//! Read an fermion type enum
30
void
read
(XMLReader& xml_in,
const
std::string
& path,
FermType
&
t
) {
31
theFermTypeMap::Instance
().read(
typeIDString
, xml_in, path,
t
);
32
}
33
34
//! Write an fermion type enum
35
void
write
(XMLWriter& xml_out,
const
std::string
& path,
const
FermType
&
t
) {
36
theFermTypeMap::Instance
().write(
typeIDString
, xml_out, path,
t
);
37
}
38
}
Chroma::SingletonHolder::Instance
static T & Instance()
Definition:
singleton.h:432
enum_fermtype_io.h
FermType enum.
Chroma::read
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
Definition:
asqtad_fermact_params_s.cc:33
Chroma::write
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
Definition:
asqtad_fermact_params_s.cc:40
Chroma::FermType
FermType
Fermion type.
Definition:
enum_fermtype_io.h:27
Chroma::FERM_TYPE_STAGGERED
@ FERM_TYPE_STAGGERED
Definition:
enum_fermtype_io.h:29
Chroma::FERM_TYPE_WILSON
@ FERM_TYPE_WILSON
Definition:
enum_fermtype_io.h:28
t
int t
Definition:
meslate.cc:37
Chroma::FermTypeEnv::typeIDString
const std::string typeIDString
Definition:
enum_fermtype_io.cc:22
Chroma::FermTypeEnv::registered
bool registered
Definition:
enum_fermtype_io.cc:24
Chroma::FermTypeEnv::registerAll
bool registerAll(void)
Definition:
enum_fermtype_io.cc:14
Chroma
Asqtad Staggered-Dirac operator.
Definition:
klein_gord.cc:10
testing::internal::string
::std::string string
Definition:
gtest.h:1979
Generated by
1.9.1