12#include "Propagator.h"
13#include <r1d/domain/Domain.h>
14#include <pscf/solvers/MixtureTmpl.tpp>
70 for (j = 0; j <
polymer(i).nBlock(); ++j) {
71 polymer(i).block(j).setDiscretization(domain, ds_);
78 for (
int i = 0; i <
nSolvent(); ++i) {
79 solvent(i).setDiscretization(domain);
94 for (
int i = 0; i <
nPolymer(); ++i) {
95 for (
int j = 0; j <
polymer(i).nBlock(); ++j) {
96 if (monomerId ==
polymer(i).block(j).monomerId()) {
97 polymer(i).block(j).setKuhn(kuhn);
116 int nx = domain().nx();
121 for (i = 0; i < nm; ++i) {
124 for (j = 0; j < nx; ++j) {
138 for (j = 0; j <
polymer(i).nBlock(); ++j) {
139 int monomerId =
polymer(i).block(j).monomerId();
142 FieldT& monomerField = cFields[monomerId];
144 for (k = 0; k < nx; ++k) {
145 monomerField[k] += blockField[k];
157 int monomerId =
solvent(i).monomerId();
162 solvent(i).compute(wFields[monomerId]);
165 FieldT& monomerField = cFields[monomerId];
167 for (k = 0; k < nx; ++k) {
168 monomerField[k] += solventField[k];
int nPolymer() const
Get number of polymer species.
Monomer const & monomer(int id) const
Get a Monomer type descriptor by const reference.
int nMonomer() const
Get number of monomer types.
int nSolvent() const
Get number of solvent (point particle) species.
Solvers for a mixture of polymer and solvent species.
SolventT & solvent(int id)
virtual void readParameters(std::istream &in)
Read parameters from file and initialize.
PolymerT & polymer(int id)
void setKuhn(double kuhn)
Set statistical segment length.
One-dimensional spatial domain and discretization grid.
void setKuhn(int monomerId, double kuhn)
Reset statistical segment length for one monomer type.
ScalarParam< Type > & read(std::istream &in, const char *label, Type &value)
Add and read a new required ScalarParam < Type > object.
void compute(DArray< FieldT > const &wFields, DArray< FieldT > &cFields)
Compute concentrations.
void setClassName(const char *className)
Set class name string.
void readParameters(std::istream &in)
Read all parameters and initialize.
DArray< double > FieldT
Field type.
void setDomain(Domain const &domain)
Create an association with the domain and allocate memory.
int capacity() const
Return allocated size.
Dynamically allocatable contiguous array template.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.