1#ifndef PSCF_POLYMER_SPECIES_H
2#define PSCF_POLYMER_SPECIES_H
11#include <pscf/chem/Species.h>
12#include <util/param/ParamComposite.h>
14#include <pscf/chem/Vertex.h>
15#include <pscf/chem/PolymerType.h>
16#include <util/containers/Pair.h>
17#include <util/containers/DArray.h>
175 PolymerType::Enum
type()
const;
239 PolymerType::Enum type_;
259 {
return nPropagator_; }
266 {
return vertices_[id]; }
276 return propagatorIds_[id];
289 return paths_[is][it];
Descriptor for a block within an acyclic block polymer.
Descriptor for a linear or acyclic branched block polymer.
const Vertex & vertex(int id) const
Get a specified Vertex by const reference.
virtual void readBlocks(std::istream &in)=0
Read array of blocks from parameter file.
virtual Edge const & edge(int id) const =0
Get a specified Edge (block descriptor) by const reference.
PolymerSpecies()
Constructor.
void isValid()
Check validity of graph.
void makePaths()
Create a matrix of vertex-to-vertex path signposts.
Pair< int > const & path(int is, int it) const
Get an id for a propagator from one vertex towards a target.
virtual void allocateBlocks()=0
Allocate array of blocks.
int nVertex() const
Number of vertices (junctions and chain ends).
virtual Edge & edge(int id)=0
Get a specified Edge (block descriptor) by non-const reference.
virtual void readParameters(std::istream &in)
Read parameters and initialize.
virtual void makePlan()
Make a plan for order in which propagators should be computed.
int nPropagator() const
Number of propagators (2*nBlock).
~PolymerSpecies()
Destructor.
int nBlock() const
Number of blocks.
double length() const
Sum of the lengths of all blocks in the polymer.
Pair< int > const & propagatorId(int id) const
Get a propagator identifier, indexed by order of computation.
PolymerType::Enum type() const
Get Polymer type (Branched or Linear)
Base class for a molecular species (polymer or solvent).
A junction or chain end in a block polymer.
Dynamically allocatable contiguous array template.
An array of exactly 2 objects.
An object that can read multiple parameters from file.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.
Utility classes for scientific computation.