1#ifndef PSPC_POLYMER_TPP
2#define PSPC_POLYMER_TPP
18 { setClassName(
"Polymer");}
47 unitCellPtr_ = &unitCell;
49 for (
int j = 0; j < nBlock(); ++j) {
50 block(j).setupUnitCell(unitCell);
63 for (
int j = 0; j < nBlock(); ++j) {
64 monomerId = block(j).monomerId();
65 block(j).setupSolver(wFields[monomerId]);
80 for (
int i = 0; i < 6; ++i) {
85 double prefactor = exp(mu_)/length();
86 for (
int i = 0; i < nBlock(); ++i) {
87 block(i).computeStress(prefactor);
88 for (
int j = 0; j < unitCellPtr_->nParameter() ; ++j){
89 stress_[j] += block(i).stress(j);
void setPhi(double phi)
Set value of phi (volume fraction), if ensemble is closed.
void setupUnitCell(UnitCell< D > const &unitCell)
Set up the unit cell after a change in unit cell parameters.
void setMu(double mu)
Set value of mu (chemical potential), if ensemble is closed.
Polymer()
Default constructor.
void compute(DArray< RField< D > > const &wFields, double phiTot=1.0)
Compute solution to MDE and block concentrations.
void computeStress()
Compute stress contribution from this species.
Field of real double precision values on an FFT mesh.
Base template for UnitCell<D> classes, D=1, 2 or 3.
Dynamically allocatable contiguous array template.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
C++ namespace for polymer self-consistent field theory (PSCF).