|
PSCF v1.3.3
|
Block within a block polymer. More...
#include <Block.h>
Public Member Functions | |
| Block () | |
| Constructor. | |
| ~Block () | |
| Destructor. | |
| void | setDiscretization (Domain const &domain, double ds) |
| Initialize discretization and allocate required memory. | |
| virtual void | setLength (double newLength) |
| Set length and readjust ds_ accordingly. | |
| void | setupSolver (DArray< double > const &w) |
| Set Crank-Nicholson solver for this block. | |
| void | computeConcentration (double prefactor) |
| Compute concentration for block by integration. | |
| void | step (DArray< double > const &q, DArray< double > &qNew) |
| Compute one step of integration loop, from i to i+1. | |
| Domain const & | domain () const |
| Return associated domain by reference. | |
| int | ns () const |
| Number of contour length steps. | |
| Public Member Functions inherited from Pscf::BlockTmpl< Propagator, DArray< double > > | |
| BlockTmpl () | |
| Constructor. | |
| virtual | ~BlockTmpl () |
| Destructor. | |
| virtual void | setKuhn (double kuhn) |
| Set monomer statistical segment length. | |
| Propagator & | propagator (int directionId) |
| Get a Propagator for a specified direction. | |
| DArray< double > & | cField () |
| Get the associated monomer concentration field. | |
| double | kuhn () const |
| Get monomer statistical segment length. | |
| Public Member Functions inherited from Pscf::Edge | |
| Edge () | |
| Constructor. | |
| virtual | ~Edge () |
| Destructor. | |
| template<class Archive> | |
| void | serialize (Archive &ar, unsigned int versionId) |
| Serialize to/from archive. | |
| void | setId (int id) |
| Set the id for this block. | |
| void | setMonomerId (int monomerId) |
| Set the monomer type id. | |
| void | setVertexIds (int vertexId0, int vertexId1) |
| Set indices of associated vertices. | |
| virtual void | setNBead (int nBead) |
| Set the number of beads in this block (only valid for bead model). | |
| void | setPolymerType (PolymerType::Enum type) |
| Set the type of the parent polymer (branched or linear). | |
| int | id () const |
| Get the id of this block (unique within the polymer). | |
| int | monomerId () const |
| Get the monomer type id for this block. | |
| const Pair< int > & | vertexIds () const |
| Get the pair of associated vertex ids. | |
| int | vertexId (int i) const |
| Get the id of one associated vertex. | |
| double | length () const |
| Get the length of this block, in the thread model. | |
| int | nBead () const |
| Get the number of beads in this block, in the bead model. | |
| PolymerType::Enum | polymerType () const |
| Get the type of the parent polymer (branched or linear). | |
Additional Inherited Members | |
| Public Types inherited from Pscf::BlockTmpl< Propagator, DArray< double > > | |
| using | PropagatorT |
| Modified diffusion equation solver (propagator) type. | |
| using | FieldT |
| Field type. | |
Block within a block polymer.
Derived directly from BlockTmpl<Propagator, DArray<double> >, and indirectry form Pscf::Edge. A Block has two Propagator members and a monomer concentration field.
Definition at line 34 of file r1d/solvers/Block.h.
| Pscf::R1d::Block::Block | ( | ) |
Constructor.
Definition at line 26 of file r1d/solvers/Block.cpp.
References Pscf::BlockTmpl< Propagator, DArray< double > >::propagator().
| Pscf::R1d::Block::~Block | ( | ) |
Destructor.
Definition at line 39 of file r1d/solvers/Block.cpp.
| void Pscf::R1d::Block::setDiscretization | ( | Domain const & | domain, |
| double | ds ) |
Initialize discretization and allocate required memory.
| domain | associated Domain object, with grid info |
| ds | desired (optimal) value for contour length step |
Definition at line 42 of file r1d/solvers/Block.cpp.
References Util::DArray< Data >::allocate(), Pscf::BlockTmpl< Propagator, DArray< double > >::cField(), domain(), Pscf::Edge::length(), Pscf::BlockTmpl< Propagator, DArray< double > >::propagator(), and UTIL_CHECK.
|
virtual |
Set length and readjust ds_ accordingly.
| newLength | length (# of monomers) for this block |
Reimplemented from Pscf::Edge.
Definition at line 74 of file r1d/solvers/Block.cpp.
References Pscf::Edge::length(), Pscf::BlockTmpl< Propagator, DArray< double > >::propagator(), Pscf::Edge::setLength(), and UTIL_CHECK.
| void Pscf::R1d::Block::setupSolver | ( | DArray< double > const & | w | ) |
Set Crank-Nicholson solver for this block.
| w | Chemical potential field (input) |
Definition at line 126 of file r1d/solvers/Block.cpp.
References domain(), Pscf::R1d::Domain::dx(), Pscf::R1d::Domain::isShell(), Pscf::BlockTmpl< Propagator, DArray< double > >::kuhn(), Pscf::Edge::length(), Pscf::R1d::Domain::mode(), Pscf::R1d::Domain::nx(), Pscf::BlockTmpl< Propagator, DArray< double > >::propagator(), UTIL_CHECK, UTIL_THROW, Pscf::R1d::Domain::xMax(), and Pscf::R1d::Domain::xMin().
| void Pscf::R1d::Block::computeConcentration | ( | double | prefactor | ) |
Compute concentration for block by integration.
Upon return, grid point r of array cField() contains the integral int ds q(r,s)q^{*}(r,L-s) times the prefactor, where q(r,s) is the solution obtained from propagator(0), and q^{*} is the solution of propagator(1), and s is a contour variable that is integrated over the domain 0 < s < length(), where length() is the block length.
| prefactor | constant prefactor multiplying integral |
Definition at line 247 of file r1d/solvers/Block.cpp.
References Pscf::BlockTmpl< Propagator, DArray< double > >::cField(), domain(), Pscf::R1d::Domain::nx(), Pscf::BlockTmpl< Propagator, DArray< double > >::propagator(), Pscf::R1d::Propagator::q(), and UTIL_CHECK.
Compute one step of integration loop, from i to i+1.
| q | propagator slice at step i (input) |
| qNew | propagator slice at step i + 1 (output) |
Definition at line 300 of file r1d/solvers/Block.cpp.
References domain(), and Pscf::R1d::Domain::nx().
|
inline |
Return associated domain by reference.
Get Domain by reference.
Definition at line 151 of file r1d/solvers/Block.h.
References UTIL_ASSERT.
Referenced by computeConcentration(), setDiscretization(), setupSolver(), and step().
|
inline |
Number of contour length steps.
Get number of contour steps.
Definition at line 158 of file r1d/solvers/Block.h.