52 vertexIds_[0] = vertexId0;
53 vertexIds_[1] = vertexId1;
78 { polymerType_ = type; }
86 in >> block.monomerId_;
97 if (block.polymerType_ == PolymerType::Branched) {
98 in >> block.vertexIds_[0];
99 in >> block.vertexIds_[1];
112 out <<
" " << block.monomerId_;
117 out.setf(std::ios::scientific);
120 out << block.length_;
127 if (block.polymerType_ == PolymerType::Branched) {
128 out <<
" " << block.vertexIds_[0];
129 out <<
" " << block.vertexIds_[1];
virtual void setNBead(int nBead)
Set the number of beads in this block (only valid for bead model).
int id() const
Get the id of this block (unique within the polymer).
void setPolymerType(PolymerType::Enum type)
Set the type of the parent polymer (branched or linear).
void setVertexIds(int vertexId0, int vertexId1)
Set indices of associated vertices.
int nBead() const
Get the number of beads in this block, in the bead model.
virtual void setLength(double length)
Set the length of this block (only valid for thread model).
int monomerId() const
Get the monomer type id for this block.
virtual ~Edge()
Destructor.
void setMonomerId(int monomerId)
Set the monomer type id.
void setId(int id)
Set the id for this block.
double length() const
Get the length of this block, in the thread model.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
bool isThread()
Is the thread model in use ?
bool isBead()
Is the bead model in use ?
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.
Struct containing an enumeration of polymer structure types.