12#include <rp/solvers/Block.h>
13#include <rp/solvers/Propagator.h>
14#include <pscf/field/RField.h>
15#include <pscf/solvers/PolymerTmpl.tpp>
16#include <pscf/chem/PolymerModel.h>
24 template <
int D,
class T>
33 template <
int D,
class T>
40 template <
int D,
class T>
47 template <
int D,
class T>
50 for (
int j = 0; j <
nBlock(); ++j) {
51 block(j).clearUnitCellData();
59 template <
int D,
class T>
65 for (
int j = 0; j <
nBlock(); ++j) {
66 monomerId =
block(j).monomerId();
67 block(j).setupSolver(wFields[monomerId]);
78 for (
int i = 0; i <
nBlock(); ++i) {
79 block(i).computeConcentrationThread(prefactor);
82 prefactor =
phi() / (
q() * (double)
nBead() );
83 for (
int i = 0; i <
nBlock(); ++i) {
84 block(i).computeConcentrationBead(prefactor);
93 template <
int D,
class T>
102 for (
int i = 0; i <
nBlock(); ++i) {
103 block(i).computeStressThread(prefactor);
106 prefactor =
phi() / (
q() * (double)
nBead() );
107 for (
int i = 0; i <
nBlock(); ++i) {
108 block(i).computeStressBead(prefactor);
114 for (
int i = 0; i < nParam_; ++i) {
119 for (
int i = 0; i <
nBlock(); ++i) {
120 for (
int j = 0; j < nParam_; ++j){
121 stress_[j] +=
block(i).stress(j);
virtual void solve(double phiTot=1.0)
void setNParams(int nParam)
Set the number of unit cell parameters.
BlockT & block(int id)
Get a specified Block (solver and descriptor).
void clearUnitCellData()
Clear all data that depends on unit cell parameters.
void computeStress()
Compute SCFT stress contribution from this polymer species.
void compute(DArray< RField< D, T > > const &wFields, double phiTot=1.0)
Compute MDE solutions and block concentrations.
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.
bool isThread()
Is the thread model in use ?
Code for programs that simulate real-valued periodic fields.
PSCF package top-level namespace.