|
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. | |
| DeviceArray< cudaReal > const & | qAll () |
| Return the full array of q-fields as an unrolled 1D array. | |
| 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 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_ |
| 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? | |
| 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 most of their public interface from this base class.
Only a few functions that involve memory allocation on the GPU are defined or re-defined in this template
Definition at line 35 of file rpg/solvers/Propagator.h.
|
protected |
Direct base class.
Definition at line 89 of file rpg/solvers/Propagator.h.
| Pscf::Rpg::Propagator< D >::Propagator | ( | ) |
Constructor.
Definition at line 28 of file Propagator.cu.
| Pscf::Rpg::Propagator< D >::~Propagator | ( | ) |
Destructor.
Definition at line 36 of file Propagator.cu.
|
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 53 of file Propagator.cu.
References Pscf::Rp::Propagator< D, Types< D > >::allocate(), isAllocated_, Pscf::Rp::Propagator< D, Types< D > >::mesh(), Pscf::Rp::Propagator< D, Types< D > >::ns(), qFields_, and Pscf::PropagatorTmpl< QT >::setIsSolved().
|
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 77 of file Propagator.cu.
References Pscf::Rp::Propagator< D, Types< D > >::mesh(), Pscf::Rp::Propagator< D, Types< D > >::ns(), qFields_, Pscf::Rp::Propagator< D, Types< D > >::reallocate(), and Pscf::PropagatorTmpl< QT >::setIsSolved().
|
inline |
Return the full array of q-fields as an unrolled 1D array.
Definition at line 129 of file rpg/solvers/Propagator.h.
References Pscf::PropagatorTmpl< QT >::isSolved(), and UTIL_CHECK.
Referenced by Pscf::Rpg::Block< D >::computeStressBead(), and Pscf::Rpg::Block< D >::computeStressThread().
|
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 |
Array of propagator slices at different contour variable values.
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().