1#ifndef PSCF_PROPAGATOR_TMPL_H
2#define PSCF_PROPAGATOR_TMPL_H
11#include <util/containers/GArray.h>
170 TP
const * partnerPtr_;
187 {
return directionId_; }
194 {
return sourcePtrs_.size(); }
202 {
return *(sourcePtrs_[id]); }
210 {
return partnerPtr_; }
217 {
return isSolved_; }
237 { directionId_ = directionId; }
244 { partnerPtr_ = &partner; }
251 { sourcePtrs_.append(&source); }
269 { isSolved_ = isSolved; }
277 for (
int i=0; i < sourcePtrs_.size(); ++i) {
278 if (!sourcePtrs_[i]->isSolved()) {
Template for propagator classes.
void setIsSolved(bool isSolved)
Set the isSolved flag to true or false.
void addSource(const TP &source)
Add a propagator to the list of sources for this one.
const TP & partner() const
Get partner propagator.
const TP & source(int id) const
Get a source propagator.
void setDirectionId(int directionId)
Associate this propagator with a direction index.
bool isSolved() const
Has the modified diffusion equation been solved?
int directionId() const
Get direction index for this propagator.
bool hasPartner() const
Does this have a partner propagator?
bool isReady() const
Are all source propagators are solved?
void setPartner(const TP &partner)
Set the partner of this propagator.
PropagatorTmpl()
Constructor.
int nSource() const
Number of source / prerequisite propagators.
An automatically growable array, analogous to a std::vector.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.