12#include <pscf/mesh/Mesh.h>
49 cField_.allocate(meshPtr_->dimensions());
58 int nx = meshPtr_->size();
61 for (
int i = 0; i < nx; ++i) {
68 for (
int i = 0; i < nx; ++i) {
69 cField_[i] = exp(-s*wField[i]);
94 double prefactor =
phi()/Q;
95 for (
int i = 0; i < nx; ++i) {
96 cField_[i] *= prefactor;
Description of a regular grid of points in a periodic domain.
Field of real double precision values on an FFT mesh.
double phi() const
Get the overall volume fraction for this species.
void associate(Mesh< D > const &mesh)
Create an association with the mesh.
void compute(RField< D > const &wField, double phiTot=1.0)
Compute monomer concentration field, q and phi and/or mu.
Ensemble ensemble() const
Get the statistical ensemble for this species (open or closed).
void allocate()
Allocate memory for concentrationf field.
double size() const
Get the size (number of monomers) in this solvent.
SolventSpecies()
Constructor.
void setQ(double q)
Set q and compute phi or mu (depending on the ensemble).
void setClassName(const char *className)
Set class name string.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
Real periodic fields, SCFT and PS-FTS (CPU).
PSCF package top-level namespace.