12#include <rpg/solvers/Block.h>
13#include <prdc/cuda/RField.h>
14#include <pscf/chem/PolymerModel.h>
39 { nParams_ = nParams; }
47 for (
int j = 0; j <
nBlock(); ++j) {
48 block(j).clearUnitCellData();
62 for (
int j = 0; j <
nBlock(); ++j) {
63 monomerId =
block(j).monomerId();
64 block(j).setupSolver(wFields[monomerId]);
75 for (
int i = 0; i <
nBlock(); ++i) {
76 block(i).computeConcentrationThread(prefactor);
79 prefactor =
phi() / (
q() * (double)
nBead() );
80 for (
int i = 0; i <
nBlock(); ++i) {
81 block(i).computeConcentrationBead(prefactor);
99 for (
int i = 0; i <
nBlock(); ++i) {
100 block(i).computeStressThread(prefactor);
103 prefactor =
phi() / (
q() * (double)
nBead() );
104 for (
int i = 0; i <
nBlock(); ++i) {
105 block(i).computeStressBead(prefactor);
111 for (
int i = 0; i < nParams_; ++i) {
116 for (
int i = 0; i <
nBlock(); ++i) {
117 for (
int j=0; j < nParams_; ++j){
118 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.
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.
Block< D > & block(int id)
Get a specified Block (solver and descriptor).
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.