1#ifndef PRDC_CL_MIXTURE_H
2#define PRDC_CL_MIXTURE_H
11#include <pscf/solvers/MixtureTmpl.h>
16 template <
typename T>
class DArray;
19 template <
int D>
class Mesh;
50 template <
int D,
class PT,
class ST,
class TT>
80 using FFTT =
typename TT::FFT;
199 void setKuhn(
int monomerId,
double kuhn);
252 void writeBlockCRGrid(std::string
const & filename)
const;
270 void writeQSlice(std::string
const & filename,
271 int polymerId,
int blockId,
272 int directionId,
int segmentId)
const;
282 void writeQTail(std::string
const & filename,
int polymerId,
283 int blockId,
int directionId)
const;
293 void writeQ(std::string
const & filename,
int polymerId,
294 int blockId,
int directionId)
const;
314 void writeQAll(std::string
const & basename);
336 {
return *meshPtr_; }
340 {
return *unitCellPtr_; }
344 {
return *fieldIoPtr_; }
379 virtual void eqS(
FieldT& A,
double s)
const = 0;
387 virtual void addEqV(
FieldT& A,
FieldT const & B)
const = 0;
392 virtual void allocateBlocks() = 0;
typename TT::FFT FFTT
WaveList type.
UnitCell< D > const & unitCell() const
Return associated UnitCell<D> by const reference.
double ds() const
Return target value for the contour step size ds (thread model).
virtual void readParameters(std::istream &in)
Read all parameters and initialize.
typename TT::FieldIo FieldIoT
FieldIo type.
MixtureBase< std::complex< double > > MixtureBaseT
MixtureBase class.
void clearUnitCellData()
Clear all data that depends on the unit cell parameters.
typename TT::WaveList WaveListT
WaveList type.
void setKuhn(int monomerId, double kuhn)
Reset statistical segment length for one monomer type.
typename TT::Propagator PropagatorT
Propagator type, for one direction within a block.
MixtureTmpl< PT, ST, std::complex< double > > MixtureTmplT
MixtureTmpl class.
void compute(DArray< FieldT > const &wFields, DArray< FieldT > &cFields)
Compute partition functions and concentrations.
void associate(Mesh< D > const &mesh, FFTT const &fft, UnitCell< D > const &cell, WaveListT &waveList)
Create associations with Mesh, FFT, UnitCell, and WaveList objects.
void allocate()
Allocate required internal memory for all solvers.
Mesh< D > const & mesh() const
Return associated Mesh<D> by const reference.
FieldIoT const & fieldIo() const
Return associated FieldIoT by const reference.
typename TT::Block BlockT
Block type, for a block in a block polymer.
void setFieldIo(FieldIoT const &fieldIo)
Create an association with a FieldIoT object.
typename TT::CField FieldT
Field type, for data defined on a real-space grid.
Description of a regular grid of points in a periodic domain.
Abstract descriptor for a mixture of polymer and solvent species.
Monomer const & monomer(int id) const
SolventSpecies< std::complex< double > > const & solventSpecies(int id) const final
PolymerT & polymer(int id)
PolymerSpecies< std::complex< double > > const & polymerSpecies(int id) const final
SolventT & solvent(int id)
Base template for UnitCell<D> classes, D=1, 2 or 3.
Dynamically allocatable 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.
Complex-valued periodic fields (class templates).
Periodic fields and crystallography.
PSCF package top-level namespace.
Utility classes for scientific computation.