1#ifndef PSCF_POLYMER_TMPL_H
2#define PSCF_POLYMER_TMPL_H
11#include <pscf/chem/PolymerSpecies.h>
12#include <util/param/ParamComposite.h>
14#include <util/containers/Pair.h>
15#include <util/containers/DArray.h>
43 template <
class BT,
class PT>
110 virtual void solve(
double phiTot = 1.0);
230 template <class BT, class PT>
233 {
return blocks_[id]; }
238 template <
class BT,
class PT>
241 {
return blocks_[id]; }
246 template <
class BT,
class PT>
249 {
return blocks_[id]; }
254 template <
class BT,
class PT>
257 {
return blocks_[id]; }
Descriptor for a block within a block polymer.
const Vertex & vertex(int id) const
Get a specified Vertex by const reference.
PolymerSpecies()
Constructor.
Pair< int > const & path(int is, int it) const
Get an id for a propagator from one vertex towards a target.
int nVertex() const
Number of vertices (junctions and chain ends).
int nPropagator() const
Number of propagators (2*nBlock).
int nBead() const
Total number of beads in the polymer (bead model).
int nBlock() const
Number of blocks.
double length() const
Sum of the lengths of all blocks in the polymer (thread model).
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)
BT & block(int id)
Get a specified Block (solver and descriptor).
virtual void solve(double phiTot=1.0)
Solve modified diffusion equation for all propagators.
BT BlockT
Block of a block polymer.
void readBlocks(std::istream &in) final
PT & propagator(int id)
Get a propagator indexed in order of computation (non-const).
~PolymerTmpl()
Destructor.
Edge const & edge(int id) const final
Get a specified Edge (block descriptor) by const reference.
PT & propagator(int blockId, int directionId)
Get the propagator for a specific block and direction (non-const).
virtual void readParameters(std::istream &in)
Read and initialize.
BT const & block(int id) const
Get a specified Block (solver and descriptor) by const reference.
PolymerTmpl()
Constructor.
void allocateBlocks() final
Allocate array of Block objects.
PT PropagatorT
Modified diffusion equation solver for one block, in one direction.
PT const & propagator(int blockId, int directionId) const
Get the propagator for a specific block and direction (const).
Edge & edge(int id) final
Get a specified Edge (block descriptor) by non-const reference.
double phi() const
Get the overall volume fraction for this species.
double mu() const
Get the chemical potential for this species (units kT=1).
Ensemble ensemble() const
Get the statistical ensemble for this species (open or closed).
double q() const
Get the molecular partition function for this species.
Dynamically allocatable contiguous array template.
PSCF package top-level namespace.