21 if (buffer ==
"Closed" || buffer ==
"closed") {
22 policy = Ensemble::Closed;
24 if (buffer ==
"Open" || buffer ==
"open") {
25 policy = Ensemble::Open;
27 UTIL_THROW(
"Invalid Ensemble enum string in operator >>");
37 if (policy == Ensemble::Closed) {
40 if (policy == Ensemble::Open) {
43 if (policy == Ensemble::Unknown) {
46 std::cout <<
"Invalid Ensemble enum value on input"
48 UTIL_THROW(
"Unrecognized value for Ensemble enum");
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
Ensemble
Statistical ensemble type for the number of molecules of one species.
PSCF package top-level namespace.
std::istream & operator>>(std::istream &in, Pair< Data > &pair)
Input a Pair from an istream.
std::ostream & operator<<(std::ostream &out, const Pair< Data > &pair)
Output a Pair to an ostream, without line breaks.