|
PSCF v1.5.0
|
MDE solver for one direction of one block (CPU specialization). More...
#include <Propagator_c.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::PropagatorBase< D, CPT > | |
| void | setBlock (Block< D, CPT > &block) |
| Associate this propagator with a block. | |
| void | solve () |
| Solve the modified diffusion equation (MDE) for this block. | |
| void | solve (RField< D, CPT > const &head) |
| Solve the MDE for a specified initial condition. | |
| void | computeQ (double &Q) const |
| Compute and return partition function for the polymer molecule. | |
| RField< D, CPT > const & | q (int i) const |
| Return q-field at a specified step. | |
| RField< D, CPT > const & | head () const |
| Return q-field at the initial (head) vertex. | |
| RField< D, CPT > const & | tail () const |
| Return q-field at the terminal (tail) vertex. | |
| Block< D, CPT > 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 | PropagatorBaseT = PropagatorBase<D,CPT> |
| Direct (parent) base class. | |
| using | PropagatorTmplT |
| Inherited typename alias for indirect (grandparent) base class. | |
Protected Member Functions | |
| void | computeHead () |
| Compute initial q-field at the head vertex. | |
| Protected Member Functions inherited from Pscf::Rp::PropagatorBase< D, CPT > | |
| PropagatorBase () | |
| Constructor. | |
| ~PropagatorBase () | |
| Destructor. | |
| void | computeHead () |
| Compute initial q-field at the head vertex. | |
| void | solveMde () |
| Compute solution of modified diffusion equation (MDE). | |
| Block< D, CPT > & | block () |
| Get the associated Block object by non-const reference. | |
| Protected Member Functions inherited from Pscf::PropagatorTmpl< QT > | |
| PropagatorTmpl () | |
| Constructor. | |
Protected Attributes | |
| DArray< RField< D, CPT > > | 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::PropagatorBase< D, CPT > | |
| DArray< RField< D, CPT > > | 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::PropagatorBase< D, CPT > | |
| using | PropagatorTmplT |
| Direct (parent) base class. | |
MDE solver for one direction of one block (CPU specialization).
This is the partial specialization for use with a serial CPU backend. This specialization inherits its public interface and almost all of its source code from the PropagatorBase base class template.
Virtual allocate() and reallocate() functions are defined here rather than in PropagatorBase because the CPU and GPU versions of this class use different strategies for memory allocation.
Definition at line 38 of file Propagator_c.h.
|
protected |
Direct (parent) base class.
Definition at line 88 of file Propagator_c.h.
|
protected |
Inherited typename alias for indirect (grandparent) base class.
Definition at line 204 of file PropagatorBase.h.
| Pscf::Rp::Propagator< D, CPT >::Propagator | ( | ) |
Constructor.
Definition at line 21 of file rp/solvers/Propagator.cpp.
References Propagator().
Referenced by allocate(), Propagator(), reallocate(), and ~Propagator().
| Pscf::Rp::Propagator< D, CPT >::~Propagator | ( | ) |
|
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::PropagatorBase< D, CPT >.
Definition at line 36 of file rp/solvers/Propagator.cpp.
References Pscf::Rp::PropagatorBase< D, CPT >::allocate(), Pscf::Mesh< D >::dimensions(), isAllocated_, Pscf::Rp::PropagatorBase< D, CPT >::mesh(), Pscf::Rp::PropagatorBase< D, CPT >::ns(), Propagator(), 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::PropagatorBase< D, CPT >.
Definition at line 54 of file rp/solvers/Propagator.cpp.
References Pscf::Rp::PropagatorBase< D, CPT >::mesh(), Pscf::Rp::PropagatorBase< D, CPT >::ns(), Propagator(), qFields_, Pscf::Rp::PropagatorBase< D, CPT >::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. On return, hasComputeHead_ == true.
|
protected |
Inherited non-dependent class members.
Definition at line 250 of file PropagatorBase.h.
Referenced by allocate(), and reallocate().
|
protected |
Number of slices, including head and tail slices.
Definition at line 253 of file PropagatorBase.h.
|
protected |
Is this propagator allocated?
Definition at line 256 of file PropagatorBase.h.
Referenced by allocate().