12#include "Propagator.h"
13#include <r1/field/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];
145 for (k = 0; k < nx; ++k) {
146 monomerField[k] += blockField[k];
158 int monomerId =
solvent(i).monomerId();
163 solvent(i).compute(wFields[monomerId]);
166 FieldT& monomerField = cFields[monomerId];
168 for (k = 0; k < nx; ++k) {
169 monomerField[k] += solventField[k];
FT const & cField() const
Get the associated monomer concentration field (const reference).
Monomer const & monomer(int id) const
Solvers for a mixture of polymer and solvent species.
void readParameters(std::istream &in) override
Read parameters from file and initialize.
PolymerT & polymer(int id)
SolventT & solvent(int id)
void setKuhn(double kuhn)
Set statistical segment length.
Block within a block polymer.
One-dimensional spatial domain and discretization grid.
ScalarParam< Type > & read(std::istream &in, const char *label, Type &value)
Add and read a new required ScalarParam < Type > object.
DArray< double > FieldT
Field type.
void setClassName(const char *className)
Set class name string.
void compute(DArray< FieldT > const &wFields, DArray< FieldT > &cFields)
Compute concentrations.
void setKuhn(int monomerId, double kuhn)
Reset statistical segment length for one monomer type.
void readParameters(std::istream &in)
Read all parameters and initialize.
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.