12#include <rpg/solvers/Block.h>
13#include <rpg/solvers/Propagator.h>
14#include <prdc/cuda/RField.h>
15#include <pscf/solvers/PolymerTmpl.tpp>
16#include <pscf/chem/PolymerModel.h>
41 { nParam_ = nParams; }
49 for (
int j = 0; j <
nBlock(); ++j) {
50 block(j).clearUnitCellData();
64 for (
int j = 0; j <
nBlock(); ++j) {
65 monomerId =
block(j).monomerId();
66 block(j).setupSolver(wFields[monomerId]);
77 for (
int i = 0; i <
nBlock(); ++i) {
78 block(i).computeConcentrationThread(prefactor);
81 prefactor =
phi() / (
q() * (double)
nBead() );
82 for (
int i = 0; i <
nBlock(); ++i) {
83 block(i).computeConcentrationBead(prefactor);
101 for (
int i = 0; i <
nBlock(); ++i) {
102 block(i).computeStressThread(prefactor);
105 prefactor =
phi() / (
q() * (double)
nBead() );
106 for (
int i = 0; i <
nBlock(); ++i) {
107 block(i).computeStressBead(prefactor);
113 for (
int i = 0; i < nParam_; ++i) {
118 for (
int i = 0; i <
nBlock(); ++i) {
119 for (
int j=0; j < nParam_; ++j){
120 stress_[j] +=
block(i).stress(j);
Field of real double precision values on an FFT mesh.
void computeStress()
Compute SCFT stress contribution from this polymer species.
double phi() const
Get the overall volume fraction for this species.
void compute(DArray< RField< D > > const &wFields, double phiTot=1.0)
Compute MDE solutions and block concentrations.
void clearUnitCellData()
Clear all data that depends on unit cell parameters.
Block< D > & block(int id)
Get a specified Block (solver and descriptor).
void setNParams(int nParams)
Set the number of unit cell parameters.
int nBead() const
Total number of beads in the polymer (bead model).
int nBlock() const
Number of blocks.
double length() const
Sum of the lengths of all blocks in the polymer (thread model).
double q() const
Get the molecular partition function for this species.
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 ?
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.