PSCF v1.1
|
Class template for a block in a block copolymer. More...
#include <BlockTmpl.h>
Public Member Functions | |
BlockTmpl () | |
Constructor. More... | |
virtual | ~BlockTmpl () |
Destructor. More... | |
virtual void | setKuhn (double kuhn) |
Set monomer statistical segment length. More... | |
TP & | propagator (int directionId) |
Get a Propagator for a specified direction. More... | |
TP const & | propagator (int directionId) const |
Get a const Propagator for a specified direction. More... | |
TP::CField & | cField () |
Get the associated monomer concentration field. More... | |
TP::CField const & | cField () const |
Get the associated const monomer concentration field. More... | |
double | kuhn () const |
Get monomer statistical segment length. More... | |
![]() | |
BlockDescriptor () | |
Constructor. More... | |
virtual | ~BlockDescriptor () |
Destructor. More... | |
template<class Archive > | |
void | serialize (Archive &ar, unsigned int versionId) |
Serialize to/from archive. More... | |
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... | |
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... | |
Class template for a block in a block copolymer.
Class TP is a concrete propagator class. A BlockTmpl<TP> object has:
Each implementation of self-consistent field theory (SCFT) is defined in a different sub-namespace of Pscf. Each such implementation defines a concrete propagator class and a concrete block class, which ar named Propagator and Block by convention.The Block class in each implementation is derived from BlockTmpl<Propagator>, using the following syntax:
The algorithms for taking one step of integration of the modified diffusion equation and for computing the monomer concentration field arising from monomers in one block must be implemented in the Block class. These algorithms must be implemented in member functions of the concrete Block class with the following interfaces:
These core algorithms are implemented in the Block class, rather than the Propagator class, because the data required to implement these algorithms generally depends on the monomer type and contour length step size ds of a particular block, and can thus be shared by the two propagators associated with a particular block. The data required to implement these algorithms cannot, however, be shared among propagators in different blocks of the same monomer type because the requirement that the length of each block be divided into an integer number of contour length steps implies that different blocks of arbitrary user-specified length must generally be assumed to have slightly different values for the step size ds.
The step() function is called in the implementation of the PropagatorTmpl::solve() member function, within a loop over steps. The computeConcentration() function is called in the implementation of the PolymerTmpl::solve() member function, within a loop over all blocks of the molecule that is called after solution of the modified diffusion equation for all propagators.
Definition at line 88 of file BlockTmpl.h.
Pscf::BlockTmpl< TP >::BlockTmpl |
Constructor.
Definition at line 214 of file BlockTmpl.h.
References Pscf::BlockTmpl< TP >::propagator().
|
virtual |
Destructor.
Definition at line 229 of file BlockTmpl.h.
|
virtual |
Set monomer statistical segment length.
kuhn | monomer statistical segment length |
Reimplemented in Pscf::Pspc::Block< D >, and Pscf::Pspg::Block< D >.
Definition at line 236 of file BlockTmpl.h.
|
inline |
Get a Propagator for a specified direction.
For a block with v0 = vertexId(0) and v1 = vertexId(1), propagator(0) propagates from vertex v0 to v1, while propagator(1) propagates from vertex v1 to v0.
directionId | integer index for direction (0 or 1) |
Definition at line 174 of file BlockTmpl.h.
Referenced by Pscf::BlockTmpl< TP >::BlockTmpl().
|
inline |
Get a const Propagator for a specified direction.
See above for number conventions.
directionId | integer index for direction (0 or 1) |
Definition at line 182 of file BlockTmpl.h.
|
inline |
Get the associated monomer concentration field.
Definition at line 190 of file BlockTmpl.h.
|
inline |
Get the associated const monomer concentration field.
Definition at line 198 of file BlockTmpl.h.
|
inline |
Get monomer statistical segment length.
Definition at line 205 of file BlockTmpl.h.