CHROMA
lib
io
enum_io
enum_simplebctype_io.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
/*! \file
3
* \brief Simple BC type enum
4
*/
5
#include "
enum_simplebctype_io.h
"
6
7
#include <string>
8
9
namespace
Chroma
{
10
11
namespace
SimpleBCTypeEnv {
12
13
bool
registerAll
(
void
)
14
{
15
bool
success;
16
success =
theSimpleBCTypeMap::Instance
().registerPair(
std::string
(
"ANTIPERIODIC"
),
BC_TYPE_ANTIPERIODIC
);
17
success &=
theSimpleBCTypeMap::Instance
().registerPair(
std::string
(
"DIRICHLET"
),
BC_TYPE_DIRICHLET
);
18
success &=
theSimpleBCTypeMap::Instance
().registerPair(
std::string
(
"PERIODIC"
),
BC_TYPE_PERIODIC
);
19
20
return
success;
21
}
22
23
// Boilerplate stuff from here on
24
const
std::string
typeIDString
=
"SimpleBCType"
;
25
bool
registered
=
registerAll
();
26
}
27
using namespace
SimpleBCTypeEnv;
28
29
//! Read an simpleBC type enum
30
void
read
(XMLReader& xml_in,
const
std::string
& path,
SimpleBCType
&
t
) {
31
theSimpleBCTypeMap::Instance
().read(
typeIDString
,xml_in, path,
t
);
32
}
33
34
//! Write an simpleBC type enum
35
void
write
(XMLWriter& xml_out,
const
std::string
& path,
const
SimpleBCType
&
t
) {
36
theSimpleBCTypeMap::Instance
().write(
typeIDString
,xml_out, path,
t
);
37
}
38
}
Chroma::SingletonHolder::Instance
static T & Instance()
Definition:
singleton.h:432
enum_simplebctype_io.h
Simple BC type 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::SimpleBCType
SimpleBCType
SimpleBC type.
Definition:
enum_simplebctype_io.h:25
Chroma::BC_TYPE_PERIODIC
@ BC_TYPE_PERIODIC
Definition:
enum_simplebctype_io.h:28
Chroma::BC_TYPE_ANTIPERIODIC
@ BC_TYPE_ANTIPERIODIC
Definition:
enum_simplebctype_io.h:26
Chroma::BC_TYPE_DIRICHLET
@ BC_TYPE_DIRICHLET
Definition:
enum_simplebctype_io.h:27
t
int t
Definition:
meslate.cc:37
Chroma::SimpleBCTypeEnv::registered
bool registered
Definition:
enum_simplebctype_io.cc:25
Chroma::SimpleBCTypeEnv::registerAll
bool registerAll(void)
Definition:
enum_simplebctype_io.cc:13
Chroma::SimpleBCTypeEnv::typeIDString
const std::string typeIDString
Definition:
enum_simplebctype_io.cc:24
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