13#include <pscf/solvers/MixtureTmpl.h>
14#include <pscf/inter/Interaction.h>
15#include <util/containers/DArray.h>
18 template <
int D>
class Mesh;
99 void setKuhn(
int monomerId,
double kuhn);
150 double stress(
int parameterId)
const;
197 int nUnitCellParams_;
218 {
return vMonomer_; }
225 inline Mesh<D> const & Mixture<D>::mesh()
const
238 return stress_[parameterId];
241 #ifndef PSPG_MIXTURE_TPP
Description of a regular grid of points in a periodic domain.
A mixture of polymer and solvent species.
Polymer & polymer(int id)
Get a polymer object.
int nBlock() const
Get number of total blocks in the mixture across all polymers.
int nSolvent() const
Get number of solvent (point particle) species.
double vMonomer() const
Get monomer reference volume (set to 1.0 by default).
Polymer< D > Polymer
Polymer species solver typename.
int nMonomer() const
Get number of monomer types.
Monomer const & monomer(int id) const
Get a Monomer type descriptor (const reference).
Solvent & solvent(int id)
Set a solvent solver object.
Solvent< D > Solvent
Solvent species solver typename.
int nPolymer() const
Get number of polymer species.
Solver for a mixture of polymers and solvents.
void setKuhn(int monomerId, double kuhn)
Reset statistical segment length for one monomer type.
bool isCanonical()
Is the ensemble canonical (i.e, closed for all species)?
void readParameters(std::istream &in)
Read all parameters and initialize.
double stress(int parameterId) const
Get derivative of free energy w/ respect to cell parameter.
void setupUnitCell(UnitCell< D > const &unitCell, WaveList< D > const &waveList)
Set unit cell parameters used in solver.
void computeStress(WaveList< D > const &waveList)
Get monomer reference volume.
void compute(DArray< RDField< D > > const &wFields, DArray< RDField< D > > &cFields)
Compute concentrations.
void setMesh(Mesh< D > const &mesh)
Create an association with the mesh and allocate memory.
void createBlockCRGrid(DArray< RDField< D > > &blockCFields) const
Combine cFields for each block/solvent into one DArray.
Field of real single precision values on an FFT mesh on a device.
Container for wavevector data.
Base template for UnitCell<D> classes, D=1, 2 or 3.
Dynamically allocatable contiguous array template.
A fixed size (static) contiguous array template.
ScalarParam< Type > & read(std::istream &in, const char *label, Type &value)
Add and read a new required ScalarParam < Type > object.
void setClassName(const char *className)
Set class name string.
ScalarParam< Type > & readOptional(std::istream &in, const char *label, Type &value)
Add and read a new optional ScalarParam < Type > object.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
#define UTIL_ASSERT(condition)
Assertion macro suitable for debugging serial or parallel code.
C++ namespace for polymer self-consistent field theory (PSCF).