8#include "PolymerModel.h"
29 bool isLocked_ =
false;
70 {
return (model_ == Type::Thread); }
76 {
return (model_ == Type::Bead); }
98 if (buffer ==
"Thread" || buffer ==
"thread") {
99 type = PolymerModel::Thread;
101 if (buffer ==
"Bead" || buffer ==
"bead") {
102 type = PolymerModel::Type::Bead;
104 std::string msg =
"Unknown input PolymerModel value string: ";
117 if (type == PolymerModel::Thread) {
120 if (type == PolymerModel::Type::Bead) {
123 UTIL_THROW(
"Error writing a PolymerModel value");
File containing preprocessor macros for error handling.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
Type
Scoped enumeration of polymer model types.
Enumeration and functions to specify a model for polymer chains.
int nSet()
How many times has setModel been called?
void lock()
Make the polymer model immutable.
Type model()
Get the global polymer model type enumeration value.
void setModel(Type model)
Set the global polymer model enumeration value.
bool isThread()
Is the thread model in use ?
bool isBead()
Is the bead model in use ?
bool isLocked()
Has the model type been locked (i.e., made immutable) ?
PSCF package top-level namespace.
Utility classes for scientific computation.
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.