PSCF v1.3
PolymerModel.h
1#ifndef PSCF_POLYMER_MODEL_H
2#define PSCF_POLYMER_MODEL_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2025, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <util/archives/serialize.h>
12#include <iostream>
13
14
15namespace Pscf{
16
34 namespace PolymerModel{
35
36 using namespace Util;
37
49 enum Type {Thread, Bead};
50
57
66 int nSet();
67
72
76 bool isThread();
77
81 bool isBead();
82
94 void lock();
95
99 bool isLocked();
100
109 std::istream& operator >> (std::istream& in,
111
120 std::ostream& operator << (std::ostream& out,
121 PolymerModel::Type const & model);
122
132 template <class Archive>
133 inline void
134 serialize(Archive& ar, PolymerModel::Type& data,
135 const unsigned int version)
136 { serializeEnum(ar, data, version); }
137
138 }
139}
140#endif
Type
Scoped enumeration of polymer model types.
void serializeEnum(Archive &ar, T &data, const unsigned int version=0)
Serialize an enumeration value.
Definition serialize.h:59
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.
Definition param_pc.dox:1
std::istream & operator>>(std::istream &in, Pair< Data > &pair)
Input a Pair from an istream.
Definition Pair.h:44
std::ostream & operator<<(std::ostream &out, const Pair< Data > &pair)
Output a Pair to an ostream, without line breaks.
Definition Pair.h:57