|
PSCF v1.4.0
|
MDE solver for one direction of one block. More...
#include <Propagator.h>
Public Member Functions | |
| Propagator () | |
| Constructor. | |
| ~Propagator () | |
| Destructor. | |
| void | allocate (int ns, const Mesh< D > &mesh) override |
| Allocate memory used by this propagator. | |
| void | reallocate (int ns) override |
| Reallocate memory used by this propagator. | |
| Public Member Functions inherited from Pscf::Rp::Propagator< D, Types< D > > | |
| void | setBlock (typename Types< D >::Block &block) |
| Associate this propagator with a block. | |
| void | solve () |
| Solve the modified diffusion equation (MDE) for this block. | |
| void | solve (typename Types< D >::RField const &head) |
| Solve the MDE for a specified initial condition. | |
| void | computeQ (double &Q) const |
| Compute and return partition function for the polymer molecule. | |
| const Types< D >::RField & | q (int i) const |
| Return q-field at a specified step. | |
| const Types< D >::RField & | head () const |
| Return q-field at the initial (head) vertex. | |
| const Types< D >::RField & | tail () const |
| Return q-field at the terminal (tail) vertex. | |
| Types< D >::Block const & | block () const |
| Get the associated Block object by const reference. | |
| Mesh< D > const & | mesh () const |
| Return the associated Mesh object by const reference. | |
| int | ns () const |
| Get the number of values of s (or slices), including head and tail. | |
| bool | isAllocated () const |
| Has memory been allocated for this propagator? | |
| Public Member Functions inherited from Pscf::PropagatorTmpl< QT > | |
| void | setDirectionId (int directionId) |
| Associate this propagator with a direction index. | |
| void | setPartner (const QT &partner) |
| Set the partner of this propagator. | |
| void | addSource (const QT &source) |
| Add a propagator to the list of sources for this one. | |
| void | setIsSolved (bool isSolved) |
| Set the isSolved flag to true or false. | |
| void | setEndFlags (bool isHeadEnd, bool isTailEnd) |
| Set flags indicating whether vertices are chain ends. | |
| const QT & | source (int id) const |
| Get a source propagator. | |
| const QT & | partner () const |
| Get partner propagator. | |
| int | directionId () const |
| Get direction index for this propagator. | |
| int | nSource () const |
| Number of source / prerequisite propagators. | |
| bool | hasPartner () const |
| Does this have a partner propagator? | |
| bool | isHeadEnd () const |
| Is the head vertex a chain end? | |
| bool | isTailEnd () const |
| Is the tail vertex a chain end? | |
| bool | isSolved () const |
| Has the modified diffusion equation been solved? | |
| bool | isReady () const |
| Are all source propagators solved? | |
Protected Types | |
| using | RpPropagatorT = Rp::Propagator<D, Types<D> > |
| Direct (parent) base class. | |
Protected Member Functions | |
| void | computeHead () |
| Compute initial q-field at the head vertex. | |
| Protected Member Functions inherited from Pscf::Rp::Propagator< D, Types< D > > | |
| Propagator () | |
| Constructor. | |
| ~Propagator () | |
| Destructor. | |
| void | computeHead () |
| Compute initial q-field at the head vertex. | |
| void | solveMde () |
| Compute solution of modified diffusion equation (MDE). | |
| Types< D >::Block & | block () |
| Get the associated Block object by non-const reference. | |
| Protected Member Functions inherited from Pscf::PropagatorTmpl< QT > | |
| PropagatorTmpl () | |
| Constructor. | |
Protected Attributes | |
| DArray< typename Types< D >::RField > | qFields_ |
| Inherited non-dependent class members. | |
| int | ns_ |
| Number of slices, including head and tail slices. | |
| bool | isAllocated_ |
| Is this propagator allocated? | |
| Protected Attributes inherited from Pscf::Rp::Propagator< D, Types< D > > | |
| DArray< typename Types< D >::RField > | qFields_ |
| Array of propagator slices at different contour variable values. | |
| int | ns_ |
| Number of slices, including head and tail slices. | |
| bool | isAllocated_ |
| Is this propagator allocated? | |
Additional Inherited Members | |
| Public Types inherited from Pscf::Rp::Propagator< D, Types< D > > | |
| using | PropagatorTmplT |
| Direct (parent) base class. | |
MDE solver for one direction of one block.
Specializations of this template with D=1, 2, and 3 are derived from corresponding specializations of base class template Rp::Propagator, and inherit their public interface and almost all of their source code from this base class. Specializations of this template are also indirectly derived from specializations of the Pscf::PropagatorTmpl template.
Virtual allocate() and reallocate() functions are defined here and in the analogous Rpg::Propagator class template because the CPU and GPU versions of this class use different strategies for memory allocation.
Definition at line 40 of file rpc/solvers/Propagator.h.
|
protected |
Direct (parent) base class.
Definition at line 89 of file rpc/solvers/Propagator.h.
| Pscf::Rpc::Propagator< D >::Propagator | ( | ) |
Constructor.
Definition at line 26 of file rpc/solvers/Propagator.cpp.
| Pscf::Rpc::Propagator< D >::~Propagator | ( | ) |
Destructor.
Definition at line 34 of file rpc/solvers/Propagator.cpp.
|
overridevirtual |
Allocate memory used by this propagator.
The parameter ns is the number of values of s at which q(r,s) is calculated, including the end values at the terminating vertices. See docs for the function ns(), which returns this value.
The address of the associated Mesh<D> object is retained.
An Exception is thrown if the propagator is already allocated.
| ns | number of slices (including end points at vertices) |
| mesh | spatial discretization mesh |
Reimplemented from Pscf::Rp::Propagator< D, Types< D > >.
Definition at line 41 of file rpc/solvers/Propagator.cpp.
References Pscf::Rp::Propagator< D, Types< D > >::allocate(), isAllocated_, Pscf::Rp::Propagator< D, Types< D > >::mesh(), Pscf::Rp::Propagator< D, Types< D > >::ns(), qFields_, Pscf::PropagatorTmpl< QT >::setIsSolved(), and UTIL_CHECK.
|
overridevirtual |
Reallocate memory used by this propagator.
This function is used when the value of ns is changed, which can occur during some parameter sweeps. See docs for allocate and ns.
An Exception is thrown if the propagator has not been previously allocated, or if it is allocated but the value of ns is unchanged.
| ns | number of slices (including end points) |
Reimplemented from Pscf::Rp::Propagator< D, Types< D > >.
Definition at line 59 of file rpc/solvers/Propagator.cpp.
References Pscf::Rp::Propagator< D, Types< D > >::mesh(), Pscf::Rp::Propagator< D, Types< D > >::ns(), qFields_, Pscf::Rp::Propagator< D, Types< D > >::reallocate(), Pscf::PropagatorTmpl< QT >::setIsSolved(), and UTIL_CHECK.
|
protected |
Compute initial q-field at the head vertex.
In either the thread or bead model, the head slice of each propagator is the product of tail slices for incoming propagators from other bonds that terminate at the head vertex, or 1 for a chain end.
|
protected |
Inherited non-dependent class members.
Definition at line 191 of file rp/solvers/Propagator.h.
Referenced by allocate(), and reallocate().
|
protected |
Number of slices, including head and tail slices.
Definition at line 194 of file rp/solvers/Propagator.h.
|
protected |
Is this propagator allocated?
Definition at line 197 of file rp/solvers/Propagator.h.
Referenced by allocate().