42 for (
int j = 0; j <
nBlock(); ++j) {
43 monomerId =
block(j).monomerId();
44 block(j).setupSolver(wFields[monomerId]);
void setPhi(double phi)
Set volume fraction (if ensemble is closed).
void compute(DArray< Block::WField > const &wFields)
Compute solution to modified diffusion equation.
void setMu(double mu)
Set chemical potential mu (if ensemble is open).
Polymer()
Default constructor.
Block & block(int id)
Get a specified Block.
int nBlock() const
Number of blocks.
virtual void solve(double phiTot=1.0)
Solve modified diffusion equation.
double phi() const
Get the overall volume fraction for this species.
Ensemble ensemble()
Get the statistical ensemble for this species (open or closed).
double phi_
Volume fraction, set by either setPhi or compute function.
double mu_
Chemical potential, set by either setPhi or compute function.
double mu() const
Get the chemical potential for this species (units kT=1).
Dynamically allocatable contiguous array template.
void setClassName(const char *className)
Set class name string.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
C++ namespace for polymer self-consistent field theory (PSCF).