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>
17#include <pscf/chem/Vertex.h>
18#include <pscf/chem/PolymerType.h>
19#include <pscf/chem/PolymerModel.h>
115 virtual void solve(
double phiTot = 1.0);
238 {
return blocks_[id]; }
246 {
return blocks_[id]; }
254 {
return blocks_[id]; }
262 {
return blocks_[id]; }
269 typename BT::PropagatorT&
271 {
return block(blockId).propagator(directionId); }
278 typename BT::PropagatorT
const &
280 {
return block(blockId).propagator(directionId); }
294#include "PolymerTmpl.tpp"
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)
typename BT::PropagatorT PropagatorT
Modified diffusion equation solver for one block, in one direction.
void allocateBlocks() final
Allocate array of Block objects.
BT const & block(int id) const
Get a specified Block (solver and descriptor) by const reference.
void readBlocks(std::istream &in) final
~PolymerTmpl()
Destructor.
PropagatorT const & propagator(int blockId, int directionId) const
Get the propagator for a specific block and direction (const).
PropagatorT & propagator(int id)
Get a propagator indexed in order of computation (non-const).
virtual void readParameters(std::istream &in)
Read and initialize.
PropagatorT & propagator(int blockId, int directionId)
Get the propagator for a specific block and direction (non-const).
Edge const & edge(int id) const final
Get a specified Edge (block descriptor) by const reference.
BT BlockT
Block of a block polymer.
virtual void solve(double phiTot=1.0)
Solve modified diffusion equation for all propagators.
PolymerTmpl()
Constructor.
Pair< int > const & propagatorId(int id) const
Get a propagator identifier, indexed by order of computation.
Edge & edge(int id) final
Get a specified Edge (block descriptor) by non-const reference.
BT & block(int id)
Get a specified Block (solver and descriptor).
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.
An array of exactly 2 objects.
PSCF package top-level namespace.