1#ifndef PSCF_BLOCK_DESCRIPTOR_H
2#define PSCF_BLOCK_DESCRIPTOR_H
11#include "PolymerType.h"
12#include <util/containers/Pair.h>
54 template <
class Archive>
55 void serialize(Archive& ar,
unsigned int versionId);
161 PolymerType::Enum polymerType_;
202 {
return monomerId_; }
208 {
return vertexIds_; }
214 {
return vertexIds_[i]; }
226 {
return polymerType_; }
231 template <
class Archive>
Description of a linear homopolymer block within a block polymer.
double length() const
Get the length (number of monomers) in this block.
int vertexId(int i) const
Get id of an associated vertex.
void setId(int id)
Set the id for this block.
friend std::ostream & operator<<(std::ostream &out, const BlockDescriptor &block)
ostream inserter for a BlockDescriptor.
void serialize(Archive &ar, unsigned int versionId)
Serialize to/from archive.
friend std::istream & operator>>(std::istream &in, BlockDescriptor &block)
istream extractor for a BlockDescriptor.
virtual ~BlockDescriptor()
Destructor.
int monomerId() const
Get the monomer type id.
const Pair< int > & vertexIds() const
Get the pair of associated vertex ids.
void setPolymerType(PolymerType::Enum type)
Set the polymer type.
PolymerType::Enum polymerType() const
Get the type of the parent polymer (branched or linear).
virtual void setLength(double length)
Set the length of this block.
void setVertexIds(int vertexAId, int vertexBId)
Set indices of associated vertices.
BlockDescriptor()
Constructor.
int id() const
Get the id of this block.
void setMonomerId(int monomerId)
Set the monomer id.
An array of exactly 2 objects.
C++ namespace for polymer self-consistent field theory (PSCF).
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.