1#ifndef PSCF_POLYMER_SPECIES_H
2#define PSCF_POLYMER_SPECIES_H
11#include <pscf/chem/Species.h>
13#include <pscf/chem/Vertex.h>
14#include <pscf/chem/PolymerType.h>
15#include <pscf/chem/PolymerModel.h>
16#include <util/containers/Pair.h>
17#include <util/containers/DArray.h>
70 template <
typename WT=
double>
166 PolymerType::Enum
type()
const;
283 PolymerType::Enum type_;
299 template <
typename WT>
inline
306 template <
typename WT>
inline
313 template <
typename WT>
inline
315 {
return nPropagator_; }
320 template <
typename WT>
inline
322 {
return vertices_[id]; }
327 template <
typename WT>
inline
332 return propagatorIds_[id];
338 template <
typename WT>
inline
345 return paths_[is][it];
351 template <
typename WT>
inline
Descriptor for a block within a block polymer.
Descriptor for a linear or acyclic branched block polymer.
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.
int nBead() const
Total number of beads in the polymer (bead model).
double length() const
Sum of the lengths of all blocks in the polymer (thread model).
virtual Edge const & edge(int id) const =0
Get a specified Edge (block descriptor) by const reference.
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.
PolymerSpecies()
Constructor.
virtual void readParameters(std::istream &in)
Read parameters and initialize.
virtual void readBlocks(std::istream &in)=0
Read array of blocks from parameter file.
const Vertex & vertex(int id) const
Get a specified Vertex by const reference.
int nBlock() const
Number of blocks.
int nPropagator() const
Number of propagators (2*nBlock).
virtual ~PolymerSpecies()=default
Destructor.
Pair< int > const & propagatorId(int id) const
Get a propagator identifier, indexed by order of computation.
virtual void allocateBlocks()=0
Allocate array of blocks.
PolymerType::Enum type() const
Get Polymer type (Branched or Linear)
virtual void makePlan()
Make a plan for order in which propagators should be computed.
A junction or chain end in a block polymer.
Dynamically allocatable contiguous array template.
An array of exactly 2 objects.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.