PSCF v1.1
|
Description of a linear homopolymer block within a block polymer. More...
#include <BlockDescriptor.h>
Public Member Functions | |
BlockDescriptor () | |
Constructor. More... | |
virtual | ~BlockDescriptor () |
Destructor. More... | |
template<class Archive > | |
void | serialize (Archive &ar, unsigned int versionId) |
Serialize to/from archive. More... | |
Setters | |
void | setId (int id) |
Set the id for this block. More... | |
void | setVertexIds (int vertexAId, int vertexBId) |
Set indices of associated vertices. More... | |
void | setMonomerId (int monomerId) |
Set the monomer id. More... | |
virtual void | setLength (double length) |
Set the length of this block. More... | |
void | setPolymerType (PolymerType::Enum type) |
Set the polymer type. More... | |
Accessors (getters) | |
int | id () const |
Get the id of this block. More... | |
int | monomerId () const |
Get the monomer type id. More... | |
const Pair< int > & | vertexIds () const |
Get the pair of associated vertex ids. More... | |
int | vertexId (int i) const |
Get id of an associated vertex. More... | |
double | length () const |
Get the length (number of monomers) in this block. More... | |
PolymerType::Enum | polymerType () const |
Get the type of the parent polymer (branched or linear). More... | |
std::istream & | operator>> (std::istream &in, BlockDescriptor &block) |
istream extractor for a BlockDescriptor. More... | |
std::ostream & | operator<< (std::ostream &out, const BlockDescriptor &block) |
ostream inserter for a BlockDescriptor. More... | |
Description of a linear homopolymer block within a block polymer.
This class defines the blockId, monomerId, length and vertexIds of a block within a block polymer. It serves as a base class for the BlockTmpl class template, which is a template for classes that solve the modified diffusion equation for the two propagators associated with a block. VertexIds should be set for all blocks in a block polymer before the associated Vertex objects are initialized.
Definition at line 34 of file BlockDescriptor.h.
Pscf::BlockDescriptor::BlockDescriptor | ( | ) |
Constructor.
Definition at line 16 of file BlockDescriptor.cpp.
|
virtual |
Destructor.
Definition at line 31 of file BlockDescriptor.cpp.
void Pscf::BlockDescriptor::serialize | ( | Archive & | ar, |
unsigned int | versionId | ||
) |
Serialize to/from archive.
ar | input or output Archive |
versionId | archive format version index |
Definition at line 232 of file BlockDescriptor.h.
void Pscf::BlockDescriptor::setId | ( | int | id | ) |
Set the id for this block.
id | integer index for this block |
Definition at line 37 of file BlockDescriptor.cpp.
References id().
void Pscf::BlockDescriptor::setVertexIds | ( | int | vertexAId, |
int | vertexBId | ||
) |
Set indices of associated vertices.
vertexAId | integer id of vertex A |
vertexBId | integer id of vertex B |
Definition at line 43 of file BlockDescriptor.cpp.
void Pscf::BlockDescriptor::setMonomerId | ( | int | monomerId | ) |
Set the monomer id.
monomerId | integer id of monomer type (>=0) |
Definition at line 52 of file BlockDescriptor.cpp.
References monomerId().
|
virtual |
Set the length of this block.
The ``length" is steric volume / reference volume.
length | block length (number of monomers). |
Reimplemented in Pscf::Pspc::Block< D >, Pscf::Pspg::Block< D >, Pscf::Pspg::Block< D >, Pscf::Fd1d::Block, and Pscf::Pspc::Block< D >.
Definition at line 58 of file BlockDescriptor.cpp.
References length().
Referenced by Pscf::Pspg::Block< D >::setLength(), Pscf::Fd1d::Block::setLength(), and Pscf::Pspc::Block< D >::setLength().
void Pscf::BlockDescriptor::setPolymerType | ( | PolymerType::Enum | type | ) |
Set the polymer type.
By convention, if the polymer type of a block with block index id is PolymerType::Linear, then vertexId(0) = id and vertexId(1) = id + 1. The PolymerType enumeration value for the block is used by the inserter and extractor operators to define a shorter string representation for blocks in linear polymers, for which the string representation does not include values for vertex ids. Vertex id values for blocks in a linear poiymer must be set explicitly by calling the setVertexIds function with consecutive values, as done in the PolymerTmpl::readParameters function.
type | type of polymer (branched or linear) |
Definition at line 64 of file BlockDescriptor.cpp.
|
inline |
Get the id of this block.
Definition at line 195 of file BlockDescriptor.h.
Referenced by Pscf::Vertex::addBlock(), and setId().
|
inline |
Get the monomer type id.
Definition at line 201 of file BlockDescriptor.h.
Referenced by setMonomerId().
|
inline |
Get the pair of associated vertex ids.
Definition at line 207 of file BlockDescriptor.h.
|
inline |
Get id of an associated vertex.
i | index of vertex (0 or 1) |
Definition at line 213 of file BlockDescriptor.h.
Referenced by Pscf::Vertex::addBlock().
|
inline |
Get the length (number of monomers) in this block.
Definition at line 219 of file BlockDescriptor.h.
Referenced by Pscf::Fd1d::Block::setDiscretization(), setLength(), Pscf::Fd1d::Block::setLength(), and Pscf::Fd1d::Block::setupSolver().
|
inline |
Get the type of the parent polymer (branched or linear).
Definition at line 225 of file BlockDescriptor.h.
|
friend |
istream extractor for a BlockDescriptor.
in | input stream |
block | BlockDescriptor to be read from stream |
Definition at line 70 of file BlockDescriptor.cpp.
|
friend |
ostream inserter for a BlockDescriptor.
out | output stream |
block | BlockDescriptor to be written to stream |
Definition at line 84 of file BlockDescriptor.cpp.